diff --git a/CHANGELOG.md b/CHANGELOG.md index a2a78f2..24b2ee6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.1.8](https://github.com/googleapis/java-deploy/compare/v1.1.7...v1.1.8) (2022-10-05) + + +### Bug Fixes + +* update protobuf to v3.21.7 ([2913d41](https://github.com/googleapis/java-deploy/commit/2913d416913d81cf7dc05f780a914072ecc5009e)) + ## [1.1.7](https://github.com/googleapis/java-deploy/compare/v1.1.6...v1.1.7) (2022-10-03) diff --git a/google-cloud-deploy-bom/pom.xml b/google-cloud-deploy-bom/pom.xml index 7df4e39..30f7f0d 100644 --- a/google-cloud-deploy-bom/pom.xml +++ b/google-cloud-deploy-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-deploy-bom - 1.1.7 + 1.1.8 pom com.google.cloud @@ -65,17 +65,17 @@ com.google.cloud google-cloud-deploy - 1.1.7 + 1.1.8 com.google.api.grpc grpc-google-cloud-deploy-v1 - 1.1.7 + 1.1.8 com.google.api.grpc proto-google-cloud-deploy-v1 - 1.1.7 + 1.1.8 diff --git a/google-cloud-deploy/pom.xml b/google-cloud-deploy/pom.xml index 0e0a644..f3c0975 100644 --- a/google-cloud-deploy/pom.xml +++ b/google-cloud-deploy/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-deploy - 1.1.7 + 1.1.8 jar Google Google CLoud Deploy https://github.com/googleapis/java-deploy @@ -11,7 +11,7 @@ com.google.cloud google-cloud-deploy-parent - 1.1.7 + 1.1.8 google-cloud-deploy @@ -33,6 +33,10 @@ com.google.api api-common + + com.google.api.grpc + proto-google-iam-v1 + com.google.protobuf protobuf-java @@ -80,6 +84,17 @@ grpc-google-cloud-deploy-v1 test + + com.google.api.grpc + grpc-google-iam-v1 + test + + + com.google.api.grpc + grpc-google-common-protos + test + + com.google.api diff --git a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeployClient.java b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeployClient.java index fa9e5e6..5884c9e 100644 --- a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeployClient.java +++ b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeployClient.java @@ -30,7 +30,16 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.deploy.v1.stub.CloudDeployStub; import com.google.cloud.deploy.v1.stub.CloudDeployStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; @@ -2193,6 +2202,126 @@ public final UnaryCallable createReleaseCallabl return stub.createReleaseCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Abandons a Release in the Delivery Pipeline. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   ReleaseName name =
+   *       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]");
+   *   AbandonReleaseResponse response = cloudDeployClient.abandonRelease(name);
+   * }
+   * }
+ * + * @param name Required. Name of the Release. Format is + * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ + * releases/{release}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AbandonReleaseResponse abandonRelease(ReleaseName name) { + AbandonReleaseRequest request = + AbandonReleaseRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return abandonRelease(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Abandons a Release in the Delivery Pipeline. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String name =
+   *       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]").toString();
+   *   AbandonReleaseResponse response = cloudDeployClient.abandonRelease(name);
+   * }
+   * }
+ * + * @param name Required. Name of the Release. Format is + * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ + * releases/{release}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AbandonReleaseResponse abandonRelease(String name) { + AbandonReleaseRequest request = AbandonReleaseRequest.newBuilder().setName(name).build(); + return abandonRelease(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Abandons a Release in the Delivery Pipeline. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   AbandonReleaseRequest request =
+   *       AbandonReleaseRequest.newBuilder()
+   *           .setName(
+   *               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
+   *                   .toString())
+   *           .build();
+   *   AbandonReleaseResponse response = cloudDeployClient.abandonRelease(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AbandonReleaseResponse abandonRelease(AbandonReleaseRequest request) { + return abandonReleaseCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Abandons a Release in the Delivery Pipeline. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   AbandonReleaseRequest request =
+   *       AbandonReleaseRequest.newBuilder()
+   *           .setName(
+   *               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       cloudDeployClient.abandonReleaseCallable().futureCall(request);
+   *   // Do something.
+   *   AbandonReleaseResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + abandonReleaseCallable() { + return stub.abandonReleaseCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Approves a Rollout. @@ -2813,7 +2942,7 @@ public final UnaryCallable createRolloutCallabl // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets the configuration for a location. + * Retries the specified Job in a Rollout. * *

Sample code: * @@ -2824,23 +2953,35 @@ public final UnaryCallable createRolloutCallabl * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { - * ConfigName name = ConfigName.of("[PROJECT]", "[LOCATION]"); - * Config response = cloudDeployClient.getConfig(name); + * RolloutName rollout = + * RolloutName.of( + * "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]"); + * String phaseId = "phaseId-608264202"; + * String jobId = "jobId101296568"; + * RetryJobResponse response = cloudDeployClient.retryJob(rollout, phaseId, jobId); * } * } * - * @param name Required. Name of requested configuration. + * @param rollout Required. Name of the Rollout. Format is + * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ + * releases/{release}/rollouts/{rollout}. + * @param phaseId Required. The phase ID the Job to retry belongs to. + * @param jobId Required. The job ID for the Job to retry. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Config getConfig(ConfigName name) { - GetConfigRequest request = - GetConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getConfig(request); + public final RetryJobResponse retryJob(RolloutName rollout, String phaseId, String jobId) { + RetryJobRequest request = + RetryJobRequest.newBuilder() + .setRollout(rollout == null ? null : rollout.toString()) + .setPhaseId(phaseId) + .setJobId(jobId) + .build(); + return retryJob(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets the configuration for a location. + * Retries the specified Job in a Rollout. * *

Sample code: * @@ -2851,22 +2992,35 @@ public final Config getConfig(ConfigName name) { * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { - * String name = ConfigName.of("[PROJECT]", "[LOCATION]").toString(); - * Config response = cloudDeployClient.getConfig(name); + * String rollout = + * RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]") + * .toString(); + * String phaseId = "phaseId-608264202"; + * String jobId = "jobId101296568"; + * RetryJobResponse response = cloudDeployClient.retryJob(rollout, phaseId, jobId); * } * } * - * @param name Required. Name of requested configuration. + * @param rollout Required. Name of the Rollout. Format is + * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ + * releases/{release}/rollouts/{rollout}. + * @param phaseId Required. The phase ID the Job to retry belongs to. + * @param jobId Required. The job ID for the Job to retry. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Config getConfig(String name) { - GetConfigRequest request = GetConfigRequest.newBuilder().setName(name).build(); - return getConfig(request); + public final RetryJobResponse retryJob(String rollout, String phaseId, String jobId) { + RetryJobRequest request = + RetryJobRequest.newBuilder() + .setRollout(rollout) + .setPhaseId(phaseId) + .setJobId(jobId) + .build(); + return retryJob(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets the configuration for a location. + * Retries the specified Job in a Rollout. * *

Sample code: * @@ -2877,24 +3031,33 @@ public final Config getConfig(String name) { * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { - * GetConfigRequest request = - * GetConfigRequest.newBuilder() - * .setName(ConfigName.of("[PROJECT]", "[LOCATION]").toString()) + * RetryJobRequest request = + * RetryJobRequest.newBuilder() + * .setRollout( + * RolloutName.of( + * "[PROJECT]", + * "[LOCATION]", + * "[DELIVERY_PIPELINE]", + * "[RELEASE]", + * "[ROLLOUT]") + * .toString()) + * .setPhaseId("phaseId-608264202") + * .setJobId("jobId101296568") * .build(); - * Config response = cloudDeployClient.getConfig(request); + * RetryJobResponse response = cloudDeployClient.retryJob(request); * } * } * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Config getConfig(GetConfigRequest request) { - return getConfigCallable().call(request); + public final RetryJobResponse retryJob(RetryJobRequest request) { + return retryJobCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets the configuration for a location. + * Retries the specified Job in a Rollout. * *

Sample code: * @@ -2905,59 +3068,867 @@ public final Config getConfig(GetConfigRequest request) { * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { - * GetConfigRequest request = - * GetConfigRequest.newBuilder() - * .setName(ConfigName.of("[PROJECT]", "[LOCATION]").toString()) + * RetryJobRequest request = + * RetryJobRequest.newBuilder() + * .setRollout( + * RolloutName.of( + * "[PROJECT]", + * "[LOCATION]", + * "[DELIVERY_PIPELINE]", + * "[RELEASE]", + * "[ROLLOUT]") + * .toString()) + * .setPhaseId("phaseId-608264202") + * .setJobId("jobId101296568") * .build(); - * ApiFuture future = cloudDeployClient.getConfigCallable().futureCall(request); + * ApiFuture future = cloudDeployClient.retryJobCallable().futureCall(request); * // Do something. - * Config response = future.get(); + * RetryJobResponse response = future.get(); * } * } */ - public final UnaryCallable getConfigCallable() { - return stub.getConfigCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); + public final UnaryCallable retryJobCallable() { + return stub.retryJobCallable(); } - @Override - public boolean isTerminated() { - return stub.isTerminated(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists JobRuns in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   RolloutName parent =
+   *       RolloutName.of(
+   *           "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]");
+   *   for (JobRun element : cloudDeployClient.listJobRuns(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The `Rollout` which owns this collection of `JobRun` objects. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListJobRunsPagedResponse listJobRuns(RolloutName parent) { + ListJobRunsRequest request = + ListJobRunsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listJobRuns(request); } - @Override - public void shutdownNow() { - stub.shutdownNow(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists JobRuns in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String parent =
+   *       RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]")
+   *           .toString();
+   *   for (JobRun element : cloudDeployClient.listJobRuns(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The `Rollout` which owns this collection of `JobRun` objects. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListJobRunsPagedResponse listJobRuns(String parent) { + ListJobRunsRequest request = ListJobRunsRequest.newBuilder().setParent(parent).build(); + return listJobRuns(request); } - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists JobRuns in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   ListJobRunsRequest request =
+   *       ListJobRunsRequest.newBuilder()
+   *           .setParent(
+   *               RolloutName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[DELIVERY_PIPELINE]",
+   *                       "[RELEASE]",
+   *                       "[ROLLOUT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (JobRun element : cloudDeployClient.listJobRuns(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListJobRunsPagedResponse listJobRuns(ListJobRunsRequest request) { + return listJobRunsPagedCallable().call(request); } - public static class ListDeliveryPipelinesPagedResponse - extends AbstractPagedListResponse< - ListDeliveryPipelinesRequest, - ListDeliveryPipelinesResponse, - DeliveryPipeline, - ListDeliveryPipelinesPage, - ListDeliveryPipelinesFixedSizeCollection> { - - public static ApiFuture createAsync( + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists JobRuns in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   ListJobRunsRequest request =
+   *       ListJobRunsRequest.newBuilder()
+   *           .setParent(
+   *               RolloutName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[DELIVERY_PIPELINE]",
+   *                       "[RELEASE]",
+   *                       "[ROLLOUT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future = cloudDeployClient.listJobRunsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (JobRun element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listJobRunsPagedCallable() { + return stub.listJobRunsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists JobRuns in a given project and location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   ListJobRunsRequest request =
+   *       ListJobRunsRequest.newBuilder()
+   *           .setParent(
+   *               RolloutName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[DELIVERY_PIPELINE]",
+   *                       "[RELEASE]",
+   *                       "[ROLLOUT]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListJobRunsResponse response = cloudDeployClient.listJobRunsCallable().call(request);
+   *     for (JobRun element : response.getJobRunsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listJobRunsCallable() { + return stub.listJobRunsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single JobRun. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   JobRunName name =
+   *       JobRunName.of(
+   *           "[PROJECT]",
+   *           "[LOCATION]",
+   *           "[DELIVERY_PIPELINE]",
+   *           "[RELEASE]",
+   *           "[ROLLOUT]",
+   *           "[JOB_RUN]");
+   *   JobRun response = cloudDeployClient.getJobRun(name);
+   * }
+   * }
+ * + * @param name Required. Name of the `JobRun`. Format must be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final JobRun getJobRun(JobRunName name) { + GetJobRunRequest request = + GetJobRunRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getJobRun(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single JobRun. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String name =
+   *       JobRunName.of(
+   *               "[PROJECT]",
+   *               "[LOCATION]",
+   *               "[DELIVERY_PIPELINE]",
+   *               "[RELEASE]",
+   *               "[ROLLOUT]",
+   *               "[JOB_RUN]")
+   *           .toString();
+   *   JobRun response = cloudDeployClient.getJobRun(name);
+   * }
+   * }
+ * + * @param name Required. Name of the `JobRun`. Format must be + * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final JobRun getJobRun(String name) { + GetJobRunRequest request = GetJobRunRequest.newBuilder().setName(name).build(); + return getJobRun(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single JobRun. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   GetJobRunRequest request =
+   *       GetJobRunRequest.newBuilder()
+   *           .setName(
+   *               JobRunName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[DELIVERY_PIPELINE]",
+   *                       "[RELEASE]",
+   *                       "[ROLLOUT]",
+   *                       "[JOB_RUN]")
+   *                   .toString())
+   *           .build();
+   *   JobRun response = cloudDeployClient.getJobRun(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final JobRun getJobRun(GetJobRunRequest request) { + return getJobRunCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single JobRun. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   GetJobRunRequest request =
+   *       GetJobRunRequest.newBuilder()
+   *           .setName(
+   *               JobRunName.of(
+   *                       "[PROJECT]",
+   *                       "[LOCATION]",
+   *                       "[DELIVERY_PIPELINE]",
+   *                       "[RELEASE]",
+   *                       "[ROLLOUT]",
+   *                       "[JOB_RUN]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = cloudDeployClient.getJobRunCallable().futureCall(request);
+   *   // Do something.
+   *   JobRun response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getJobRunCallable() { + return stub.getJobRunCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the configuration for a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   ConfigName name = ConfigName.of("[PROJECT]", "[LOCATION]");
+   *   Config response = cloudDeployClient.getConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of requested configuration. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Config getConfig(ConfigName name) { + GetConfigRequest request = + GetConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the configuration for a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   String name = ConfigName.of("[PROJECT]", "[LOCATION]").toString();
+   *   Config response = cloudDeployClient.getConfig(name);
+   * }
+   * }
+ * + * @param name Required. Name of requested configuration. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Config getConfig(String name) { + GetConfigRequest request = GetConfigRequest.newBuilder().setName(name).build(); + return getConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the configuration for a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   GetConfigRequest request =
+   *       GetConfigRequest.newBuilder()
+   *           .setName(ConfigName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   Config response = cloudDeployClient.getConfig(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Config getConfig(GetConfigRequest request) { + return getConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the configuration for a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   GetConfigRequest request =
+   *       GetConfigRequest.newBuilder()
+   *           .setName(ConfigName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   ApiFuture future = cloudDeployClient.getConfigCallable().futureCall(request);
+   *   // Do something.
+   *   Config response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getConfigCallable() { + return stub.getConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : cloudDeployClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudDeployClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = cloudDeployClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = cloudDeployClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = cloudDeployClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = cloudDeployClient.setIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = cloudDeployClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = cloudDeployClient.getIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = cloudDeployClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = cloudDeployClient.testIamPermissions(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       cloudDeployClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListDeliveryPipelinesPagedResponse + extends AbstractPagedListResponse< + ListDeliveryPipelinesRequest, + ListDeliveryPipelinesResponse, + DeliveryPipeline, + ListDeliveryPipelinesPage, + ListDeliveryPipelinesFixedSizeCollection> { + + public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { @@ -3255,4 +4226,153 @@ protected ListRolloutsFixedSizeCollection createCollection( return new ListRolloutsFixedSizeCollection(pages, collectionSize); } } + + public static class ListJobRunsPagedResponse + extends AbstractPagedListResponse< + ListJobRunsRequest, + ListJobRunsResponse, + JobRun, + ListJobRunsPage, + ListJobRunsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListJobRunsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListJobRunsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListJobRunsPagedResponse(ListJobRunsPage page) { + super(page, ListJobRunsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListJobRunsPage + extends AbstractPage { + + private ListJobRunsPage( + PageContext context, + ListJobRunsResponse response) { + super(context, response); + } + + private static ListJobRunsPage createEmptyPage() { + return new ListJobRunsPage(null, null); + } + + @Override + protected ListJobRunsPage createPage( + PageContext context, + ListJobRunsResponse response) { + return new ListJobRunsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListJobRunsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListJobRunsRequest, + ListJobRunsResponse, + JobRun, + ListJobRunsPage, + ListJobRunsFixedSizeCollection> { + + private ListJobRunsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListJobRunsFixedSizeCollection createEmptyCollection() { + return new ListJobRunsFixedSizeCollection(null, 0); + } + + @Override + protected ListJobRunsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListJobRunsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeploySettings.java b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeploySettings.java index 30e28d8..fed821f 100644 --- a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeploySettings.java +++ b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeploySettings.java @@ -17,6 +17,8 @@ package com.google.cloud.deploy.v1; import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListJobRunsPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListLocationsPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListReleasesPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListRolloutsPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListTargetsPagedResponse; @@ -35,6 +37,15 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.deploy.v1.stub.CloudDeployStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.protobuf.Empty; import java.io.IOException; @@ -194,6 +205,11 @@ public UnaryCallSettings createReleaseSettings( return ((CloudDeployStubSettings) getStubSettings()).createReleaseOperationSettings(); } + /** Returns the object with the settings used for calls to abandonRelease. */ + public UnaryCallSettings abandonReleaseSettings() { + return ((CloudDeployStubSettings) getStubSettings()).abandonReleaseSettings(); + } + /** Returns the object with the settings used for calls to approveRollout. */ public UnaryCallSettings approveRolloutSettings() { return ((CloudDeployStubSettings) getStubSettings()).approveRolloutSettings(); @@ -221,11 +237,54 @@ public UnaryCallSettings createRolloutSettings( return ((CloudDeployStubSettings) getStubSettings()).createRolloutOperationSettings(); } + /** Returns the object with the settings used for calls to retryJob. */ + public UnaryCallSettings retryJobSettings() { + return ((CloudDeployStubSettings) getStubSettings()).retryJobSettings(); + } + + /** Returns the object with the settings used for calls to listJobRuns. */ + public PagedCallSettings + listJobRunsSettings() { + return ((CloudDeployStubSettings) getStubSettings()).listJobRunsSettings(); + } + + /** Returns the object with the settings used for calls to getJobRun. */ + public UnaryCallSettings getJobRunSettings() { + return ((CloudDeployStubSettings) getStubSettings()).getJobRunSettings(); + } + /** Returns the object with the settings used for calls to getConfig. */ public UnaryCallSettings getConfigSettings() { return ((CloudDeployStubSettings) getStubSettings()).getConfigSettings(); } + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((CloudDeployStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((CloudDeployStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((CloudDeployStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((CloudDeployStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((CloudDeployStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + public static final CloudDeploySettings create(CloudDeployStubSettings stub) throws IOException { return new CloudDeploySettings.Builder(stub.toBuilder()).build(); } @@ -461,6 +520,12 @@ public UnaryCallSettings.Builder createReleaseS return getStubSettingsBuilder().createReleaseOperationSettings(); } + /** Returns the builder for the settings used for calls to abandonRelease. */ + public UnaryCallSettings.Builder + abandonReleaseSettings() { + return getStubSettingsBuilder().abandonReleaseSettings(); + } + /** Returns the builder for the settings used for calls to approveRollout. */ public UnaryCallSettings.Builder approveRolloutSettings() { @@ -490,11 +555,56 @@ public UnaryCallSettings.Builder createRolloutS return getStubSettingsBuilder().createRolloutOperationSettings(); } + /** Returns the builder for the settings used for calls to retryJob. */ + public UnaryCallSettings.Builder retryJobSettings() { + return getStubSettingsBuilder().retryJobSettings(); + } + + /** Returns the builder for the settings used for calls to listJobRuns. */ + public PagedCallSettings.Builder< + ListJobRunsRequest, ListJobRunsResponse, ListJobRunsPagedResponse> + listJobRunsSettings() { + return getStubSettingsBuilder().listJobRunsSettings(); + } + + /** Returns the builder for the settings used for calls to getJobRun. */ + public UnaryCallSettings.Builder getJobRunSettings() { + return getStubSettingsBuilder().getJobRunSettings(); + } + /** Returns the builder for the settings used for calls to getConfig. */ public UnaryCallSettings.Builder getConfigSettings() { return getStubSettingsBuilder().getConfigSettings(); } + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + @Override public CloudDeploySettings build() throws IOException { return new CloudDeploySettings(this); diff --git a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/gapic_metadata.json b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/gapic_metadata.json index ceb3857..c7edaec 100644 --- a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/gapic_metadata.json +++ b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/gapic_metadata.json @@ -10,6 +10,9 @@ "grpc": { "libraryClient": "CloudDeployClient", "rpcs": { + "AbandonRelease": { + "methods": ["abandonRelease", "abandonRelease", "abandonRelease", "abandonReleaseCallable"] + }, "ApproveRollout": { "methods": ["approveRollout", "approveRollout", "approveRollout", "approveRolloutCallable"] }, @@ -37,6 +40,15 @@ "GetDeliveryPipeline": { "methods": ["getDeliveryPipeline", "getDeliveryPipeline", "getDeliveryPipeline", "getDeliveryPipelineCallable"] }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetJobRun": { + "methods": ["getJobRun", "getJobRun", "getJobRun", "getJobRunCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, "GetRelease": { "methods": ["getRelease", "getRelease", "getRelease", "getReleaseCallable"] }, @@ -49,6 +61,12 @@ "ListDeliveryPipelines": { "methods": ["listDeliveryPipelines", "listDeliveryPipelines", "listDeliveryPipelines", "listDeliveryPipelinesPagedCallable", "listDeliveryPipelinesCallable"] }, + "ListJobRuns": { + "methods": ["listJobRuns", "listJobRuns", "listJobRuns", "listJobRunsPagedCallable", "listJobRunsCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, "ListReleases": { "methods": ["listReleases", "listReleases", "listReleases", "listReleasesPagedCallable", "listReleasesCallable"] }, @@ -58,6 +76,15 @@ "ListTargets": { "methods": ["listTargets", "listTargets", "listTargets", "listTargetsPagedCallable", "listTargetsCallable"] }, + "RetryJob": { + "methods": ["retryJob", "retryJob", "retryJob", "retryJobCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + }, "UpdateDeliveryPipeline": { "methods": ["updateDeliveryPipelineAsync", "updateDeliveryPipelineAsync", "updateDeliveryPipelineOperationCallable", "updateDeliveryPipelineCallable"] }, diff --git a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStub.java b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStub.java index 0429125..6ba4947 100644 --- a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStub.java +++ b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStub.java @@ -17,6 +17,8 @@ package com.google.cloud.deploy.v1.stub; import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListJobRunsPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListLocationsPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListReleasesPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListRolloutsPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListTargetsPagedResponse; @@ -24,6 +26,8 @@ import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.deploy.v1.AbandonReleaseRequest; +import com.google.cloud.deploy.v1.AbandonReleaseResponse; import com.google.cloud.deploy.v1.ApproveRolloutRequest; import com.google.cloud.deploy.v1.ApproveRolloutResponse; import com.google.cloud.deploy.v1.Config; @@ -36,11 +40,15 @@ import com.google.cloud.deploy.v1.DeliveryPipeline; import com.google.cloud.deploy.v1.GetConfigRequest; import com.google.cloud.deploy.v1.GetDeliveryPipelineRequest; +import com.google.cloud.deploy.v1.GetJobRunRequest; import com.google.cloud.deploy.v1.GetReleaseRequest; import com.google.cloud.deploy.v1.GetRolloutRequest; import com.google.cloud.deploy.v1.GetTargetRequest; +import com.google.cloud.deploy.v1.JobRun; import com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest; import com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse; +import com.google.cloud.deploy.v1.ListJobRunsRequest; +import com.google.cloud.deploy.v1.ListJobRunsResponse; import com.google.cloud.deploy.v1.ListReleasesRequest; import com.google.cloud.deploy.v1.ListReleasesResponse; import com.google.cloud.deploy.v1.ListRolloutsRequest; @@ -49,10 +57,21 @@ import com.google.cloud.deploy.v1.ListTargetsResponse; import com.google.cloud.deploy.v1.OperationMetadata; import com.google.cloud.deploy.v1.Release; +import com.google.cloud.deploy.v1.RetryJobRequest; +import com.google.cloud.deploy.v1.RetryJobResponse; import com.google.cloud.deploy.v1.Rollout; import com.google.cloud.deploy.v1.Target; import com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest; import com.google.cloud.deploy.v1.UpdateTargetRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; import com.google.protobuf.Empty; @@ -180,6 +199,10 @@ public UnaryCallable createReleaseCallable() { throw new UnsupportedOperationException("Not implemented: createReleaseCallable()"); } + public UnaryCallable abandonReleaseCallable() { + throw new UnsupportedOperationException("Not implemented: abandonReleaseCallable()"); + } + public UnaryCallable approveRolloutCallable() { throw new UnsupportedOperationException("Not implemented: approveRolloutCallable()"); } @@ -205,10 +228,52 @@ public UnaryCallable createRolloutCallable() { throw new UnsupportedOperationException("Not implemented: createRolloutCallable()"); } + public UnaryCallable retryJobCallable() { + throw new UnsupportedOperationException("Not implemented: retryJobCallable()"); + } + + public UnaryCallable listJobRunsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listJobRunsPagedCallable()"); + } + + public UnaryCallable listJobRunsCallable() { + throw new UnsupportedOperationException("Not implemented: listJobRunsCallable()"); + } + + public UnaryCallable getJobRunCallable() { + throw new UnsupportedOperationException("Not implemented: getJobRunCallable()"); + } + public UnaryCallable getConfigCallable() { throw new UnsupportedOperationException("Not implemented: getConfigCallable()"); } + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStubSettings.java b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStubSettings.java index e991b6b..f357da5 100644 --- a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStubSettings.java +++ b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStubSettings.java @@ -17,6 +17,8 @@ package com.google.cloud.deploy.v1.stub; import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListJobRunsPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListLocationsPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListReleasesPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListRolloutsPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListTargetsPagedResponse; @@ -50,6 +52,8 @@ 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.deploy.v1.AbandonReleaseRequest; +import com.google.cloud.deploy.v1.AbandonReleaseResponse; import com.google.cloud.deploy.v1.ApproveRolloutRequest; import com.google.cloud.deploy.v1.ApproveRolloutResponse; import com.google.cloud.deploy.v1.Config; @@ -62,11 +66,15 @@ import com.google.cloud.deploy.v1.DeliveryPipeline; import com.google.cloud.deploy.v1.GetConfigRequest; import com.google.cloud.deploy.v1.GetDeliveryPipelineRequest; +import com.google.cloud.deploy.v1.GetJobRunRequest; import com.google.cloud.deploy.v1.GetReleaseRequest; import com.google.cloud.deploy.v1.GetRolloutRequest; import com.google.cloud.deploy.v1.GetTargetRequest; +import com.google.cloud.deploy.v1.JobRun; import com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest; import com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse; +import com.google.cloud.deploy.v1.ListJobRunsRequest; +import com.google.cloud.deploy.v1.ListJobRunsResponse; import com.google.cloud.deploy.v1.ListReleasesRequest; import com.google.cloud.deploy.v1.ListReleasesResponse; import com.google.cloud.deploy.v1.ListRolloutsRequest; @@ -75,14 +83,25 @@ import com.google.cloud.deploy.v1.ListTargetsResponse; import com.google.cloud.deploy.v1.OperationMetadata; import com.google.cloud.deploy.v1.Release; +import com.google.cloud.deploy.v1.RetryJobRequest; +import com.google.cloud.deploy.v1.RetryJobResponse; import com.google.cloud.deploy.v1.Rollout; import com.google.cloud.deploy.v1.Target; import com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest; import com.google.cloud.deploy.v1.UpdateTargetRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.protobuf.Empty; import java.io.IOException; @@ -170,6 +189,8 @@ public class CloudDeployStubSettings extends StubSettings createReleaseSettings; private final OperationCallSettings createReleaseOperationSettings; + private final UnaryCallSettings + abandonReleaseSettings; private final UnaryCallSettings approveRolloutSettings; private final PagedCallSettings< @@ -179,7 +200,19 @@ public class CloudDeployStubSettings extends StubSettings createRolloutSettings; private final OperationCallSettings createRolloutOperationSettings; + private final UnaryCallSettings retryJobSettings; + private final PagedCallSettings + listJobRunsSettings; + private final UnaryCallSettings getJobRunSettings; private final UnaryCallSettings getConfigSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; private static final PagedListDescriptor< ListDeliveryPipelinesRequest, ListDeliveryPipelinesResponse, DeliveryPipeline> @@ -330,6 +363,78 @@ public Iterable extractResources(ListRolloutsResponse payload) { } }; + private static final PagedListDescriptor + LIST_JOB_RUNS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListJobRunsRequest injectToken(ListJobRunsRequest payload, String token) { + return ListJobRunsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListJobRunsRequest injectPageSize(ListJobRunsRequest payload, int pageSize) { + return ListJobRunsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListJobRunsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListJobRunsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListJobRunsResponse payload) { + return payload.getJobRunsList() == null + ? ImmutableList.of() + : payload.getJobRunsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + private static final PagedListResponseFactory< ListDeliveryPipelinesRequest, ListDeliveryPipelinesResponse, @@ -405,6 +510,40 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListJobRunsRequest, ListJobRunsResponse, ListJobRunsPagedResponse> + LIST_JOB_RUNS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListJobRunsRequest, ListJobRunsResponse, ListJobRunsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListJobRunsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_JOB_RUNS_PAGE_STR_DESC, request, context); + return ListJobRunsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to listDeliveryPipelines. */ public PagedCallSettings< ListDeliveryPipelinesRequest, @@ -522,6 +661,11 @@ public UnaryCallSettings createReleaseSettings( return createReleaseOperationSettings; } + /** Returns the object with the settings used for calls to abandonRelease. */ + public UnaryCallSettings abandonReleaseSettings() { + return abandonReleaseSettings; + } + /** Returns the object with the settings used for calls to approveRollout. */ public UnaryCallSettings approveRolloutSettings() { return approveRolloutSettings; @@ -549,11 +693,54 @@ public UnaryCallSettings createRolloutSettings( return createRolloutOperationSettings; } + /** Returns the object with the settings used for calls to retryJob. */ + public UnaryCallSettings retryJobSettings() { + return retryJobSettings; + } + + /** Returns the object with the settings used for calls to listJobRuns. */ + public PagedCallSettings + listJobRunsSettings() { + return listJobRunsSettings; + } + + /** Returns the object with the settings used for calls to getJobRun. */ + public UnaryCallSettings getJobRunSettings() { + return getJobRunSettings; + } + /** Returns the object with the settings used for calls to getConfig. */ public UnaryCallSettings getConfigSettings() { return getConfigSettings; } + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + public CloudDeployStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -683,12 +870,21 @@ protected CloudDeployStubSettings(Builder settingsBuilder) throws IOException { getReleaseSettings = settingsBuilder.getReleaseSettings().build(); createReleaseSettings = settingsBuilder.createReleaseSettings().build(); createReleaseOperationSettings = settingsBuilder.createReleaseOperationSettings().build(); + abandonReleaseSettings = settingsBuilder.abandonReleaseSettings().build(); approveRolloutSettings = settingsBuilder.approveRolloutSettings().build(); listRolloutsSettings = settingsBuilder.listRolloutsSettings().build(); getRolloutSettings = settingsBuilder.getRolloutSettings().build(); createRolloutSettings = settingsBuilder.createRolloutSettings().build(); createRolloutOperationSettings = settingsBuilder.createRolloutOperationSettings().build(); + retryJobSettings = settingsBuilder.retryJobSettings().build(); + listJobRunsSettings = settingsBuilder.listJobRunsSettings().build(); + getJobRunSettings = settingsBuilder.getJobRunSettings().build(); getConfigSettings = settingsBuilder.getConfigSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); } /** Builder for CloudDeployStubSettings. */ @@ -736,6 +932,8 @@ public static class Builder extends StubSettings.Builder createReleaseSettings; private final OperationCallSettings.Builder createReleaseOperationSettings; + private final UnaryCallSettings.Builder + abandonReleaseSettings; private final UnaryCallSettings.Builder approveRolloutSettings; private final PagedCallSettings.Builder< @@ -745,7 +943,20 @@ public static class Builder extends StubSettings.Builder createRolloutSettings; private final OperationCallSettings.Builder createRolloutOperationSettings; + private final UnaryCallSettings.Builder retryJobSettings; + private final PagedCallSettings.Builder< + ListJobRunsRequest, ListJobRunsResponse, ListJobRunsPagedResponse> + listJobRunsSettings; + private final UnaryCallSettings.Builder getJobRunSettings; private final UnaryCallSettings.Builder getConfigSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -757,6 +968,7 @@ public static class Builder extends StubSettings.BuildernewArrayList(StatusCode.Code.UNAVAILABLE))); definitions.put( "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -784,6 +996,8 @@ public static class Builder extends StubSettings.Builder>of( @@ -837,11 +1060,20 @@ protected Builder(ClientContext clientContext) { listReleasesSettings, getReleaseSettings, createReleaseSettings, + abandonReleaseSettings, approveRolloutSettings, listRolloutsSettings, getRolloutSettings, createRolloutSettings, - getConfigSettings); + retryJobSettings, + listJobRunsSettings, + getJobRunSettings, + getConfigSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); initDefaults(this); } @@ -871,12 +1103,21 @@ protected Builder(CloudDeployStubSettings settings) { getReleaseSettings = settings.getReleaseSettings.toBuilder(); createReleaseSettings = settings.createReleaseSettings.toBuilder(); createReleaseOperationSettings = settings.createReleaseOperationSettings.toBuilder(); + abandonReleaseSettings = settings.abandonReleaseSettings.toBuilder(); approveRolloutSettings = settings.approveRolloutSettings.toBuilder(); listRolloutsSettings = settings.listRolloutsSettings.toBuilder(); getRolloutSettings = settings.getRolloutSettings.toBuilder(); createRolloutSettings = settings.createRolloutSettings.toBuilder(); createRolloutOperationSettings = settings.createRolloutOperationSettings.toBuilder(); + retryJobSettings = settings.retryJobSettings.toBuilder(); + listJobRunsSettings = settings.listJobRunsSettings.toBuilder(); + getJobRunSettings = settings.getJobRunSettings.toBuilder(); getConfigSettings = settings.getConfigSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -893,11 +1134,20 @@ protected Builder(CloudDeployStubSettings settings) { listReleasesSettings, getReleaseSettings, createReleaseSettings, + abandonReleaseSettings, approveRolloutSettings, listRolloutsSettings, getRolloutSettings, createRolloutSettings, - getConfigSettings); + retryJobSettings, + listJobRunsSettings, + getJobRunSettings, + getConfigSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); } private static Builder createDefault() { @@ -992,6 +1242,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder + .abandonReleaseSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder .approveRolloutSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) @@ -1012,11 +1267,51 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder + .retryJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listJobRunsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getJobRunSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .getConfigSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .createDeliveryPipelineOperationSettings() .setInitialCallSettings( @@ -1362,6 +1657,12 @@ public UnaryCallSettings.Builder createReleaseS return createReleaseOperationSettings; } + /** Returns the builder for the settings used for calls to abandonRelease. */ + public UnaryCallSettings.Builder + abandonReleaseSettings() { + return abandonReleaseSettings; + } + /** Returns the builder for the settings used for calls to approveRollout. */ public UnaryCallSettings.Builder approveRolloutSettings() { @@ -1393,11 +1694,56 @@ public UnaryCallSettings.Builder createRolloutS return createRolloutOperationSettings; } + /** Returns the builder for the settings used for calls to retryJob. */ + public UnaryCallSettings.Builder retryJobSettings() { + return retryJobSettings; + } + + /** Returns the builder for the settings used for calls to listJobRuns. */ + public PagedCallSettings.Builder< + ListJobRunsRequest, ListJobRunsResponse, ListJobRunsPagedResponse> + listJobRunsSettings() { + return listJobRunsSettings; + } + + /** Returns the builder for the settings used for calls to getJobRun. */ + public UnaryCallSettings.Builder getJobRunSettings() { + return getJobRunSettings; + } + /** Returns the builder for the settings used for calls to getConfig. */ public UnaryCallSettings.Builder getConfigSettings() { return getConfigSettings; } + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + @Override public CloudDeployStubSettings build() throws IOException { return new CloudDeployStubSettings(this); diff --git a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployStub.java b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployStub.java index 95e7021..422dd89 100644 --- a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployStub.java +++ b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployStub.java @@ -17,6 +17,8 @@ package com.google.cloud.deploy.v1.stub; import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListJobRunsPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListLocationsPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListReleasesPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListRolloutsPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListTargetsPagedResponse; @@ -28,6 +30,8 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.deploy.v1.AbandonReleaseRequest; +import com.google.cloud.deploy.v1.AbandonReleaseResponse; import com.google.cloud.deploy.v1.ApproveRolloutRequest; import com.google.cloud.deploy.v1.ApproveRolloutResponse; import com.google.cloud.deploy.v1.Config; @@ -40,11 +44,15 @@ import com.google.cloud.deploy.v1.DeliveryPipeline; import com.google.cloud.deploy.v1.GetConfigRequest; import com.google.cloud.deploy.v1.GetDeliveryPipelineRequest; +import com.google.cloud.deploy.v1.GetJobRunRequest; import com.google.cloud.deploy.v1.GetReleaseRequest; import com.google.cloud.deploy.v1.GetRolloutRequest; import com.google.cloud.deploy.v1.GetTargetRequest; +import com.google.cloud.deploy.v1.JobRun; import com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest; import com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse; +import com.google.cloud.deploy.v1.ListJobRunsRequest; +import com.google.cloud.deploy.v1.ListJobRunsResponse; import com.google.cloud.deploy.v1.ListReleasesRequest; import com.google.cloud.deploy.v1.ListReleasesResponse; import com.google.cloud.deploy.v1.ListRolloutsRequest; @@ -53,11 +61,22 @@ import com.google.cloud.deploy.v1.ListTargetsResponse; import com.google.cloud.deploy.v1.OperationMetadata; import com.google.cloud.deploy.v1.Release; +import com.google.cloud.deploy.v1.RetryJobRequest; +import com.google.cloud.deploy.v1.RetryJobResponse; import com.google.cloud.deploy.v1.Rollout; import com.google.cloud.deploy.v1.Target; import com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest; import com.google.cloud.deploy.v1.UpdateTargetRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; @@ -199,6 +218,17 @@ public class GrpcCloudDeployStub extends CloudDeployStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + abandonReleaseMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/AbandonRelease") + .setRequestMarshaller( + ProtoUtils.marshaller(AbandonReleaseRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AbandonReleaseResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor approveRolloutMethodDescriptor = MethodDescriptor.newBuilder() @@ -238,6 +268,33 @@ public class GrpcCloudDeployStub extends CloudDeployStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + retryJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/RetryJob") + .setRequestMarshaller(ProtoUtils.marshaller(RetryJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(RetryJobResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listJobRunsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/ListJobRuns") + .setRequestMarshaller(ProtoUtils.marshaller(ListJobRunsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListJobRunsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getJobRunMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/GetJobRun") + .setRequestMarshaller(ProtoUtils.marshaller(GetJobRunRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(JobRun.getDefaultInstance())) + .build(); + private static final MethodDescriptor getConfigMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -246,6 +303,52 @@ public class GrpcCloudDeployStub extends CloudDeployStub { .setResponseMarshaller(ProtoUtils.marshaller(Config.getDefaultInstance())) .build(); + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + private final UnaryCallable listDeliveryPipelinesCallable; private final UnaryCallable @@ -286,6 +389,7 @@ public class GrpcCloudDeployStub extends CloudDeployStub { private final UnaryCallable createReleaseCallable; private final OperationCallable createReleaseOperationCallable; + private final UnaryCallable abandonReleaseCallable; private final UnaryCallable approveRolloutCallable; private final UnaryCallable listRolloutsCallable; private final UnaryCallable @@ -294,7 +398,20 @@ public class GrpcCloudDeployStub extends CloudDeployStub { private final UnaryCallable createRolloutCallable; private final OperationCallable createRolloutOperationCallable; + private final UnaryCallable retryJobCallable; + private final UnaryCallable listJobRunsCallable; + private final UnaryCallable + listJobRunsPagedCallable; + private final UnaryCallable getJobRunCallable; private final UnaryCallable getConfigCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -476,6 +593,17 @@ protected GrpcCloudDeployStub( return params.build(); }) .build(); + GrpcCallSettings + abandonReleaseTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(abandonReleaseMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); GrpcCallSettings approveRolloutTransportSettings = GrpcCallSettings.newBuilder() @@ -517,6 +645,36 @@ protected GrpcCloudDeployStub( return params.build(); }) .build(); + GrpcCallSettings retryJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(retryJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("rollout", String.valueOf(request.getRollout())); + return params.build(); + }) + .build(); + GrpcCallSettings listJobRunsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listJobRunsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getJobRunTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getJobRunMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); GrpcCallSettings getConfigTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getConfigMethodDescriptor) @@ -527,6 +685,57 @@ protected GrpcCloudDeployStub( return params.build(); }) .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + }) + .build(); this.listDeliveryPipelinesCallable = callableFactory.createUnaryCallable( @@ -630,6 +839,9 @@ protected GrpcCloudDeployStub( settings.createReleaseOperationSettings(), clientContext, operationsStub); + this.abandonReleaseCallable = + callableFactory.createUnaryCallable( + abandonReleaseTransportSettings, settings.abandonReleaseSettings(), clientContext); this.approveRolloutCallable = callableFactory.createUnaryCallable( approveRolloutTransportSettings, settings.approveRolloutSettings(), clientContext); @@ -651,9 +863,41 @@ protected GrpcCloudDeployStub( settings.createRolloutOperationSettings(), clientContext, operationsStub); + this.retryJobCallable = + callableFactory.createUnaryCallable( + retryJobTransportSettings, settings.retryJobSettings(), clientContext); + this.listJobRunsCallable = + callableFactory.createUnaryCallable( + listJobRunsTransportSettings, settings.listJobRunsSettings(), clientContext); + this.listJobRunsPagedCallable = + callableFactory.createPagedCallable( + listJobRunsTransportSettings, settings.listJobRunsSettings(), clientContext); + this.getJobRunCallable = + callableFactory.createUnaryCallable( + getJobRunTransportSettings, settings.getJobRunSettings(), clientContext); this.getConfigCallable = callableFactory.createUnaryCallable( getConfigTransportSettings, settings.getConfigSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -787,6 +1031,11 @@ public UnaryCallable createReleaseCallable() { return createReleaseOperationCallable; } + @Override + public UnaryCallable abandonReleaseCallable() { + return abandonReleaseCallable; + } + @Override public UnaryCallable approveRolloutCallable() { return approveRolloutCallable; @@ -818,11 +1067,63 @@ public UnaryCallable createRolloutCallable() { return createRolloutOperationCallable; } + @Override + public UnaryCallable retryJobCallable() { + return retryJobCallable; + } + + @Override + public UnaryCallable listJobRunsCallable() { + return listJobRunsCallable; + } + + @Override + public UnaryCallable listJobRunsPagedCallable() { + return listJobRunsPagedCallable; + } + + @Override + public UnaryCallable getJobRunCallable() { + return getJobRunCallable; + } + @Override public UnaryCallable getConfigCallable() { return getConfigCallable; } + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + @Override public final void close() { try { diff --git a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/HttpJsonCloudDeployStub.java b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/HttpJsonCloudDeployStub.java index b3df0fb..a223f01 100644 --- a/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/HttpJsonCloudDeployStub.java +++ b/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/HttpJsonCloudDeployStub.java @@ -17,6 +17,8 @@ package com.google.cloud.deploy.v1.stub; import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListJobRunsPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListLocationsPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListReleasesPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListRolloutsPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListTargetsPagedResponse; @@ -36,6 +38,8 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.deploy.v1.AbandonReleaseRequest; +import com.google.cloud.deploy.v1.AbandonReleaseResponse; import com.google.cloud.deploy.v1.ApproveRolloutRequest; import com.google.cloud.deploy.v1.ApproveRolloutResponse; import com.google.cloud.deploy.v1.Config; @@ -48,11 +52,15 @@ import com.google.cloud.deploy.v1.DeliveryPipeline; import com.google.cloud.deploy.v1.GetConfigRequest; import com.google.cloud.deploy.v1.GetDeliveryPipelineRequest; +import com.google.cloud.deploy.v1.GetJobRunRequest; import com.google.cloud.deploy.v1.GetReleaseRequest; import com.google.cloud.deploy.v1.GetRolloutRequest; import com.google.cloud.deploy.v1.GetTargetRequest; +import com.google.cloud.deploy.v1.JobRun; import com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest; import com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse; +import com.google.cloud.deploy.v1.ListJobRunsRequest; +import com.google.cloud.deploy.v1.ListJobRunsResponse; import com.google.cloud.deploy.v1.ListReleasesRequest; import com.google.cloud.deploy.v1.ListReleasesResponse; import com.google.cloud.deploy.v1.ListRolloutsRequest; @@ -61,10 +69,21 @@ import com.google.cloud.deploy.v1.ListTargetsResponse; import com.google.cloud.deploy.v1.OperationMetadata; import com.google.cloud.deploy.v1.Release; +import com.google.cloud.deploy.v1.RetryJobRequest; +import com.google.cloud.deploy.v1.RetryJobResponse; import com.google.cloud.deploy.v1.Rollout; import com.google.cloud.deploy.v1.Target; import com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest; import com.google.cloud.deploy.v1.UpdateTargetRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.protobuf.Empty; import com.google.protobuf.TypeRegistry; @@ -614,6 +633,42 @@ public class HttpJsonCloudDeployStub extends CloudDeployStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor + abandonReleaseMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/AbandonRelease") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}:abandon", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AbandonReleaseResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor approveRolloutMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -762,6 +817,111 @@ public class HttpJsonCloudDeployStub extends CloudDeployStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor + retryJobMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/RetryJob") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{rollout=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:retryJob", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "rollout", request.getRollout()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearRollout().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RetryJobResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listJobRunsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/ListJobRuns") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}/jobRuns", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListJobRunsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getJobRunMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/GetJobRun") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*/jobRuns/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(JobRun.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor getConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/GetConfig") @@ -794,6 +954,183 @@ public class HttpJsonCloudDeployStub extends CloudDeployStub { .build()) .build(); + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/deliveryPipelines/*}:setIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1/{resource=projects/*/locations/*/targets/*}:setIamPolicy") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/deliveryPipelines/*}:getIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1/{resource=projects/*/locations/*/targets/*}:getIamPolicy") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + testIamPermissionsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{resource=projects/*/locations/*/deliveryPipelines/*}:testIamPermissions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setAdditionalPaths( + "/v1/{resource=projects/*/locations/*/targets/*}:testIamPermissions") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(TestIamPermissionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private final UnaryCallable listDeliveryPipelinesCallable; private final UnaryCallable @@ -834,6 +1171,7 @@ public class HttpJsonCloudDeployStub extends CloudDeployStub { private final UnaryCallable createReleaseCallable; private final OperationCallable createReleaseOperationCallable; + private final UnaryCallable abandonReleaseCallable; private final UnaryCallable approveRolloutCallable; private final UnaryCallable listRolloutsCallable; private final UnaryCallable @@ -842,7 +1180,20 @@ public class HttpJsonCloudDeployStub extends CloudDeployStub { private final UnaryCallable createRolloutCallable; private final OperationCallable createRolloutOperationCallable; + private final UnaryCallable retryJobCallable; + private final UnaryCallable listJobRunsCallable; + private final UnaryCallable + listJobRunsPagedCallable; + private final UnaryCallable getJobRunCallable; private final UnaryCallable getConfigCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; private final BackgroundResource backgroundResources; private final HttpJsonOperationsStub httpJsonOperationsStub; @@ -960,6 +1311,12 @@ protected HttpJsonCloudDeployStub( .setMethodDescriptor(createReleaseMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); + HttpJsonCallSettings + abandonReleaseTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(abandonReleaseMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); HttpJsonCallSettings approveRolloutTransportSettings = HttpJsonCallSettings.newBuilder() @@ -981,11 +1338,53 @@ protected HttpJsonCloudDeployStub( .setMethodDescriptor(createRolloutMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); + HttpJsonCallSettings retryJobTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(retryJobMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listJobRunsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listJobRunsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getJobRunTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getJobRunMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); HttpJsonCallSettings getConfigTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getConfigMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings setIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + testIamPermissionsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); this.listDeliveryPipelinesCallable = callableFactory.createUnaryCallable( @@ -1089,6 +1488,9 @@ protected HttpJsonCloudDeployStub( settings.createReleaseOperationSettings(), clientContext, httpJsonOperationsStub); + this.abandonReleaseCallable = + callableFactory.createUnaryCallable( + abandonReleaseTransportSettings, settings.abandonReleaseSettings(), clientContext); this.approveRolloutCallable = callableFactory.createUnaryCallable( approveRolloutTransportSettings, settings.approveRolloutSettings(), clientContext); @@ -1110,9 +1512,41 @@ protected HttpJsonCloudDeployStub( settings.createRolloutOperationSettings(), clientContext, httpJsonOperationsStub); + this.retryJobCallable = + callableFactory.createUnaryCallable( + retryJobTransportSettings, settings.retryJobSettings(), clientContext); + this.listJobRunsCallable = + callableFactory.createUnaryCallable( + listJobRunsTransportSettings, settings.listJobRunsSettings(), clientContext); + this.listJobRunsPagedCallable = + callableFactory.createPagedCallable( + listJobRunsTransportSettings, settings.listJobRunsSettings(), clientContext); + this.getJobRunCallable = + callableFactory.createUnaryCallable( + getJobRunTransportSettings, settings.getJobRunSettings(), clientContext); this.getConfigCallable = callableFactory.createUnaryCallable( getConfigTransportSettings, settings.getConfigSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -1134,11 +1568,20 @@ public static List getMethodDescriptors() { methodDescriptors.add(listReleasesMethodDescriptor); methodDescriptors.add(getReleaseMethodDescriptor); methodDescriptors.add(createReleaseMethodDescriptor); + methodDescriptors.add(abandonReleaseMethodDescriptor); methodDescriptors.add(approveRolloutMethodDescriptor); methodDescriptors.add(listRolloutsMethodDescriptor); methodDescriptors.add(getRolloutMethodDescriptor); methodDescriptors.add(createRolloutMethodDescriptor); + methodDescriptors.add(retryJobMethodDescriptor); + methodDescriptors.add(listJobRunsMethodDescriptor); + methodDescriptors.add(getJobRunMethodDescriptor); methodDescriptors.add(getConfigMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + methodDescriptors.add(setIamPolicyMethodDescriptor); + methodDescriptors.add(getIamPolicyMethodDescriptor); + methodDescriptors.add(testIamPermissionsMethodDescriptor); return methodDescriptors; } @@ -1270,6 +1713,11 @@ public UnaryCallable createReleaseCallable() { return createReleaseOperationCallable; } + @Override + public UnaryCallable abandonReleaseCallable() { + return abandonReleaseCallable; + } + @Override public UnaryCallable approveRolloutCallable() { return approveRolloutCallable; @@ -1301,11 +1749,63 @@ public UnaryCallable createRolloutCallable() { return createRolloutOperationCallable; } + @Override + public UnaryCallable retryJobCallable() { + return retryJobCallable; + } + + @Override + public UnaryCallable listJobRunsCallable() { + return listJobRunsCallable; + } + + @Override + public UnaryCallable listJobRunsPagedCallable() { + return listJobRunsPagedCallable; + } + + @Override + public UnaryCallable getJobRunCallable() { + return getJobRunCallable; + } + @Override public UnaryCallable getConfigCallable() { return getConfigCallable; } + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + @Override public final void close() { try { diff --git a/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientHttpJsonTest.java b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientHttpJsonTest.java index 74dd5e3..f2d7f2f 100644 --- a/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientHttpJsonTest.java +++ b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientHttpJsonTest.java @@ -17,6 +17,8 @@ package com.google.cloud.deploy.v1; import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListJobRunsPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListLocationsPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListReleasesPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListRolloutsPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListTargetsPagedResponse; @@ -31,9 +33,22 @@ import com.google.api.gax.rpc.StatusCode; import com.google.api.gax.rpc.testing.FakeStatusCode; import com.google.cloud.deploy.v1.stub.HttpJsonCloudDeployStub; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.protobuf.Any; +import com.google.protobuf.ByteString; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; @@ -201,6 +216,7 @@ public void getDeliveryPipelineTest() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setCondition(PipelineCondition.newBuilder().build()) .setEtag("etag3123477") + .setSuspended(true) .build(); mockService.addResponse(expectedResponse); @@ -257,6 +273,7 @@ public void getDeliveryPipelineTest2() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setCondition(PipelineCondition.newBuilder().build()) .setEtag("etag3123477") + .setSuspended(true) .build(); mockService.addResponse(expectedResponse); @@ -313,6 +330,7 @@ public void createDeliveryPipelineTest() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setCondition(PipelineCondition.newBuilder().build()) .setEtag("etag3123477") + .setSuspended(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -377,6 +395,7 @@ public void createDeliveryPipelineTest2() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setCondition(PipelineCondition.newBuilder().build()) .setEtag("etag3123477") + .setSuspended(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -441,6 +460,7 @@ public void updateDeliveryPipelineTest() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setCondition(PipelineCondition.newBuilder().build()) .setEtag("etag3123477") + .setSuspended(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -463,6 +483,7 @@ public void updateDeliveryPipelineTest() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setCondition(PipelineCondition.newBuilder().build()) .setEtag("etag3123477") + .setSuspended(true) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -506,6 +527,7 @@ public void updateDeliveryPipelineExceptionTest() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setCondition(PipelineCondition.newBuilder().build()) .setEtag("etag3123477") + .setSuspended(true) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateDeliveryPipelineAsync(deliveryPipeline, updateMask).get(); @@ -1234,6 +1256,7 @@ public void getReleaseTest() throws Exception { .setDescription("description-1724546052") .putAllAnnotations(new HashMap()) .putAllLabels(new HashMap()) + .setAbandoned(true) .setCreateTime(Timestamp.newBuilder().build()) .setRenderStartTime(Timestamp.newBuilder().build()) .setRenderEndTime(Timestamp.newBuilder().build()) @@ -1298,6 +1321,7 @@ public void getReleaseTest2() throws Exception { .setDescription("description-1724546052") .putAllAnnotations(new HashMap()) .putAllLabels(new HashMap()) + .setAbandoned(true) .setCreateTime(Timestamp.newBuilder().build()) .setRenderStartTime(Timestamp.newBuilder().build()) .setRenderEndTime(Timestamp.newBuilder().build()) @@ -1362,6 +1386,7 @@ public void createReleaseTest() throws Exception { .setDescription("description-1724546052") .putAllAnnotations(new HashMap()) .putAllLabels(new HashMap()) + .setAbandoned(true) .setCreateTime(Timestamp.newBuilder().build()) .setRenderStartTime(Timestamp.newBuilder().build()) .setRenderEndTime(Timestamp.newBuilder().build()) @@ -1435,6 +1460,7 @@ public void createReleaseTest2() throws Exception { .setDescription("description-1724546052") .putAllAnnotations(new HashMap()) .putAllLabels(new HashMap()) + .setAbandoned(true) .setCreateTime(Timestamp.newBuilder().build()) .setRenderStartTime(Timestamp.newBuilder().build()) .setRenderEndTime(Timestamp.newBuilder().build()) @@ -1497,6 +1523,92 @@ public void createReleaseExceptionTest2() throws Exception { } } + @Test + public void abandonReleaseTest() throws Exception { + AbandonReleaseResponse expectedResponse = AbandonReleaseResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ReleaseName name = + ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]"); + + AbandonReleaseResponse actualResponse = client.abandonRelease(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void abandonReleaseExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ReleaseName name = + ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]"); + client.abandonRelease(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void abandonReleaseTest2() throws Exception { + AbandonReleaseResponse expectedResponse = AbandonReleaseResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-835/locations/location-835/deliveryPipelines/deliveryPipeline-835/releases/release-835"; + + AbandonReleaseResponse actualResponse = client.abandonRelease(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void abandonReleaseExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-835/locations/location-835/deliveryPipelines/deliveryPipeline-835/releases/release-835"; + client.abandonRelease(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void approveRolloutTest() throws Exception { ApproveRolloutResponse expectedResponse = ApproveRolloutResponse.newBuilder().build(); @@ -1709,6 +1821,8 @@ public void getRolloutTest() throws Exception { .setFailureReason("failureReason-1990598546") .setDeployingBuild("deployingBuild-1935837805") .setEtag("etag3123477") + .addAllPhases(new ArrayList()) + .setMetadata(Metadata.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -1772,6 +1886,8 @@ public void getRolloutTest2() throws Exception { .setFailureReason("failureReason-1990598546") .setDeployingBuild("deployingBuild-1935837805") .setEtag("etag3123477") + .addAllPhases(new ArrayList()) + .setMetadata(Metadata.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -1834,6 +1950,8 @@ public void createRolloutTest() throws Exception { .setFailureReason("failureReason-1990598546") .setDeployingBuild("deployingBuild-1935837805") .setEtag("etag3123477") + .addAllPhases(new ArrayList()) + .setMetadata(Metadata.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1905,6 +2023,8 @@ public void createRolloutTest2() throws Exception { .setFailureReason("failureReason-1990598546") .setDeployingBuild("deployingBuild-1935837805") .setEtag("etag3123477") + .addAllPhases(new ArrayList()) + .setMetadata(Metadata.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1955,6 +2075,340 @@ public void createRolloutExceptionTest2() throws Exception { } } + @Test + public void retryJobTest() throws Exception { + RetryJobResponse expectedResponse = RetryJobResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + RolloutName rollout = + RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]"); + String phaseId = "phaseId-608264202"; + String jobId = "jobId101296568"; + + RetryJobResponse actualResponse = client.retryJob(rollout, phaseId, jobId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void retryJobExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RolloutName rollout = + RolloutName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]"); + String phaseId = "phaseId-608264202"; + String jobId = "jobId101296568"; + client.retryJob(rollout, phaseId, jobId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void retryJobTest2() throws Exception { + RetryJobResponse expectedResponse = RetryJobResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String rollout = + "projects/project-9649/locations/location-9649/deliveryPipelines/deliveryPipeline-9649/releases/release-9649/rollouts/rollout-9649"; + String phaseId = "phaseId-608264202"; + String jobId = "jobId101296568"; + + RetryJobResponse actualResponse = client.retryJob(rollout, phaseId, jobId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void retryJobExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String rollout = + "projects/project-9649/locations/location-9649/deliveryPipelines/deliveryPipeline-9649/releases/release-9649/rollouts/rollout-9649"; + String phaseId = "phaseId-608264202"; + String jobId = "jobId101296568"; + client.retryJob(rollout, phaseId, jobId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listJobRunsTest() throws Exception { + JobRun responsesElement = JobRun.newBuilder().build(); + ListJobRunsResponse expectedResponse = + ListJobRunsResponse.newBuilder() + .setNextPageToken("") + .addAllJobRuns(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + RolloutName parent = + RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]"); + + ListJobRunsPagedResponse pagedListResponse = client.listJobRuns(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobRunsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listJobRunsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RolloutName parent = + RolloutName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]"); + client.listJobRuns(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listJobRunsTest2() throws Exception { + JobRun responsesElement = JobRun.newBuilder().build(); + ListJobRunsResponse expectedResponse = + ListJobRunsResponse.newBuilder() + .setNextPageToken("") + .addAllJobRuns(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-2488/locations/location-2488/deliveryPipelines/deliveryPipeline-2488/releases/release-2488/rollouts/rollout-2488"; + + ListJobRunsPagedResponse pagedListResponse = client.listJobRuns(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobRunsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listJobRunsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-2488/locations/location-2488/deliveryPipelines/deliveryPipeline-2488/releases/release-2488/rollouts/rollout-2488"; + client.listJobRuns(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getJobRunTest() throws Exception { + JobRun expectedResponse = + JobRun.newBuilder() + .setName( + JobRunName.of( + "[PROJECT]", + "[LOCATION]", + "[DELIVERY_PIPELINE]", + "[RELEASE]", + "[ROLLOUT]", + "[JOB_RUN]") + .toString()) + .setUid("uid115792") + .setPhaseId("phaseId-608264202") + .setJobId("jobId101296568") + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + mockService.addResponse(expectedResponse); + + JobRunName name = + JobRunName.of( + "[PROJECT]", + "[LOCATION]", + "[DELIVERY_PIPELINE]", + "[RELEASE]", + "[ROLLOUT]", + "[JOB_RUN]"); + + JobRun actualResponse = client.getJobRun(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getJobRunExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + JobRunName name = + JobRunName.of( + "[PROJECT]", + "[LOCATION]", + "[DELIVERY_PIPELINE]", + "[RELEASE]", + "[ROLLOUT]", + "[JOB_RUN]"); + client.getJobRun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getJobRunTest2() throws Exception { + JobRun expectedResponse = + JobRun.newBuilder() + .setName( + JobRunName.of( + "[PROJECT]", + "[LOCATION]", + "[DELIVERY_PIPELINE]", + "[RELEASE]", + "[ROLLOUT]", + "[JOB_RUN]") + .toString()) + .setUid("uid115792") + .setPhaseId("phaseId-608264202") + .setJobId("jobId101296568") + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-5930/locations/location-5930/deliveryPipelines/deliveryPipeline-5930/releases/release-5930/rollouts/rollout-5930/jobRuns/jobRun-5930"; + + JobRun actualResponse = client.getJobRun(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getJobRunExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-5930/locations/location-5930/deliveryPipelines/deliveryPipeline-5930/releases/release-5930/rollouts/rollout-5930/jobRuns/jobRun-5930"; + client.getJobRun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void getConfigTest() throws Exception { Config expectedResponse = @@ -2046,4 +2500,294 @@ public void getConfigExceptionTest2() throws Exception { // Expected exception. } } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientTest.java b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientTest.java index ca1a73d..ffe3d9c 100644 --- a/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientTest.java +++ b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientTest.java @@ -17,6 +17,8 @@ package com.google.cloud.deploy.v1; import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListJobRunsPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListLocationsPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListReleasesPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListRolloutsPagedResponse; import static com.google.cloud.deploy.v1.CloudDeployClient.ListTargetsPagedResponse; @@ -29,10 +31,23 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; +import com.google.protobuf.ByteString; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; @@ -55,6 +70,8 @@ @Generated("by gapic-generator-java") public class CloudDeployClientTest { private static MockCloudDeploy mockCloudDeploy; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; private static MockServiceHelper mockServiceHelper; private LocalChannelProvider channelProvider; private CloudDeployClient client; @@ -62,9 +79,12 @@ public class CloudDeployClientTest { @BeforeClass public static void startStaticServer() { mockCloudDeploy = new MockCloudDeploy(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); mockServiceHelper = new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockCloudDeploy)); + UUID.randomUUID().toString(), + Arrays.asList(mockCloudDeploy, mockLocations, mockIAMPolicy)); mockServiceHelper.start(); } @@ -195,6 +215,7 @@ public void getDeliveryPipelineTest() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setCondition(PipelineCondition.newBuilder().build()) .setEtag("etag3123477") + .setSuspended(true) .build(); mockCloudDeploy.addResponse(expectedResponse); @@ -245,6 +266,7 @@ public void getDeliveryPipelineTest2() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setCondition(PipelineCondition.newBuilder().build()) .setEtag("etag3123477") + .setSuspended(true) .build(); mockCloudDeploy.addResponse(expectedResponse); @@ -293,6 +315,7 @@ public void createDeliveryPipelineTest() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setCondition(PipelineCondition.newBuilder().build()) .setEtag("etag3123477") + .setSuspended(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -357,6 +380,7 @@ public void createDeliveryPipelineTest2() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setCondition(PipelineCondition.newBuilder().build()) .setEtag("etag3123477") + .setSuspended(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -421,6 +445,7 @@ public void updateDeliveryPipelineTest() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setCondition(PipelineCondition.newBuilder().build()) .setEtag("etag3123477") + .setSuspended(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -1107,6 +1132,7 @@ public void getReleaseTest() throws Exception { .setDescription("description-1724546052") .putAllAnnotations(new HashMap()) .putAllLabels(new HashMap()) + .setAbandoned(true) .setCreateTime(Timestamp.newBuilder().build()) .setRenderStartTime(Timestamp.newBuilder().build()) .setRenderEndTime(Timestamp.newBuilder().build()) @@ -1165,6 +1191,7 @@ public void getReleaseTest2() throws Exception { .setDescription("description-1724546052") .putAllAnnotations(new HashMap()) .putAllLabels(new HashMap()) + .setAbandoned(true) .setCreateTime(Timestamp.newBuilder().build()) .setRenderStartTime(Timestamp.newBuilder().build()) .setRenderEndTime(Timestamp.newBuilder().build()) @@ -1221,6 +1248,7 @@ public void createReleaseTest() throws Exception { .setDescription("description-1724546052") .putAllAnnotations(new HashMap()) .putAllLabels(new HashMap()) + .setAbandoned(true) .setCreateTime(Timestamp.newBuilder().build()) .setRenderStartTime(Timestamp.newBuilder().build()) .setRenderEndTime(Timestamp.newBuilder().build()) @@ -1293,6 +1321,7 @@ public void createReleaseTest2() throws Exception { .setDescription("description-1724546052") .putAllAnnotations(new HashMap()) .putAllLabels(new HashMap()) + .setAbandoned(true) .setCreateTime(Timestamp.newBuilder().build()) .setRenderStartTime(Timestamp.newBuilder().build()) .setRenderEndTime(Timestamp.newBuilder().build()) @@ -1352,6 +1381,78 @@ public void createReleaseExceptionTest2() throws Exception { } } + @Test + public void abandonReleaseTest() throws Exception { + AbandonReleaseResponse expectedResponse = AbandonReleaseResponse.newBuilder().build(); + mockCloudDeploy.addResponse(expectedResponse); + + ReleaseName name = + ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]"); + + AbandonReleaseResponse actualResponse = client.abandonRelease(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AbandonReleaseRequest actualRequest = ((AbandonReleaseRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void abandonReleaseExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + ReleaseName name = + ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]"); + client.abandonRelease(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void abandonReleaseTest2() throws Exception { + AbandonReleaseResponse expectedResponse = AbandonReleaseResponse.newBuilder().build(); + mockCloudDeploy.addResponse(expectedResponse); + + String name = "name3373707"; + + AbandonReleaseResponse actualResponse = client.abandonRelease(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AbandonReleaseRequest actualRequest = ((AbandonReleaseRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void abandonReleaseExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String name = "name3373707"; + client.abandonRelease(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void approveRolloutTest() throws Exception { ApproveRolloutResponse expectedResponse = ApproveRolloutResponse.newBuilder().build(); @@ -1536,6 +1637,8 @@ public void getRolloutTest() throws Exception { .setFailureReason("failureReason-1990598546") .setDeployingBuild("deployingBuild-1935837805") .setEtag("etag3123477") + .addAllPhases(new ArrayList()) + .setMetadata(Metadata.newBuilder().build()) .build(); mockCloudDeploy.addResponse(expectedResponse); @@ -1593,6 +1696,8 @@ public void getRolloutTest2() throws Exception { .setFailureReason("failureReason-1990598546") .setDeployingBuild("deployingBuild-1935837805") .setEtag("etag3123477") + .addAllPhases(new ArrayList()) + .setMetadata(Metadata.newBuilder().build()) .build(); mockCloudDeploy.addResponse(expectedResponse); @@ -1647,6 +1752,8 @@ public void createRolloutTest() throws Exception { .setFailureReason("failureReason-1990598546") .setDeployingBuild("deployingBuild-1935837805") .setEtag("etag3123477") + .addAllPhases(new ArrayList()) + .setMetadata(Metadata.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1717,6 +1824,8 @@ public void createRolloutTest2() throws Exception { .setFailureReason("failureReason-1990598546") .setDeployingBuild("deployingBuild-1935837805") .setEtag("etag3123477") + .addAllPhases(new ArrayList()) + .setMetadata(Metadata.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1764,6 +1873,302 @@ public void createRolloutExceptionTest2() throws Exception { } } + @Test + public void retryJobTest() throws Exception { + RetryJobResponse expectedResponse = RetryJobResponse.newBuilder().build(); + mockCloudDeploy.addResponse(expectedResponse); + + RolloutName rollout = + RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]"); + String phaseId = "phaseId-608264202"; + String jobId = "jobId101296568"; + + RetryJobResponse actualResponse = client.retryJob(rollout, phaseId, jobId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RetryJobRequest actualRequest = ((RetryJobRequest) actualRequests.get(0)); + + Assert.assertEquals(rollout.toString(), actualRequest.getRollout()); + Assert.assertEquals(phaseId, actualRequest.getPhaseId()); + Assert.assertEquals(jobId, actualRequest.getJobId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void retryJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + RolloutName rollout = + RolloutName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]"); + String phaseId = "phaseId-608264202"; + String jobId = "jobId101296568"; + client.retryJob(rollout, phaseId, jobId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void retryJobTest2() throws Exception { + RetryJobResponse expectedResponse = RetryJobResponse.newBuilder().build(); + mockCloudDeploy.addResponse(expectedResponse); + + String rollout = "rollout1377108401"; + String phaseId = "phaseId-608264202"; + String jobId = "jobId101296568"; + + RetryJobResponse actualResponse = client.retryJob(rollout, phaseId, jobId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RetryJobRequest actualRequest = ((RetryJobRequest) actualRequests.get(0)); + + Assert.assertEquals(rollout, actualRequest.getRollout()); + Assert.assertEquals(phaseId, actualRequest.getPhaseId()); + Assert.assertEquals(jobId, actualRequest.getJobId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void retryJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String rollout = "rollout1377108401"; + String phaseId = "phaseId-608264202"; + String jobId = "jobId101296568"; + client.retryJob(rollout, phaseId, jobId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listJobRunsTest() throws Exception { + JobRun responsesElement = JobRun.newBuilder().build(); + ListJobRunsResponse expectedResponse = + ListJobRunsResponse.newBuilder() + .setNextPageToken("") + .addAllJobRuns(Arrays.asList(responsesElement)) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + RolloutName parent = + RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]"); + + ListJobRunsPagedResponse pagedListResponse = client.listJobRuns(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobRunsList().get(0), resources.get(0)); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListJobRunsRequest actualRequest = ((ListJobRunsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listJobRunsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + RolloutName parent = + RolloutName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]"); + client.listJobRuns(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listJobRunsTest2() throws Exception { + JobRun responsesElement = JobRun.newBuilder().build(); + ListJobRunsResponse expectedResponse = + ListJobRunsResponse.newBuilder() + .setNextPageToken("") + .addAllJobRuns(Arrays.asList(responsesElement)) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListJobRunsPagedResponse pagedListResponse = client.listJobRuns(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getJobRunsList().get(0), resources.get(0)); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListJobRunsRequest actualRequest = ((ListJobRunsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listJobRunsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String parent = "parent-995424086"; + client.listJobRuns(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getJobRunTest() throws Exception { + JobRun expectedResponse = + JobRun.newBuilder() + .setName( + JobRunName.of( + "[PROJECT]", + "[LOCATION]", + "[DELIVERY_PIPELINE]", + "[RELEASE]", + "[ROLLOUT]", + "[JOB_RUN]") + .toString()) + .setUid("uid115792") + .setPhaseId("phaseId-608264202") + .setJobId("jobId101296568") + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + JobRunName name = + JobRunName.of( + "[PROJECT]", + "[LOCATION]", + "[DELIVERY_PIPELINE]", + "[RELEASE]", + "[ROLLOUT]", + "[JOB_RUN]"); + + JobRun actualResponse = client.getJobRun(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetJobRunRequest actualRequest = ((GetJobRunRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getJobRunExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + JobRunName name = + JobRunName.of( + "[PROJECT]", + "[LOCATION]", + "[DELIVERY_PIPELINE]", + "[RELEASE]", + "[ROLLOUT]", + "[JOB_RUN]"); + client.getJobRun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getJobRunTest2() throws Exception { + JobRun expectedResponse = + JobRun.newBuilder() + .setName( + JobRunName.of( + "[PROJECT]", + "[LOCATION]", + "[DELIVERY_PIPELINE]", + "[RELEASE]", + "[ROLLOUT]", + "[JOB_RUN]") + .toString()) + .setUid("uid115792") + .setPhaseId("phaseId-608264202") + .setJobId("jobId101296568") + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + String name = "name3373707"; + + JobRun actualResponse = client.getJobRun(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetJobRunRequest actualRequest = ((GetJobRunRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getJobRunExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String name = "name3373707"; + client.getJobRun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void getConfigTest() throws Exception { Config expectedResponse = @@ -1843,4 +2248,265 @@ public void getConfigExceptionTest2() throws Exception { // Expected exception. } } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockCloudDeployImpl.java b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockCloudDeployImpl.java index 5cf008d..e00ea85 100644 --- a/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockCloudDeployImpl.java +++ b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockCloudDeployImpl.java @@ -331,6 +331,27 @@ public void createRelease( } } + @Override + public void abandonRelease( + AbandonReleaseRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AbandonReleaseResponse) { + requests.add(request); + responseObserver.onNext(((AbandonReleaseResponse) 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 AbandonRelease, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AbandonReleaseResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void approveRollout( ApproveRolloutRequest request, StreamObserver responseObserver) { @@ -414,6 +435,67 @@ public void createRollout( } } + @Override + public void retryJob(RetryJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RetryJobResponse) { + requests.add(request); + responseObserver.onNext(((RetryJobResponse) 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 RetryJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RetryJobResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listJobRuns( + ListJobRunsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListJobRunsResponse) { + requests.add(request); + responseObserver.onNext(((ListJobRunsResponse) 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 ListJobRuns, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListJobRunsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getJobRun(GetJobRunRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof JobRun) { + requests.add(request); + responseObserver.onNext(((JobRun) 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 GetJobRun, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + JobRun.class.getName(), + Exception.class.getName()))); + } + } + @Override public void getConfig(GetConfigRequest request, StreamObserver responseObserver) { Object response = responses.poll(); diff --git a/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockIAMPolicy.java b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockIAMPolicy.java new file mode 100644 index 0000000..e83906d --- /dev/null +++ b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockIAMPolicy.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockIAMPolicy implements MockGrpcService { + private final MockIAMPolicyImpl serviceImpl; + + public MockIAMPolicy() { + serviceImpl = new MockIAMPolicyImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockIAMPolicyImpl.java b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockIAMPolicyImpl.java new file mode 100644 index 0000000..770ad92 --- /dev/null +++ b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockIAMPolicyImpl.java @@ -0,0 +1,127 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1; + +import com.google.api.core.BetaApi; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.IAMPolicyGrpc.IAMPolicyImplBase; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockIAMPolicyImpl extends IAMPolicyImplBase { + private List requests; + private Queue responses; + + public MockIAMPolicyImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void testIamPermissions( + TestIamPermissionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TestIamPermissionsResponse) { + requests.add(request); + responseObserver.onNext(((TestIamPermissionsResponse) 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 TestIamPermissions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TestIamPermissionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void setIamPolicy(SetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) 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 SetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getIamPolicy(GetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) 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 GetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockLocations.java b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockLocations.java new file mode 100644 index 0000000..1ffa72c --- /dev/null +++ b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockLocationsImpl.java b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockLocationsImpl.java new file mode 100644 index 0000000..6685ed3 --- /dev/null +++ b/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) 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 ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) 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 GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/grpc-google-cloud-deploy-v1/pom.xml b/grpc-google-cloud-deploy-v1/pom.xml index 9cf8a0f..8f69795 100644 --- a/grpc-google-cloud-deploy-v1/pom.xml +++ b/grpc-google-cloud-deploy-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-deploy-v1 - 1.1.7 + 1.1.8 grpc-google-cloud-deploy-v1 GRPC library for google-cloud-deploy com.google.cloud google-cloud-deploy-parent - 1.1.7 + 1.1.8 diff --git a/grpc-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployGrpc.java b/grpc-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployGrpc.java index f338fb2..feaf40b 100644 --- a/grpc-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployGrpc.java +++ b/grpc-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployGrpc.java @@ -613,6 +613,53 @@ private CloudDeployGrpc() {} return getCreateReleaseMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.AbandonReleaseRequest, + com.google.cloud.deploy.v1.AbandonReleaseResponse> + getAbandonReleaseMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AbandonRelease", + requestType = com.google.cloud.deploy.v1.AbandonReleaseRequest.class, + responseType = com.google.cloud.deploy.v1.AbandonReleaseResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.AbandonReleaseRequest, + com.google.cloud.deploy.v1.AbandonReleaseResponse> + getAbandonReleaseMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.AbandonReleaseRequest, + com.google.cloud.deploy.v1.AbandonReleaseResponse> + getAbandonReleaseMethod; + if ((getAbandonReleaseMethod = CloudDeployGrpc.getAbandonReleaseMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getAbandonReleaseMethod = CloudDeployGrpc.getAbandonReleaseMethod) == null) { + CloudDeployGrpc.getAbandonReleaseMethod = + getAbandonReleaseMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AbandonRelease")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.AbandonReleaseRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.AbandonReleaseResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudDeployMethodDescriptorSupplier("AbandonRelease")) + .build(); + } + } + } + return getAbandonReleaseMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.deploy.v1.ApproveRolloutRequest, com.google.cloud.deploy.v1.ApproveRolloutResponse> @@ -786,6 +833,132 @@ private CloudDeployGrpc() {} return getCreateRolloutMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.RetryJobRequest, com.google.cloud.deploy.v1.RetryJobResponse> + getRetryJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RetryJob", + requestType = com.google.cloud.deploy.v1.RetryJobRequest.class, + responseType = com.google.cloud.deploy.v1.RetryJobResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.RetryJobRequest, com.google.cloud.deploy.v1.RetryJobResponse> + getRetryJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.RetryJobRequest, com.google.cloud.deploy.v1.RetryJobResponse> + getRetryJobMethod; + if ((getRetryJobMethod = CloudDeployGrpc.getRetryJobMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getRetryJobMethod = CloudDeployGrpc.getRetryJobMethod) == null) { + CloudDeployGrpc.getRetryJobMethod = + getRetryJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RetryJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.RetryJobRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.RetryJobResponse.getDefaultInstance())) + .setSchemaDescriptor(new CloudDeployMethodDescriptorSupplier("RetryJob")) + .build(); + } + } + } + return getRetryJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListJobRunsRequest, + com.google.cloud.deploy.v1.ListJobRunsResponse> + getListJobRunsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListJobRuns", + requestType = com.google.cloud.deploy.v1.ListJobRunsRequest.class, + responseType = com.google.cloud.deploy.v1.ListJobRunsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListJobRunsRequest, + com.google.cloud.deploy.v1.ListJobRunsResponse> + getListJobRunsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListJobRunsRequest, + com.google.cloud.deploy.v1.ListJobRunsResponse> + getListJobRunsMethod; + if ((getListJobRunsMethod = CloudDeployGrpc.getListJobRunsMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getListJobRunsMethod = CloudDeployGrpc.getListJobRunsMethod) == null) { + CloudDeployGrpc.getListJobRunsMethod = + getListJobRunsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListJobRuns")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.ListJobRunsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.ListJobRunsResponse.getDefaultInstance())) + .setSchemaDescriptor(new CloudDeployMethodDescriptorSupplier("ListJobRuns")) + .build(); + } + } + } + return getListJobRunsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetJobRunRequest, com.google.cloud.deploy.v1.JobRun> + getGetJobRunMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetJobRun", + requestType = com.google.cloud.deploy.v1.GetJobRunRequest.class, + responseType = com.google.cloud.deploy.v1.JobRun.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetJobRunRequest, com.google.cloud.deploy.v1.JobRun> + getGetJobRunMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetJobRunRequest, com.google.cloud.deploy.v1.JobRun> + getGetJobRunMethod; + if ((getGetJobRunMethod = CloudDeployGrpc.getGetJobRunMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getGetJobRunMethod = CloudDeployGrpc.getGetJobRunMethod) == null) { + CloudDeployGrpc.getGetJobRunMethod = + getGetJobRunMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetJobRun")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.GetJobRunRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.JobRun.getDefaultInstance())) + .setSchemaDescriptor(new CloudDeployMethodDescriptorSupplier("GetJobRun")) + .build(); + } + } + } + return getGetJobRunMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.deploy.v1.GetConfigRequest, com.google.cloud.deploy.v1.Config> getGetConfigMethod; @@ -1060,6 +1233,21 @@ public void createRelease( getCreateReleaseMethod(), responseObserver); } + /** + * + * + *
+     * Abandons a Release in the Delivery Pipeline.
+     * 
+ */ + public void abandonRelease( + com.google.cloud.deploy.v1.AbandonReleaseRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getAbandonReleaseMethod(), responseObserver); + } + /** * * @@ -1117,6 +1305,47 @@ public void createRollout( getCreateRolloutMethod(), responseObserver); } + /** + * + * + *
+     * Retries the specified Job in a Rollout.
+     * 
+ */ + public void retryJob( + com.google.cloud.deploy.v1.RetryJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRetryJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists JobRuns in a given project and location.
+     * 
+ */ + public void listJobRuns( + com.google.cloud.deploy.v1.ListJobRunsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListJobRunsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single JobRun.
+     * 
+ */ + public void getJobRun( + com.google.cloud.deploy.v1.GetJobRunRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetJobRunMethod(), responseObserver); + } + /** * * @@ -1214,6 +1443,13 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.deploy.v1.CreateReleaseRequest, com.google.longrunning.Operation>(this, METHODID_CREATE_RELEASE))) + .addMethod( + getAbandonReleaseMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.AbandonReleaseRequest, + com.google.cloud.deploy.v1.AbandonReleaseResponse>( + this, METHODID_ABANDON_RELEASE))) .addMethod( getApproveRolloutMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1240,6 +1476,25 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.deploy.v1.CreateRolloutRequest, com.google.longrunning.Operation>(this, METHODID_CREATE_ROLLOUT))) + .addMethod( + getRetryJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.RetryJobRequest, + com.google.cloud.deploy.v1.RetryJobResponse>(this, METHODID_RETRY_JOB))) + .addMethod( + getListJobRunsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.ListJobRunsRequest, + com.google.cloud.deploy.v1.ListJobRunsResponse>( + this, METHODID_LIST_JOB_RUNS))) + .addMethod( + getGetJobRunMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.GetJobRunRequest, + com.google.cloud.deploy.v1.JobRun>(this, METHODID_GET_JOB_RUN))) .addMethod( getGetConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1476,6 +1731,23 @@ public void createRelease( responseObserver); } + /** + * + * + *
+     * Abandons a Release in the Delivery Pipeline.
+     * 
+ */ + public void abandonRelease( + com.google.cloud.deploy.v1.AbandonReleaseRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getAbandonReleaseMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1540,6 +1812,51 @@ public void createRollout( responseObserver); } + /** + * + * + *
+     * Retries the specified Job in a Rollout.
+     * 
+ */ + public void retryJob( + com.google.cloud.deploy.v1.RetryJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRetryJobMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists JobRuns in a given project and location.
+     * 
+ */ + public void listJobRuns( + com.google.cloud.deploy.v1.ListJobRunsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListJobRunsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single JobRun.
+     * 
+ */ + public void getJobRun( + com.google.cloud.deploy.v1.GetJobRunRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetJobRunMethod(), getCallOptions()), request, responseObserver); + } + /** * * @@ -1744,6 +2061,19 @@ public com.google.longrunning.Operation createRelease( getChannel(), getCreateReleaseMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Abandons a Release in the Delivery Pipeline.
+     * 
+ */ + public com.google.cloud.deploy.v1.AbandonReleaseResponse abandonRelease( + com.google.cloud.deploy.v1.AbandonReleaseRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getAbandonReleaseMethod(), getCallOptions(), request); + } + /** * * @@ -1796,6 +2126,45 @@ public com.google.longrunning.Operation createRollout( getChannel(), getCreateRolloutMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Retries the specified Job in a Rollout.
+     * 
+ */ + public com.google.cloud.deploy.v1.RetryJobResponse retryJob( + com.google.cloud.deploy.v1.RetryJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRetryJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists JobRuns in a given project and location.
+     * 
+ */ + public com.google.cloud.deploy.v1.ListJobRunsResponse listJobRuns( + com.google.cloud.deploy.v1.ListJobRunsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListJobRunsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single JobRun.
+     * 
+ */ + public com.google.cloud.deploy.v1.JobRun getJobRun( + com.google.cloud.deploy.v1.GetJobRunRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetJobRunMethod(), getCallOptions(), request); + } + /** * * @@ -2003,6 +2372,20 @@ protected CloudDeployFutureStub build( getChannel().newCall(getCreateReleaseMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Abandons a Release in the Delivery Pipeline.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.deploy.v1.AbandonReleaseResponse> + abandonRelease(com.google.cloud.deploy.v1.AbandonReleaseRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getAbandonReleaseMethod(), getCallOptions()), request); + } + /** * * @@ -2057,6 +2440,47 @@ protected CloudDeployFutureStub build( getChannel().newCall(getCreateRolloutMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Retries the specified Job in a Rollout.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.deploy.v1.RetryJobResponse> + retryJob(com.google.cloud.deploy.v1.RetryJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRetryJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists JobRuns in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.deploy.v1.ListJobRunsResponse> + listJobRuns(com.google.cloud.deploy.v1.ListJobRunsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListJobRunsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single JobRun.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getJobRun(com.google.cloud.deploy.v1.GetJobRunRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetJobRunMethod(), getCallOptions()), request); + } + /** * * @@ -2084,11 +2508,15 @@ protected CloudDeployFutureStub build( private static final int METHODID_LIST_RELEASES = 10; private static final int METHODID_GET_RELEASE = 11; private static final int METHODID_CREATE_RELEASE = 12; - private static final int METHODID_APPROVE_ROLLOUT = 13; - private static final int METHODID_LIST_ROLLOUTS = 14; - private static final int METHODID_GET_ROLLOUT = 15; - private static final int METHODID_CREATE_ROLLOUT = 16; - private static final int METHODID_GET_CONFIG = 17; + private static final int METHODID_ABANDON_RELEASE = 13; + private static final int METHODID_APPROVE_ROLLOUT = 14; + private static final int METHODID_LIST_ROLLOUTS = 15; + private static final int METHODID_GET_ROLLOUT = 16; + private static final int METHODID_CREATE_ROLLOUT = 17; + private static final int METHODID_RETRY_JOB = 18; + private static final int METHODID_LIST_JOB_RUNS = 19; + private static final int METHODID_GET_JOB_RUN = 20; + private static final int METHODID_GET_CONFIG = 21; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2177,6 +2605,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.deploy.v1.CreateReleaseRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_ABANDON_RELEASE: + serviceImpl.abandonRelease( + (com.google.cloud.deploy.v1.AbandonReleaseRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_APPROVE_ROLLOUT: serviceImpl.approveRollout( (com.google.cloud.deploy.v1.ApproveRolloutRequest) request, @@ -2199,6 +2633,23 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.deploy.v1.CreateRolloutRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_RETRY_JOB: + serviceImpl.retryJob( + (com.google.cloud.deploy.v1.RetryJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_JOB_RUNS: + serviceImpl.listJobRuns( + (com.google.cloud.deploy.v1.ListJobRunsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_JOB_RUN: + serviceImpl.getJobRun( + (com.google.cloud.deploy.v1.GetJobRunRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_GET_CONFIG: serviceImpl.getConfig( (com.google.cloud.deploy.v1.GetConfigRequest) request, @@ -2281,10 +2732,14 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListReleasesMethod()) .addMethod(getGetReleaseMethod()) .addMethod(getCreateReleaseMethod()) + .addMethod(getAbandonReleaseMethod()) .addMethod(getApproveRolloutMethod()) .addMethod(getListRolloutsMethod()) .addMethod(getGetRolloutMethod()) .addMethod(getCreateRolloutMethod()) + .addMethod(getRetryJobMethod()) + .addMethod(getListJobRunsMethod()) + .addMethod(getGetJobRunMethod()) .addMethod(getGetConfigMethod()) .build(); } diff --git a/pom.xml b/pom.xml index 93d4424..79d3f44 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-deploy-parent pom - 1.1.7 + 1.1.8 Google Google CLoud Deploy Parent https://github.com/googleapis/java-deploy @@ -69,17 +69,17 @@ com.google.cloud google-cloud-deploy - 1.1.7 + 1.1.8 com.google.api.grpc grpc-google-cloud-deploy-v1 - 1.1.7 + 1.1.8 com.google.api.grpc proto-google-cloud-deploy-v1 - 1.1.7 + 1.1.8 diff --git a/proto-google-cloud-deploy-v1/pom.xml b/proto-google-cloud-deploy-v1/pom.xml index 989f6c7..52481a3 100644 --- a/proto-google-cloud-deploy-v1/pom.xml +++ b/proto-google-cloud-deploy-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-deploy-v1 - 1.1.7 + 1.1.8 proto-google-cloud-deploy-v1 Proto library for google-cloud-deploy com.google.cloud google-cloud-deploy-parent - 1.1.7 + 1.1.8 diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseRequest.java new file mode 100644 index 0000000..e32954d --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseRequest.java @@ -0,0 +1,643 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The request object used by `AbandonRelease`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AbandonReleaseRequest} + */ +public final class AbandonReleaseRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.AbandonReleaseRequest) + AbandonReleaseRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AbandonReleaseRequest.newBuilder() to construct. + private AbandonReleaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AbandonReleaseRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AbandonReleaseRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AbandonReleaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AbandonReleaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AbandonReleaseRequest.class, + com.google.cloud.deploy.v1.AbandonReleaseRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of the Release. Format is
+   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/{release}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the Release. Format is
+   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/{release}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.AbandonReleaseRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.AbandonReleaseRequest other = + (com.google.cloud.deploy.v1.AbandonReleaseRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.AbandonReleaseRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AbandonReleaseRequest 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.deploy.v1.AbandonReleaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AbandonReleaseRequest 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.deploy.v1.AbandonReleaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AbandonReleaseRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.AbandonReleaseRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AbandonReleaseRequest 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.deploy.v1.AbandonReleaseRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AbandonReleaseRequest 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.deploy.v1.AbandonReleaseRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AbandonReleaseRequest 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.deploy.v1.AbandonReleaseRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request object used by `AbandonRelease`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AbandonReleaseRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.AbandonReleaseRequest) + com.google.cloud.deploy.v1.AbandonReleaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AbandonReleaseRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AbandonReleaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AbandonReleaseRequest.class, + com.google.cloud.deploy.v1.AbandonReleaseRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.AbandonReleaseRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AbandonReleaseRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AbandonReleaseRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.AbandonReleaseRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AbandonReleaseRequest build() { + com.google.cloud.deploy.v1.AbandonReleaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AbandonReleaseRequest buildPartial() { + com.google.cloud.deploy.v1.AbandonReleaseRequest result = + new com.google.cloud.deploy.v1.AbandonReleaseRequest(this); + result.name_ = name_; + 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.deploy.v1.AbandonReleaseRequest) { + return mergeFrom((com.google.cloud.deploy.v1.AbandonReleaseRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.AbandonReleaseRequest other) { + if (other == com.google.cloud.deploy.v1.AbandonReleaseRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the Release. Format is
+     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the Release. Format is
+     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the Release. Format is
+     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the Release. Format is
+     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the Release. Format is
+     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + 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.deploy.v1.AbandonReleaseRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.AbandonReleaseRequest) + private static final com.google.cloud.deploy.v1.AbandonReleaseRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.AbandonReleaseRequest(); + } + + public static com.google.cloud.deploy.v1.AbandonReleaseRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AbandonReleaseRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AbandonReleaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseRequestOrBuilder.java new file mode 100644 index 0000000..f12a123 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface AbandonReleaseRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.AbandonReleaseRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the Release. Format is
+   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/{release}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the Release. Format is
+   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/{release}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseResponse.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseResponse.java new file mode 100644 index 0000000..30f6a94 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseResponse.java @@ -0,0 +1,436 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The response object for `AbandonRelease`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AbandonReleaseResponse} + */ +public final class AbandonReleaseResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.AbandonReleaseResponse) + AbandonReleaseResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AbandonReleaseResponse.newBuilder() to construct. + private AbandonReleaseResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AbandonReleaseResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AbandonReleaseResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AbandonReleaseResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AbandonReleaseResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AbandonReleaseResponse.class, + com.google.cloud.deploy.v1.AbandonReleaseResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.AbandonReleaseResponse)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.AbandonReleaseResponse other = + (com.google.cloud.deploy.v1.AbandonReleaseResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.AbandonReleaseResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AbandonReleaseResponse 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.deploy.v1.AbandonReleaseResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AbandonReleaseResponse 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.deploy.v1.AbandonReleaseResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AbandonReleaseResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.AbandonReleaseResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AbandonReleaseResponse 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.deploy.v1.AbandonReleaseResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AbandonReleaseResponse 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.deploy.v1.AbandonReleaseResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AbandonReleaseResponse 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.deploy.v1.AbandonReleaseResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response object for `AbandonRelease`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AbandonReleaseResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.AbandonReleaseResponse) + com.google.cloud.deploy.v1.AbandonReleaseResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AbandonReleaseResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AbandonReleaseResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AbandonReleaseResponse.class, + com.google.cloud.deploy.v1.AbandonReleaseResponse.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.AbandonReleaseResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AbandonReleaseResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AbandonReleaseResponse getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.AbandonReleaseResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AbandonReleaseResponse build() { + com.google.cloud.deploy.v1.AbandonReleaseResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AbandonReleaseResponse buildPartial() { + com.google.cloud.deploy.v1.AbandonReleaseResponse result = + new com.google.cloud.deploy.v1.AbandonReleaseResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.AbandonReleaseResponse) { + return mergeFrom((com.google.cloud.deploy.v1.AbandonReleaseResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.AbandonReleaseResponse other) { + if (other == com.google.cloud.deploy.v1.AbandonReleaseResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.AbandonReleaseResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.AbandonReleaseResponse) + private static final com.google.cloud.deploy.v1.AbandonReleaseResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.AbandonReleaseResponse(); + } + + public static com.google.cloud.deploy.v1.AbandonReleaseResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AbandonReleaseResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AbandonReleaseResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseResponseOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseResponseOrBuilder.java new file mode 100644 index 0000000..e69e245 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface AbandonReleaseResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.AbandonReleaseResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AnthosCluster.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AnthosCluster.java index a432128..def4421 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AnthosCluster.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AnthosCluster.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AnthosCluster( - 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(); - - membership_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_AnthosCluster_descriptor; @@ -183,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(membership_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, membership_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +149,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(membership_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, membership_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -211,7 +165,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.deploy.v1.AnthosCluster other = (com.google.cloud.deploy.v1.AnthosCluster) obj; if (!getMembership().equals(other.getMembership())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -224,7 +178,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + MEMBERSHIP_FIELD_NUMBER; hash = (53 * hash) + getMembership().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -353,17 +307,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.AnthosCluster.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -452,7 +399,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.AnthosCluster other) { membership_ = other.membership_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -467,17 +414,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.AnthosCluster parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + membership_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.AnthosCluster) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -629,7 +596,18 @@ public AnthosCluster parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AnthosCluster(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequest.java index 13e57fe..3534fca 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequest.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequest.java @@ -52,57 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ApproveRolloutRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: - { - approved_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_ApproveRolloutRequest_descriptor; @@ -213,7 +162,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (approved_ != false) { output.writeBool(2, approved_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -228,7 +177,7 @@ public int getSerializedSize() { if (approved_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, approved_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -246,7 +195,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (getApproved() != other.getApproved()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -261,7 +210,7 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + APPROVED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getApproved()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -390,17 +339,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.ApproveRolloutRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -496,7 +438,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.ApproveRolloutRequest other) if (other.getApproved() != false) { setApproved(other.getApproved()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -511,17 +453,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.ApproveRolloutRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + approved_ = input.readBool(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.ApproveRolloutRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -735,7 +703,18 @@ public ApproveRolloutRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ApproveRolloutRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutResponse.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutResponse.java index bd0c20e..3934cf5 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutResponse.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutResponse.java @@ -50,45 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ApproveRolloutResponse( - 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; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_ApproveRolloutResponse_descriptor; @@ -118,7 +79,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -127,7 +88,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -143,7 +104,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.deploy.v1.ApproveRolloutResponse other = (com.google.cloud.deploy.v1.ApproveRolloutResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -154,7 +115,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -283,17 +244,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.ApproveRolloutResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -376,7 +330,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.deploy.v1.ApproveRolloutResponse other) { if (other == com.google.cloud.deploy.v1.ApproveRolloutResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -391,18 +345,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.ApproveRolloutResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.deploy.v1.ApproveRolloutResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -438,7 +405,18 @@ public ApproveRolloutResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ApproveRolloutResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/BuildArtifact.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/BuildArtifact.java index c51eac6..b033901 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/BuildArtifact.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/BuildArtifact.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BuildArtifact( - 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 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - tag_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - image_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_BuildArtifact_descriptor; @@ -243,7 +190,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(image_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, image_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -258,7 +205,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(image_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, image_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -275,7 +222,7 @@ public boolean equals(final java.lang.Object obj) { if (!getImage().equals(other.getImage())) return false; if (!getTag().equals(other.getTag())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -290,7 +237,7 @@ public int hashCode() { hash = (53 * hash) + getImage().hashCode(); hash = (37 * hash) + TAG_FIELD_NUMBER; hash = (53 * hash) + getTag().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -419,17 +366,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.BuildArtifact.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -525,7 +465,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.BuildArtifact other) { tag_ = other.tag_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -540,17 +480,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.BuildArtifact parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + tag_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + image_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.BuildArtifact) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -808,7 +774,18 @@ public BuildArtifact parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BuildArtifact(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployProto.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployProto.java index a36110a..1d1d644 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployProto.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployProto.java @@ -47,6 +47,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_deploy_v1_Stage_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_deploy_v1_Stage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Strategy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Strategy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Standard_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Standard_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_deploy_v1_PipelineReadyCondition_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -115,6 +123,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_deploy_v1_AnthosCluster_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_deploy_v1_AnthosCluster_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_CloudRunLocation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_CloudRunLocation_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_deploy_v1_ListTargetsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -199,6 +211,38 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_deploy_v1_Rollout_LabelsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_deploy_v1_Rollout_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Metadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Metadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_DeployJobRunMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_DeployJobRunMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_CloudRunMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_CloudRunMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Phase_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Phase_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_DeploymentJobs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_DeploymentJobs_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Job_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Job_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_DeployJob_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_DeployJob_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_VerifyJob_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_VerifyJob_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_deploy_v1_ListRolloutsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -227,6 +271,46 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_deploy_v1_ApproveRolloutResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_deploy_v1_ApproveRolloutResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_RetryJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_RetryJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_RetryJobResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_RetryJobResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_AbandonReleaseRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_AbandonReleaseRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_AbandonReleaseResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_AbandonReleaseResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_JobRun_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_JobRun_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_DeployJobRun_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_DeployJobRun_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_VerifyJobRun_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_VerifyJobRun_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_ListJobRunsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_ListJobRunsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_ListJobRunsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_ListJobRunsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_GetJobRunRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_GetJobRunRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_deploy_v1_Config_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -253,387 +337,504 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "annotations.proto\032\027google/api/client.pro" + "to\032\037google/api/field_behavior.proto\032\031goo" + "gle/api/resource.proto\032#google/longrunni" - + "ng/operations.proto\032 google/protobuf/fie" - + "ld_mask.proto\032\037google/protobuf/timestamp" - + ".proto\032\026google/type/date.proto\"\322\005\n\020Deliv" - + "eryPipeline\022\021\n\004name\030\001 \001(\tB\003\340A\001\022\020\n\003uid\030\002 " - + "\001(\tB\003\340A\003\022\023\n\013description\030\003 \001(\t\022N\n\013annotat" - + "ions\030\004 \003(\01329.google.cloud.deploy.v1.Deli" - + "veryPipeline.AnnotationsEntry\022D\n\006labels\030" - + "\005 \003(\01324.google.cloud.deploy.v1.DeliveryP" - + "ipeline.LabelsEntry\0224\n\013create_time\030\006 \001(\013" - + "2\032.google.protobuf.TimestampB\003\340A\003\0224\n\013upd" - + "ate_time\030\007 \001(\0132\032.google.protobuf.Timesta" - + "mpB\003\340A\003\022A\n\017serial_pipeline\030\010 \001(\0132&.googl" - + "e.cloud.deploy.v1.SerialPipelineH\000\022A\n\tco" - + "ndition\030\013 \001(\0132).google.cloud.deploy.v1.P" - + "ipelineConditionB\003\340A\003\022\014\n\004etag\030\n \001(\t\0322\n\020A" - + "nnotationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " - + "\001(\t:\0028\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" - + "alue\030\002 \001(\t:\0028\001:\177\352A|\n+clouddeploy.googlea" - + "pis.com/DeliveryPipeline\022Mprojects/{proj" - + "ect}/locations/{location}/deliveryPipeli" - + "nes/{delivery_pipeline}B\n\n\010pipeline\"?\n\016S" - + "erialPipeline\022-\n\006stages\030\001 \003(\0132\035.google.c" - + "loud.deploy.v1.Stage\",\n\005Stage\022\021\n\ttarget_" - + "id\030\001 \001(\t\022\020\n\010profiles\030\002 \003(\t\"Y\n\026PipelineRe" - + "adyCondition\022\016\n\006status\030\003 \001(\010\022/\n\013update_t" - + "ime\030\004 \001(\0132\032.google.protobuf.Timestamp\"\233\001" - + "\n\027TargetsPresentCondition\022\016\n\006status\030\001 \001(" - + "\010\022?\n\017missing_targets\030\002 \003(\tB&\372A#\n!cloudde" - + "ploy.googleapis.com/Target\022/\n\013update_tim" - + "e\030\004 \001(\0132\032.google.protobuf.Timestamp\"\271\001\n\021" - + "PipelineCondition\022P\n\030pipeline_ready_cond" - + "ition\030\001 \001(\0132..google.cloud.deploy.v1.Pip" - + "elineReadyCondition\022R\n\031targets_present_c" - + "ondition\030\003 \001(\0132/.google.cloud.deploy.v1." - + "TargetsPresentCondition\"\254\001\n\034ListDelivery" - + "PipelinesRequest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-" - + "\022+clouddeploy.googleapis.com/DeliveryPip" - + "eline\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003" - + " \001(\t\022\016\n\006filter\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"\223" - + "\001\n\035ListDeliveryPipelinesResponse\022D\n\022deli" - + "very_pipelines\030\001 \003(\0132(.google.cloud.depl" - + "oy.v1.DeliveryPipeline\022\027\n\017next_page_toke" - + "n\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"_\n\032GetDeliv" - + "eryPipelineRequest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-" - + "\n+clouddeploy.googleapis.com/DeliveryPip" - + "eline\"\206\002\n\035CreateDeliveryPipelineRequest\022" - + "C\n\006parent\030\001 \001(\tB3\340A\002\372A-\022+clouddeploy.goo" - + "gleapis.com/DeliveryPipeline\022!\n\024delivery" - + "_pipeline_id\030\002 \001(\tB\003\340A\002\022H\n\021delivery_pipe" - + "line\030\003 \001(\0132(.google.cloud.deploy.v1.Deli" - + "veryPipelineB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340" - + "A\001\022\032\n\rvalidate_only\030\005 \001(\010B\003\340A\001\"\360\001\n\035Updat" - + "eDeliveryPipelineRequest\0224\n\013update_mask\030" - + "\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022H" - + "\n\021delivery_pipeline\030\002 \001(\0132(.google.cloud" - + ".deploy.v1.DeliveryPipelineB\003\340A\002\022\027\n\nrequ" - + "est_id\030\003 \001(\tB\003\340A\001\022\032\n\rallow_missing\030\004 \001(\010" - + "B\003\340A\001\022\032\n\rvalidate_only\030\005 \001(\010B\003\340A\001\"\332\001\n\035De" - + "leteDeliveryPipelineRequest\022A\n\004name\030\001 \001(" - + "\tB3\340A\002\372A-\n+clouddeploy.googleapis.com/De" - + "liveryPipeline\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\022" - + "\032\n\rallow_missing\030\003 \001(\010B\003\340A\001\022\032\n\rvalidate_" - + "only\030\004 \001(\010B\003\340A\001\022\022\n\005force\030\006 \001(\010B\003\340A\001\022\021\n\004e" - + "tag\030\005 \001(\tB\003\340A\001\"\233\006\n\006Target\022\021\n\004name\030\001 \001(\tB" - + "\003\340A\001\022\026\n\ttarget_id\030\002 \001(\tB\003\340A\003\022\020\n\003uid\030\003 \001(" - + "\tB\003\340A\003\022\030\n\013description\030\004 \001(\tB\003\340A\001\022I\n\013anno" - + "tations\030\005 \003(\0132/.google.cloud.deploy.v1.T" - + "arget.AnnotationsEntryB\003\340A\001\022?\n\006labels\030\006 " - + "\003(\0132*.google.cloud.deploy.v1.Target.Labe" - + "lsEntryB\003\340A\001\022\035\n\020require_approval\030\r \001(\010B\003" - + "\340A\001\0224\n\013create_time\030\010 \001(\0132\032.google.protob" - + "uf.TimestampB\003\340A\003\0224\n\013update_time\030\t \001(\0132\032" - + ".google.protobuf.TimestampB\003\340A\003\0221\n\003gke\030\017" - + " \001(\0132\".google.cloud.deploy.v1.GkeCluster" - + "H\000\022?\n\016anthos_cluster\030\021 \001(\0132%.google.clou" - + "d.deploy.v1.AnthosClusterH\000\022\021\n\004etag\030\014 \001(" - + "\tB\003\340A\001\022B\n\021execution_configs\030\020 \003(\0132\'.goog" - + "le.cloud.deploy.v1.ExecutionConfig\0322\n\020An" - + "notationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" - + "(\t:\0028\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" - + "lue\030\002 \001(\t:\0028\001:`\352A]\n!clouddeploy.googleap" - + "is.com/Target\0228projects/{project}/locati" - + "ons/{location}/targets/{target}B\023\n\021deplo" - + "yment_target\"\350\003\n\017ExecutionConfig\022V\n\006usag" - + "es\030\001 \003(\0162A.google.cloud.deploy.v1.Execut" - + "ionConfig.ExecutionEnvironmentUsageB\003\340A\002" - + "\022@\n\014default_pool\030\002 \001(\0132#.google.cloud.de" - + "ploy.v1.DefaultPoolB\003\340A\001H\000\022@\n\014private_po" - + "ol\030\003 \001(\0132#.google.cloud.deploy.v1.Privat" - + "ePoolB\003\340A\001H\000\022A\n\013worker_pool\030\004 \001(\tB,\340A\001\372A" - + "&\n$cloudbuild.googleapis.com/WorkerPool\022" - + "\034\n\017service_account\030\005 \001(\tB\003\340A\001\022\035\n\020artifac" - + "t_storage\030\006 \001(\tB\003\340A\001\"`\n\031ExecutionEnviron" - + "mentUsage\022+\n\'EXECUTION_ENVIRONMENT_USAGE" - + "_UNSPECIFIED\020\000\022\n\n\006RENDER\020\001\022\n\n\006DEPLOY\020\002B\027" - + "\n\025execution_environment\"J\n\013DefaultPool\022\034" - + "\n\017service_account\030\001 \001(\tB\003\340A\001\022\035\n\020artifact" - + "_storage\030\002 \001(\tB\003\340A\001\"\215\001\n\013PrivatePool\022A\n\013w" - + "orker_pool\030\001 \001(\tB,\340A\002\372A&\n$cloudbuild.goo" - + "gleapis.com/WorkerPool\022\034\n\017service_accoun" - + "t\030\002 \001(\tB\003\340A\001\022\035\n\020artifact_storage\030\003 \001(\tB\003" - + "\340A\001\"^\n\nGkeCluster\0226\n\007cluster\030\001 \001(\tB%\372A\"\n" - + " container.googleapis.com/Cluster\022\030\n\013int" - + "ernal_ip\030\002 \001(\010B\003\340A\001\"J\n\rAnthosCluster\0229\n\n" - + "membership\030\001 \001(\tB%\372A\"\n gkehub.googleapis" - + ".com/Membership\"\254\001\n\022ListTargetsRequest\0229" - + "\n\006parent\030\001 \001(\tB)\340A\002\372A#\022!clouddeploy.goog" - + "leapis.com/Target\022\026\n\tpage_size\030\002 \001(\005B\003\340A" - + "\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001" - + "(\tB\003\340A\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"t\n\023ListTa" - + "rgetsResponse\022/\n\007targets\030\001 \003(\0132\036.google." - + "cloud.deploy.v1.Target\022\027\n\017next_page_toke" - + "n\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"K\n\020GetTarge" - + "tRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!clouddep" - + "loy.googleapis.com/Target\"\322\001\n\023CreateTarg" - + "etRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\022!cloud" - + "deploy.googleapis.com/Target\022\026\n\ttarget_i" - + "d\030\002 \001(\tB\003\340A\002\0223\n\006target\030\003 \001(\0132\036.google.cl" - + "oud.deploy.v1.TargetB\003\340A\002\022\027\n\nrequest_id\030" - + "\004 \001(\tB\003\340A\001\022\032\n\rvalidate_only\030\005 \001(\010B\003\340A\001\"\321" - + "\001\n\023UpdateTargetRequest\0224\n\013update_mask\030\001 " - + "\001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\0223\n\006" - + "target\030\002 \001(\0132\036.google.cloud.deploy.v1.Ta" - + "rgetB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\022\032\n\ral" - + "low_missing\030\004 \001(\010B\003\340A\001\022\032\n\rvalidate_only\030" - + "\005 \001(\010B\003\340A\001\"\262\001\n\023DeleteTargetRequest\0227\n\004na" - + "me\030\001 \001(\tB)\340A\002\372A#\n!clouddeploy.googleapis" - + ".com/Target\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\022\032\n\r" - + "allow_missing\030\003 \001(\010B\003\340A\001\022\032\n\rvalidate_onl" - + "y\030\004 \001(\010B\003\340A\001\022\021\n\004etag\030\005 \001(\tB\003\340A\001\"\363\016\n\007Rele" - + "ase\022\021\n\004name\030\001 \001(\tB\003\340A\001\022\020\n\003uid\030\002 \001(\tB\003\340A\003" - + "\022\023\n\013description\030\003 \001(\t\022E\n\013annotations\030\004 \003" - + "(\01320.google.cloud.deploy.v1.Release.Anno" - + "tationsEntry\022;\n\006labels\030\005 \003(\0132+.google.cl" - + "oud.deploy.v1.Release.LabelsEntry\0224\n\013cre" - + "ate_time\030\006 \001(\0132\032.google.protobuf.Timesta" - + "mpB\003\340A\003\022:\n\021render_start_time\030\007 \001(\0132\032.goo" - + "gle.protobuf.TimestampB\003\340A\003\0228\n\017render_en" - + "d_time\030\010 \001(\0132\032.google.protobuf.Timestamp" - + "B\003\340A\003\022\033\n\023skaffold_config_uri\030\021 \001(\t\022\034\n\024sk" - + "affold_config_path\030\t \001(\t\022>\n\017build_artifa" - + "cts\030\n \003(\0132%.google.cloud.deploy.v1.Build" - + "Artifact\022Q\n\032delivery_pipeline_snapshot\030\013" - + " \001(\0132(.google.cloud.deploy.v1.DeliveryPi" - + "pelineB\003\340A\003\022=\n\020target_snapshots\030\014 \003(\0132\036." - + "google.cloud.deploy.v1.TargetB\003\340A\003\022F\n\014re" - + "nder_state\030\r \001(\0162+.google.cloud.deploy.v" - + "1.Release.RenderStateB\003\340A\003\022\014\n\004etag\030\020 \001(\t" - + "\022\030\n\020skaffold_version\030\023 \001(\t\022S\n\020target_art" - + "ifacts\030\024 \003(\01324.google.cloud.deploy.v1.Re" - + "lease.TargetArtifactsEntryB\003\340A\003\022O\n\016targe" - + "t_renders\030\026 \003(\01322.google.cloud.deploy.v1" - + ".Release.TargetRendersEntryB\003\340A\003\032\315\003\n\014Tar" - + "getRender\022@\n\017rendering_build\030\001 \001(\tB\'\340A\003\372" - + "A!\n\037cloudbuild.googleapis.com/Build\022\\\n\017r" - + "endering_state\030\002 \001(\0162>.google.cloud.depl" - + "oy.v1.Release.TargetRender.TargetRenderS" - + "tateB\003\340A\003\022U\n\rfailure_cause\030\004 \001(\01629.googl" - + "e.cloud.deploy.v1.Release.TargetRender.F" - + "ailureCauseB\003\340A\003\"d\n\021TargetRenderState\022#\n" - + "\037TARGET_RENDER_STATE_UNSPECIFIED\020\000\022\r\n\tSU" - + "CCEEDED\020\001\022\n\n\006FAILED\020\002\022\017\n\013IN_PROGRESS\020\003\"`" - + "\n\014FailureCause\022\035\n\031FAILURE_CAUSE_UNSPECIF" - + "IED\020\000\022\033\n\027CLOUD_BUILD_UNAVAILABLE\020\001\022\024\n\020EX" - + "ECUTION_FAILED\020\002\0322\n\020AnnotationsEntry\022\013\n\003" - + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032-\n\013LabelsEn" - + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032^\n\024T" - + "argetArtifactsEntry\022\013\n\003key\030\001 \001(\t\0225\n\005valu" - + "e\030\002 \001(\0132&.google.cloud.deploy.v1.TargetA" - + "rtifact:\0028\001\032b\n\022TargetRendersEntry\022\013\n\003key" - + "\030\001 \001(\t\022;\n\005value\030\002 \001(\0132,.google.cloud.dep" - + "loy.v1.Release.TargetRender:\0028\001\"W\n\013Rende" - + "rState\022\034\n\030RENDER_STATE_UNSPECIFIED\020\000\022\r\n\t" - + "SUCCEEDED\020\001\022\n\n\006FAILED\020\002\022\017\n\013IN_PROGRESS\020\003" - + ":\212\001\352A\206\001\n\"clouddeploy.googleapis.com/Rele" - + "ase\022`projects/{project}/locations/{locat" - + "ion}/deliveryPipelines/{delivery_pipelin" - + "e}/releases/{release}\"+\n\rBuildArtifact\022\r" - + "\n\005image\030\003 \001(\t\022\013\n\003tag\030\002 \001(\t\"s\n\016TargetArti" - + "fact\022\033\n\014artifact_uri\030\004 \001(\tB\003\340A\003H\000\022!\n\024ska" - + "ffold_config_path\030\002 \001(\tB\003\340A\003\022\032\n\rmanifest" - + "_path\030\003 \001(\tB\003\340A\003B\005\n\003uri\"\267\001\n\023ListReleases" - + "Request\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+cloudde" - + "ploy.googleapis.com/DeliveryPipeline\022\026\n\t" - + "page_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\t" - + "B\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010order_by\030\005" - + " \001(\tB\003\340A\001\"w\n\024ListReleasesResponse\0221\n\010rel" - + "eases\030\001 \003(\0132\037.google.cloud.deploy.v1.Rel" - + "ease\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreach" - + "able\030\003 \003(\t\"M\n\021GetReleaseRequest\0228\n\004name\030" - + "\001 \001(\tB*\340A\002\372A$\n\"clouddeploy.googleapis.co" - + "m/Release\"\340\001\n\024CreateReleaseRequest\022C\n\006pa" - + "rent\030\001 \001(\tB3\340A\002\372A-\n+clouddeploy.googleap" - + "is.com/DeliveryPipeline\022\027\n\nrelease_id\030\002 " - + "\001(\tB\003\340A\002\0225\n\007release\030\003 \001(\0132\037.google.cloud" - + ".deploy.v1.ReleaseB\003\340A\002\022\027\n\nrequest_id\030\004 " - + "\001(\tB\003\340A\001\022\032\n\rvalidate_only\030\005 \001(\010B\003\340A\001\"\350\013\n" - + "\007Rollout\022\021\n\004name\030\001 \001(\tB\003\340A\001\022\020\n\003uid\030\002 \001(\t" - + "B\003\340A\003\022\023\n\013description\030\003 \001(\t\022E\n\013annotation" - + "s\030\004 \003(\01320.google.cloud.deploy.v1.Rollout" - + ".AnnotationsEntry\022;\n\006labels\030\005 \003(\0132+.goog" - + "le.cloud.deploy.v1.Rollout.LabelsEntry\0224" - + "\n\013create_time\030\006 \001(\0132\032.google.protobuf.Ti" - + "mestampB\003\340A\003\0225\n\014approve_time\030\007 \001(\0132\032.goo" - + "gle.protobuf.TimestampB\003\340A\003\0225\n\014enqueue_t" + + "ng/operations.proto\032\036google/protobuf/dur" + + "ation.proto\032 google/protobuf/field_mask." + + "proto\032\037google/protobuf/timestamp.proto\032\026" + + "google/type/date.proto\"\345\005\n\020DeliveryPipel" + + "ine\022\021\n\004name\030\001 \001(\tB\003\340A\001\022\020\n\003uid\030\002 \001(\tB\003\340A\003" + + "\022\023\n\013description\030\003 \001(\t\022N\n\013annotations\030\004 \003" + + "(\01329.google.cloud.deploy.v1.DeliveryPipe" + + "line.AnnotationsEntry\022D\n\006labels\030\005 \003(\01324." + + "google.cloud.deploy.v1.DeliveryPipeline." + + "LabelsEntry\0224\n\013create_time\030\006 \001(\0132\032.googl" + + "e.protobuf.TimestampB\003\340A\003\0224\n\013update_time" + + "\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" + + "A\n\017serial_pipeline\030\010 \001(\0132&.google.cloud." + + "deploy.v1.SerialPipelineH\000\022A\n\tcondition\030" + + "\013 \001(\0132).google.cloud.deploy.v1.PipelineC" + + "onditionB\003\340A\003\022\014\n\004etag\030\n \001(\t\022\021\n\tsuspended" + + "\030\014 \001(\010\0322\n\020AnnotationsEntry\022\013\n\003key\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\t:\0028\001\032-\n\013LabelsEntry\022\013\n\003key" + + "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\177\352A|\n+clouddep" + + "loy.googleapis.com/DeliveryPipeline\022Mpro" + + "jects/{project}/locations/{location}/del" + + "iveryPipelines/{delivery_pipeline}B\n\n\010pi" + + "peline\"?\n\016SerialPipeline\022-\n\006stages\030\001 \003(\013" + + "2\035.google.cloud.deploy.v1.Stage\"e\n\005Stage" + + "\022\021\n\ttarget_id\030\001 \001(\t\022\020\n\010profiles\030\002 \003(\t\0227\n" + + "\010strategy\030\005 \001(\0132 .google.cloud.deploy.v1" + + ".StrategyB\003\340A\001\"W\n\010Strategy\0224\n\010standard\030\001" + + " \001(\0132 .google.cloud.deploy.v1.StandardH\000" + + "B\025\n\023deployment_strategy\"\032\n\010Standard\022\016\n\006v" + + "erify\030\001 \001(\010\"Y\n\026PipelineReadyCondition\022\016\n" + + "\006status\030\003 \001(\010\022/\n\013update_time\030\004 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\"\233\001\n\027TargetsPresen" + + "tCondition\022\016\n\006status\030\001 \001(\010\022?\n\017missing_ta" + + "rgets\030\002 \003(\tB&\372A#\n!clouddeploy.googleapis" + + ".com/Target\022/\n\013update_time\030\004 \001(\0132\032.googl" + + "e.protobuf.Timestamp\"\271\001\n\021PipelineConditi" + + "on\022P\n\030pipeline_ready_condition\030\001 \001(\0132..g" + + "oogle.cloud.deploy.v1.PipelineReadyCondi" + + "tion\022R\n\031targets_present_condition\030\003 \001(\0132" + + "/.google.cloud.deploy.v1.TargetsPresentC" + + "ondition\"\254\001\n\034ListDeliveryPipelinesReques" + + "t\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\022+clouddeploy.g" + + "oogleapis.com/DeliveryPipeline\022\021\n\tpage_s" + + "ize\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030" + + "\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"\223\001\n\035ListDelivery" + + "PipelinesResponse\022D\n\022delivery_pipelines\030" + + "\001 \003(\0132(.google.cloud.deploy.v1.DeliveryP" + + "ipeline\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unre" + + "achable\030\003 \003(\t\"_\n\032GetDeliveryPipelineRequ" + + "est\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+clouddeploy.g" + + "oogleapis.com/DeliveryPipeline\"\206\002\n\035Creat" + + "eDeliveryPipelineRequest\022C\n\006parent\030\001 \001(\t" + + "B3\340A\002\372A-\022+clouddeploy.googleapis.com/Del" + + "iveryPipeline\022!\n\024delivery_pipeline_id\030\002 " + + "\001(\tB\003\340A\002\022H\n\021delivery_pipeline\030\003 \001(\0132(.go" + + "ogle.cloud.deploy.v1.DeliveryPipelineB\003\340" + + "A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\022\032\n\rvalidate_" + + "only\030\005 \001(\010B\003\340A\001\"\360\001\n\035UpdateDeliveryPipeli" + + "neRequest\0224\n\013update_mask\030\001 \001(\0132\032.google." + + "protobuf.FieldMaskB\003\340A\002\022H\n\021delivery_pipe" + + "line\030\002 \001(\0132(.google.cloud.deploy.v1.Deli" + + "veryPipelineB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340" + + "A\001\022\032\n\rallow_missing\030\004 \001(\010B\003\340A\001\022\032\n\rvalida" + + "te_only\030\005 \001(\010B\003\340A\001\"\332\001\n\035DeleteDeliveryPip" + + "elineRequest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n+clou" + + "ddeploy.googleapis.com/DeliveryPipeline\022" + + "\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\022\032\n\rallow_missin" + + "g\030\003 \001(\010B\003\340A\001\022\032\n\rvalidate_only\030\004 \001(\010B\003\340A\001" + + "\022\022\n\005force\030\006 \001(\010B\003\340A\001\022\021\n\004etag\030\005 \001(\tB\003\340A\001\"" + + "\324\006\n\006Target\022\021\n\004name\030\001 \001(\tB\003\340A\001\022\026\n\ttarget_" + + "id\030\002 \001(\tB\003\340A\003\022\020\n\003uid\030\003 \001(\tB\003\340A\003\022\030\n\013descr" + + "iption\030\004 \001(\tB\003\340A\001\022I\n\013annotations\030\005 \003(\0132/" + + ".google.cloud.deploy.v1.Target.Annotatio" + + "nsEntryB\003\340A\001\022?\n\006labels\030\006 \003(\0132*.google.cl" + + "oud.deploy.v1.Target.LabelsEntryB\003\340A\001\022\035\n" + + "\020require_approval\030\r \001(\010B\003\340A\001\0224\n\013create_t" + "ime\030\010 \001(\0132\032.google.protobuf.TimestampB\003\340" - + "A\003\022:\n\021deploy_start_time\030\t \001(\0132\032.google.p" - + "rotobuf.TimestampB\003\340A\003\0228\n\017deploy_end_tim" - + "e\030\n \001(\0132\032.google.protobuf.TimestampB\003\340A\003" - + "\022\026\n\ttarget_id\030\022 \001(\tB\003\340A\002\022J\n\016approval_sta" - + "te\030\014 \001(\0162-.google.cloud.deploy.v1.Rollou" - + "t.ApprovalStateB\003\340A\003\0229\n\005state\030\r \001(\0162%.go" - + "ogle.cloud.deploy.v1.Rollout.StateB\003\340A\003\022" - + "\033\n\016failure_reason\030\016 \001(\tB\003\340A\003\022@\n\017deployin" - + "g_build\030\021 \001(\tB\'\340A\003\372A!\n\037cloudbuild.google" - + "apis.com/Build\022\014\n\004etag\030\020 \001(\t\022O\n\024deploy_f" - + "ailure_cause\030\023 \001(\0162,.google.cloud.deploy" - + ".v1.Rollout.FailureCauseB\003\340A\003\0322\n\020Annotat" - + "ionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028" - + "\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" - + " \001(\t:\0028\001\"{\n\rApprovalState\022\036\n\032APPROVAL_ST" - + "ATE_UNSPECIFIED\020\000\022\022\n\016NEEDS_APPROVAL\020\001\022\032\n" - + "\026DOES_NOT_NEED_APPROVAL\020\002\022\014\n\010APPROVED\020\003\022" - + "\014\n\010REJECTED\020\004\"\231\001\n\005State\022\025\n\021STATE_UNSPECI" - + "FIED\020\000\022\r\n\tSUCCEEDED\020\001\022\n\n\006FAILED\020\002\022\017\n\013IN_" - + "PROGRESS\020\003\022\024\n\020PENDING_APPROVAL\020\004\022\025\n\021APPR" - + "OVAL_REJECTED\020\005\022\013\n\007PENDING\020\006\022\023\n\017PENDING_" - + "RELEASE\020\007\"\213\001\n\014FailureCause\022\035\n\031FAILURE_CA" - + "USE_UNSPECIFIED\020\000\022\033\n\027CLOUD_BUILD_UNAVAIL" - + "ABLE\020\001\022\024\n\020EXECUTION_FAILED\020\002\022\025\n\021DEADLINE" - + "_EXCEEDED\020\003\022\022\n\016RELEASE_FAILED\020\004:\235\001\352A\231\001\n\"" - + "clouddeploy.googleapis.com/Rollout\022sproj" - + "ects/{project}/locations/{location}/deli" - + "veryPipelines/{delivery_pipeline}/releas" - + "es/{release}/rollouts/{rollout}\"\256\001\n\023List" - + "RolloutsRequest\022:\n\006parent\030\001 \001(\tB*\340A\002\372A$\n" - + "\"clouddeploy.googleapis.com/Release\022\026\n\tp" - + "age_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB" - + "\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010order_by\030\005 " - + "\001(\tB\003\340A\001\"w\n\024ListRolloutsResponse\0221\n\010roll" - + "outs\030\001 \003(\0132\037.google.cloud.deploy.v1.Roll" - + "out\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreacha" - + "ble\030\003 \003(\t\"M\n\021GetRolloutRequest\0228\n\004name\030\001" - + " \001(\tB*\340A\002\372A$\n\"clouddeploy.googleapis.com" - + "/Rollout\"\327\001\n\024CreateRolloutRequest\022:\n\006par" - + "ent\030\001 \001(\tB*\340A\002\372A$\n\"clouddeploy.googleapi" - + "s.com/Release\022\027\n\nrollout_id\030\002 \001(\tB\003\340A\002\0225" - + "\n\007rollout\030\003 \001(\0132\037.google.cloud.deploy.v1" - + ".RolloutB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\022\032" - + "\n\rvalidate_only\030\005 \001(\010B\003\340A\001\"\200\002\n\021Operation" - + "Metadata\0224\n\013create_time\030\001 \001(\0132\032.google.p" - + "rotobuf.TimestampB\003\340A\003\0221\n\010end_time\030\002 \001(\013" - + "2\032.google.protobuf.TimestampB\003\340A\003\022\023\n\006tar" - + "get\030\003 \001(\tB\003\340A\003\022\021\n\004verb\030\004 \001(\tB\003\340A\003\022\033\n\016sta" - + "tus_message\030\005 \001(\tB\003\340A\003\022#\n\026requested_canc" - + "ellation\030\006 \001(\010B\003\340A\003\022\030\n\013api_version\030\007 \001(\t" - + "B\003\340A\003\"h\n\025ApproveRolloutRequest\0228\n\004name\030\001" - + " \001(\tB*\340A\002\372A$\n\"clouddeploy.googleapis.com" - + "/Rollout\022\025\n\010approved\030\002 \001(\010B\003\340A\002\"\030\n\026Appro" - + "veRolloutResponse\"\337\001\n\006Config\022\014\n\004name\030\001 \001" - + "(\t\022H\n\022supported_versions\030\002 \003(\0132\'.google." - + "cloud.deploy.v1.SkaffoldVersionB\003\340A\003\022%\n\030" - + "default_skaffold_version\030\003 \001(\tB\003\340A\003:V\352AS" - + "\n!clouddeploy.googleapis.com/Config\022.pro" - + "jects/{project}/locations/{location}/con" - + "fig\"O\n\017SkaffoldVersion\022\017\n\007version\030\001 \001(\t\022" - + "+\n\020support_end_date\030\002 \001(\0132\021.google.type." - + "Date\"K\n\020GetConfigRequest\0227\n\004name\030\001 \001(\tB)" - + "\340A\002\372A#\n!clouddeploy.googleapis.com/Confi" - + "g2\352\035\n\013CloudDeploy\022\314\001\n\025ListDeliveryPipeli" - + "nes\0224.google.cloud.deploy.v1.ListDeliver" - + "yPipelinesRequest\0325.google.cloud.deploy." - + "v1.ListDeliveryPipelinesResponse\"F\202\323\344\223\0027" - + "\0225/v1/{parent=projects/*/locations/*}/de" - + "liveryPipelines\332A\006parent\022\271\001\n\023GetDelivery" - + "Pipeline\0222.google.cloud.deploy.v1.GetDel" - + "iveryPipelineRequest\032(.google.cloud.depl" - + "oy.v1.DeliveryPipeline\"D\202\323\344\223\0027\0225/v1/{nam" + + "A\003\0224\n\013update_time\030\t \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\003\0221\n\003gke\030\017 \001(\0132\".google.c" + + "loud.deploy.v1.GkeClusterH\000\022?\n\016anthos_cl" + + "uster\030\021 \001(\0132%.google.cloud.deploy.v1.Ant" + + "hosClusterH\000\0227\n\003run\030\022 \001(\0132(.google.cloud" + + ".deploy.v1.CloudRunLocationH\000\022\021\n\004etag\030\014 " + + "\001(\tB\003\340A\001\022B\n\021execution_configs\030\020 \003(\0132\'.go" + + "ogle.cloud.deploy.v1.ExecutionConfig\0322\n\020" + + "AnnotationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" + + " \001(\t:\0028\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + + "value\030\002 \001(\t:\0028\001:`\352A]\n!clouddeploy.google" + + "apis.com/Target\0228projects/{project}/loca" + + "tions/{location}/targets/{target}B\023\n\021dep" + + "loyment_target\"\257\004\n\017ExecutionConfig\022V\n\006us" + + "ages\030\001 \003(\0162A.google.cloud.deploy.v1.Exec" + + "utionConfig.ExecutionEnvironmentUsageB\003\340" + + "A\002\022@\n\014default_pool\030\002 \001(\0132#.google.cloud." + + "deploy.v1.DefaultPoolB\003\340A\001H\000\022@\n\014private_" + + "pool\030\003 \001(\0132#.google.cloud.deploy.v1.Priv" + + "atePoolB\003\340A\001H\000\022A\n\013worker_pool\030\004 \001(\tB,\340A\001" + + "\372A&\n$cloudbuild.googleapis.com/WorkerPoo" + + "l\022\034\n\017service_account\030\005 \001(\tB\003\340A\001\022\035\n\020artif" + + "act_storage\030\006 \001(\tB\003\340A\001\0229\n\021execution_time" + + "out\030\007 \001(\0132\031.google.protobuf.DurationB\003\340A" + + "\001\"l\n\031ExecutionEnvironmentUsage\022+\n\'EXECUT" + + "ION_ENVIRONMENT_USAGE_UNSPECIFIED\020\000\022\n\n\006R" + + "ENDER\020\001\022\n\n\006DEPLOY\020\002\022\n\n\006VERIFY\020\003B\027\n\025execu" + + "tion_environment\"J\n\013DefaultPool\022\034\n\017servi" + + "ce_account\030\001 \001(\tB\003\340A\001\022\035\n\020artifact_storag" + + "e\030\002 \001(\tB\003\340A\001\"\215\001\n\013PrivatePool\022A\n\013worker_p" + + "ool\030\001 \001(\tB,\340A\002\372A&\n$cloudbuild.googleapis" + + ".com/WorkerPool\022\034\n\017service_account\030\002 \001(\t" + + "B\003\340A\001\022\035\n\020artifact_storage\030\003 \001(\tB\003\340A\001\"^\n\n" + + "GkeCluster\0226\n\007cluster\030\001 \001(\tB%\372A\"\n contai" + + "ner.googleapis.com/Cluster\022\030\n\013internal_i" + + "p\030\002 \001(\010B\003\340A\001\"J\n\rAnthosCluster\0229\n\nmembers" + + "hip\030\001 \001(\tB%\372A\"\n gkehub.googleapis.com/Me" + + "mbership\"O\n\020CloudRunLocation\022;\n\010location" + + "\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis.com" + + "/Location\"\254\001\n\022ListTargetsRequest\0229\n\006pare" + + "nt\030\001 \001(\tB)\340A\002\372A#\022!clouddeploy.googleapis" + + ".com/Target\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\np" + + "age_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A" + + "\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"t\n\023ListTargetsR" + + "esponse\022/\n\007targets\030\001 \003(\0132\036.google.cloud." + + "deploy.v1.Target\022\027\n\017next_page_token\030\002 \001(" + + "\t\022\023\n\013unreachable\030\003 \003(\t\"K\n\020GetTargetReque" + + "st\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!clouddeploy.go" + + "ogleapis.com/Target\"\322\001\n\023CreateTargetRequ" + + "est\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\022!clouddeploy" + + ".googleapis.com/Target\022\026\n\ttarget_id\030\002 \001(" + + "\tB\003\340A\002\0223\n\006target\030\003 \001(\0132\036.google.cloud.de" + + "ploy.v1.TargetB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB" + + "\003\340A\001\022\032\n\rvalidate_only\030\005 \001(\010B\003\340A\001\"\321\001\n\023Upd" + + "ateTargetRequest\0224\n\013update_mask\030\001 \001(\0132\032." + + "google.protobuf.FieldMaskB\003\340A\002\0223\n\006target" + + "\030\002 \001(\0132\036.google.cloud.deploy.v1.TargetB\003" + + "\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\022\032\n\rallow_mi" + + "ssing\030\004 \001(\010B\003\340A\001\022\032\n\rvalidate_only\030\005 \001(\010B" + + "\003\340A\001\"\262\001\n\023DeleteTargetRequest\0227\n\004name\030\001 \001" + + "(\tB)\340A\002\372A#\n!clouddeploy.googleapis.com/T" + + "arget\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\022\032\n\rallow_" + + "missing\030\003 \001(\010B\003\340A\001\022\032\n\rvalidate_only\030\004 \001(" + + "\010B\003\340A\001\022\021\n\004etag\030\005 \001(\tB\003\340A\001\"\251\017\n\007Release\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\001\022\020\n\003uid\030\002 \001(\tB\003\340A\003\022\023\n\013de" + + "scription\030\003 \001(\t\022E\n\013annotations\030\004 \003(\01320.g" + + "oogle.cloud.deploy.v1.Release.Annotation" + + "sEntry\022;\n\006labels\030\005 \003(\0132+.google.cloud.de" + + "ploy.v1.Release.LabelsEntry\022\026\n\tabandoned" + + "\030\027 \001(\010B\003\340A\003\0224\n\013create_time\030\006 \001(\0132\032.googl" + + "e.protobuf.TimestampB\003\340A\003\022:\n\021render_star" + + "t_time\030\007 \001(\0132\032.google.protobuf.Timestamp" + + "B\003\340A\003\0228\n\017render_end_time\030\010 \001(\0132\032.google." + + "protobuf.TimestampB\003\340A\003\022\033\n\023skaffold_conf" + + "ig_uri\030\021 \001(\t\022\034\n\024skaffold_config_path\030\t \001" + + "(\t\022>\n\017build_artifacts\030\n \003(\0132%.google.clo" + + "ud.deploy.v1.BuildArtifact\022Q\n\032delivery_p" + + "ipeline_snapshot\030\013 \001(\0132(.google.cloud.de" + + "ploy.v1.DeliveryPipelineB\003\340A\003\022=\n\020target_" + + "snapshots\030\014 \003(\0132\036.google.cloud.deploy.v1" + + ".TargetB\003\340A\003\022F\n\014render_state\030\r \001(\0162+.goo" + + "gle.cloud.deploy.v1.Release.RenderStateB" + + "\003\340A\003\022\014\n\004etag\030\020 \001(\t\022\030\n\020skaffold_version\030\023" + + " \001(\t\022S\n\020target_artifacts\030\024 \003(\01324.google." + + "cloud.deploy.v1.Release.TargetArtifactsE" + + "ntryB\003\340A\003\022O\n\016target_renders\030\026 \003(\01322.goog" + + "le.cloud.deploy.v1.Release.TargetRenders" + + "EntryB\003\340A\003\032\353\003\n\014TargetRender\022@\n\017rendering" + + "_build\030\001 \001(\tB\'\340A\003\372A!\n\037cloudbuild.googlea" + + "pis.com/Build\022\\\n\017rendering_state\030\002 \001(\0162>" + + ".google.cloud.deploy.v1.Release.TargetRe" + + "nder.TargetRenderStateB\003\340A\003\022U\n\rfailure_c" + + "ause\030\004 \001(\01629.google.cloud.deploy.v1.Rele" + + "ase.TargetRender.FailureCauseB\003\340A\003\022\034\n\017fa" + + "ilure_message\030\005 \001(\tB\003\340A\003\"d\n\021TargetRender" + + "State\022#\n\037TARGET_RENDER_STATE_UNSPECIFIED" + + "\020\000\022\r\n\tSUCCEEDED\020\001\022\n\n\006FAILED\020\002\022\017\n\013IN_PROG" + + "RESS\020\003\"`\n\014FailureCause\022\035\n\031FAILURE_CAUSE_" + + "UNSPECIFIED\020\000\022\033\n\027CLOUD_BUILD_UNAVAILABLE" + + "\020\001\022\024\n\020EXECUTION_FAILED\020\002\0322\n\020AnnotationsE" + + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032-\n\013" + + "LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + + "\0028\001\032^\n\024TargetArtifactsEntry\022\013\n\003key\030\001 \001(\t" + + "\0225\n\005value\030\002 \001(\0132&.google.cloud.deploy.v1" + + ".TargetArtifact:\0028\001\032b\n\022TargetRendersEntr" + + "y\022\013\n\003key\030\001 \001(\t\022;\n\005value\030\002 \001(\0132,.google.c" + + "loud.deploy.v1.Release.TargetRender:\0028\001\"" + + "W\n\013RenderState\022\034\n\030RENDER_STATE_UNSPECIFI" + + "ED\020\000\022\r\n\tSUCCEEDED\020\001\022\n\n\006FAILED\020\002\022\017\n\013IN_PR" + + "OGRESS\020\003:\212\001\352A\206\001\n\"clouddeploy.googleapis." + + "com/Release\022`projects/{project}/location" + + "s/{location}/deliveryPipelines/{delivery" + + "_pipeline}/releases/{release}\"+\n\rBuildAr" + + "tifact\022\r\n\005image\030\003 \001(\t\022\013\n\003tag\030\002 \001(\t\"s\n\016Ta" + + "rgetArtifact\022\033\n\014artifact_uri\030\004 \001(\tB\003\340A\003H" + + "\000\022!\n\024skaffold_config_path\030\002 \001(\tB\003\340A\003\022\032\n\r" + + "manifest_path\030\003 \001(\tB\003\340A\003B\005\n\003uri\"\267\001\n\023List" + + "ReleasesRequest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n" + + "+clouddeploy.googleapis.com/DeliveryPipe" + + "line\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_tok" + + "en\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010or" + + "der_by\030\005 \001(\tB\003\340A\001\"w\n\024ListReleasesRespons" + + "e\0221\n\010releases\030\001 \003(\0132\037.google.cloud.deplo" + + "y.v1.Release\022\027\n\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"M\n\021GetReleaseRequest\022" + + "8\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"clouddeploy.googl" + + "eapis.com/Release\"\340\001\n\024CreateReleaseReque" + + "st\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+clouddeploy." + + "googleapis.com/DeliveryPipeline\022\027\n\nrelea" + + "se_id\030\002 \001(\tB\003\340A\002\0225\n\007release\030\003 \001(\0132\037.goog" + + "le.cloud.deploy.v1.ReleaseB\003\340A\002\022\027\n\nreque" + + "st_id\030\004 \001(\tB\003\340A\001\022\032\n\rvalidate_only\030\005 \001(\010B" + + "\003\340A\001\"\217\r\n\007Rollout\022\021\n\004name\030\001 \001(\tB\003\340A\001\022\020\n\003u" + + "id\030\002 \001(\tB\003\340A\003\022\023\n\013description\030\003 \001(\t\022E\n\013an" + + "notations\030\004 \003(\01320.google.cloud.deploy.v1" + + ".Rollout.AnnotationsEntry\022;\n\006labels\030\005 \003(" + + "\0132+.google.cloud.deploy.v1.Rollout.Label" + + "sEntry\0224\n\013create_time\030\006 \001(\0132\032.google.pro" + + "tobuf.TimestampB\003\340A\003\0225\n\014approve_time\030\007 \001" + + "(\0132\032.google.protobuf.TimestampB\003\340A\003\0225\n\014e" + + "nqueue_time\030\010 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\022:\n\021deploy_start_time\030\t \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\003\0228\n\017deploy" + + "_end_time\030\n \001(\0132\032.google.protobuf.Timest" + + "ampB\003\340A\003\022\026\n\ttarget_id\030\022 \001(\tB\003\340A\002\022J\n\016appr" + + "oval_state\030\014 \001(\0162-.google.cloud.deploy.v" + + "1.Rollout.ApprovalStateB\003\340A\003\0229\n\005state\030\r " + + "\001(\0162%.google.cloud.deploy.v1.Rollout.Sta" + + "teB\003\340A\003\022\033\n\016failure_reason\030\016 \001(\tB\003\340A\003\022@\n\017" + + "deploying_build\030\021 \001(\tB\'\340A\003\372A!\n\037cloudbuil" + + "d.googleapis.com/Build\022\014\n\004etag\030\020 \001(\t\022O\n\024" + + "deploy_failure_cause\030\023 \001(\0162,.google.clou" + + "d.deploy.v1.Rollout.FailureCauseB\003\340A\003\0222\n" + + "\006phases\030\027 \003(\0132\035.google.cloud.deploy.v1.P" + + "haseB\003\340A\003\0227\n\010metadata\030\030 \001(\0132 .google.clo" + + "ud.deploy.v1.MetadataB\003\340A\003\0322\n\020Annotation" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032-" + + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + + "\t:\0028\001\"{\n\rApprovalState\022\036\n\032APPROVAL_STATE" + + "_UNSPECIFIED\020\000\022\022\n\016NEEDS_APPROVAL\020\001\022\032\n\026DO" + + "ES_NOT_NEED_APPROVAL\020\002\022\014\n\010APPROVED\020\003\022\014\n\010" + + "REJECTED\020\004\"\231\001\n\005State\022\025\n\021STATE_UNSPECIFIE" + + "D\020\000\022\r\n\tSUCCEEDED\020\001\022\n\n\006FAILED\020\002\022\017\n\013IN_PRO" + + "GRESS\020\003\022\024\n\020PENDING_APPROVAL\020\004\022\025\n\021APPROVA" + + "L_REJECTED\020\005\022\013\n\007PENDING\020\006\022\023\n\017PENDING_REL" + + "EASE\020\007\"\305\001\n\014FailureCause\022\035\n\031FAILURE_CAUSE" + + "_UNSPECIFIED\020\000\022\033\n\027CLOUD_BUILD_UNAVAILABL" + + "E\020\001\022\024\n\020EXECUTION_FAILED\020\002\022\025\n\021DEADLINE_EX" + + "CEEDED\020\003\022\022\n\016RELEASE_FAILED\020\004\022\025\n\021RELEASE_" + + "ABANDONED\020\005\022!\n\035VERIFICATION_CONFIG_NOT_F" + + "OUND\020\006:\235\001\352A\231\001\n\"clouddeploy.googleapis.co" + + "m/Rollout\022sprojects/{project}/locations/" + + "{location}/deliveryPipelines/{delivery_p" + + "ipeline}/releases/{release}/rollouts/{ro" + + "llout}\"L\n\010Metadata\022@\n\tcloud_run\030\001 \001(\0132(." + + "google.cloud.deploy.v1.CloudRunMetadataB" + + "\003\340A\003\"X\n\024DeployJobRunMetadata\022@\n\tcloud_ru" + + "n\030\001 \001(\0132(.google.cloud.deploy.v1.CloudRu" + + "nMetadataB\003\340A\003\"Z\n\020CloudRunMetadata\022\024\n\007se" + + "rvice\030\001 \001(\tB\003\340A\003\022\031\n\014service_urls\030\002 \003(\tB\003" + + "\340A\003\022\025\n\010revision\030\003 \001(\tB\003\340A\003\"\207\002\n\005Phase\022\017\n\002" + + "id\030\001 \001(\tB\003\340A\003\0227\n\005state\030\003 \001(\0162#.google.cl" + + "oud.deploy.v1.Phase.StateB\003\340A\003\022F\n\017deploy" + + "ment_jobs\030\004 \001(\0132&.google.cloud.deploy.v1" + + ".DeploymentJobsB\003\340A\003H\000\"d\n\005State\022\025\n\021STATE" + + "_UNSPECIFIED\020\000\022\013\n\007PENDING\020\001\022\017\n\013IN_PROGRE" + + "SS\020\002\022\r\n\tSUCCEEDED\020\003\022\n\n\006FAILED\020\004\022\013\n\007ABORT" + + "ED\020\005B\006\n\004jobs\"|\n\016DeploymentJobs\0224\n\ndeploy" + + "_job\030\001 \001(\0132\033.google.cloud.deploy.v1.JobB" + + "\003\340A\003\0224\n\nverify_job\030\002 \001(\0132\033.google.cloud." + + "deploy.v1.JobB\003\340A\003\"\205\003\n\003Job\022\017\n\002id\030\001 \001(\tB\003" + + "\340A\003\0225\n\005state\030\002 \001(\0162!.google.cloud.deploy" + + ".v1.Job.StateB\003\340A\003\022:\n\007job_run\030\003 \001(\tB)\340A\003" + + "\372A#\n!clouddeploy.googleapis.com/JobRun\022<" + + "\n\ndeploy_job\030\004 \001(\0132!.google.cloud.deploy" + + ".v1.DeployJobB\003\340A\003H\000\022<\n\nverify_job\030\005 \001(\013" + + "2!.google.cloud.deploy.v1.VerifyJobB\003\340A\003" + + "H\000\"r\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007PE" + + "NDING\020\001\022\014\n\010DISABLED\020\002\022\017\n\013IN_PROGRESS\020\003\022\r" + + "\n\tSUCCEEDED\020\004\022\n\n\006FAILED\020\005\022\013\n\007ABORTED\020\006B\n" + + "\n\010job_type\"\013\n\tDeployJob\"\013\n\tVerifyJob\"\256\001\n" + + "\023ListRolloutsRequest\022:\n\006parent\030\001 \001(\tB*\340A" + + "\002\372A$\n\"clouddeploy.googleapis.com/Release" + + "\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003" + + " \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\022\025\n\010order_" + + "by\030\005 \001(\tB\003\340A\001\"w\n\024ListRolloutsResponse\0221\n" + + "\010rollouts\030\001 \003(\0132\037.google.cloud.deploy.v1" + + ".Rollout\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unr" + + "eachable\030\003 \003(\t\"M\n\021GetRolloutRequest\0228\n\004n" + + "ame\030\001 \001(\tB*\340A\002\372A$\n\"clouddeploy.googleapi" + + "s.com/Rollout\"\327\001\n\024CreateRolloutRequest\022:" + + "\n\006parent\030\001 \001(\tB*\340A\002\372A$\n\"clouddeploy.goog" + + "leapis.com/Release\022\027\n\nrollout_id\030\002 \001(\tB\003" + + "\340A\002\0225\n\007rollout\030\003 \001(\0132\037.google.cloud.depl" + + "oy.v1.RolloutB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003" + + "\340A\001\022\032\n\rvalidate_only\030\005 \001(\010B\003\340A\001\"\200\002\n\021Oper" + + "ationMetadata\0224\n\013create_time\030\001 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\003\340A\003\0221\n\010end_time\030" + + "\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\023" + + "\n\006target\030\003 \001(\tB\003\340A\003\022\021\n\004verb\030\004 \001(\tB\003\340A\003\022\033" + + "\n\016status_message\030\005 \001(\tB\003\340A\003\022#\n\026requested" + + "_cancellation\030\006 \001(\010B\003\340A\003\022\030\n\013api_version\030" + + "\007 \001(\tB\003\340A\003\"h\n\025ApproveRolloutRequest\0228\n\004n" + + "ame\030\001 \001(\tB*\340A\002\372A$\n\"clouddeploy.googleapi" + + "s.com/Rollout\022\025\n\010approved\030\002 \001(\010B\003\340A\002\"\030\n\026" + + "ApproveRolloutResponse\"z\n\017RetryJobReques" + + "t\022;\n\007rollout\030\001 \001(\tB*\340A\002\372A$\n\"clouddeploy." + + "googleapis.com/Rollout\022\025\n\010phase_id\030\002 \001(\t" + + "B\003\340A\002\022\023\n\006job_id\030\003 \001(\tB\003\340A\002\"\022\n\020RetryJobRe" + + "sponse\"Q\n\025AbandonReleaseRequest\0228\n\004name\030" + + "\001 \001(\tB*\340A\002\372A$\n\"clouddeploy.googleapis.co" + + "m/Release\"\030\n\026AbandonReleaseResponse\"\327\005\n\006" + + "JobRun\022\021\n\004name\030\001 \001(\tB\003\340A\001\022\020\n\003uid\030\002 \001(\tB\003" + + "\340A\003\022\025\n\010phase_id\030\003 \001(\tB\003\340A\003\022\023\n\006job_id\030\004 \001" + + "(\tB\003\340A\003\0224\n\013create_time\030\005 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003\0223\n\nstart_time\030\006 \001(" + + "\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n\010en" + + "d_time\030\007 \001(\0132\032.google.protobuf.Timestamp" + + "B\003\340A\003\0228\n\005state\030\010 \001(\0162$.google.cloud.depl" + + "oy.v1.JobRun.StateB\003\340A\003\022C\n\016deploy_job_ru" + + "n\030\t \001(\0132$.google.cloud.deploy.v1.DeployJ" + + "obRunB\003\340A\003H\000\022C\n\016verify_job_run\030\n \001(\0132$.g" + + "oogle.cloud.deploy.v1.VerifyJobRunB\003\340A\003H" + + "\000\022\021\n\004etag\030\013 \001(\tB\003\340A\003\"J\n\005State\022\025\n\021STATE_U" + + "NSPECIFIED\020\000\022\017\n\013IN_PROGRESS\020\001\022\r\n\tSUCCEED" + + "ED\020\002\022\n\n\006FAILED\020\003:\257\001\352A\253\001\n!clouddeploy.goo" + + "gleapis.com/JobRun\022\205\001projects/{project}/" + + "locations/{location}/deliveryPipelines/{" + + "delivery_pipeline}/releases/{release}/ro" + + "llouts/{rollout}/jobRuns/{job_run}B\t\n\007jo" + + "b_run\"\361\002\n\014DeployJobRun\0226\n\005build\030\001 \001(\tB\'\340" + + "A\003\372A!\n\037cloudbuild.googleapis.com/Build\022M" + + "\n\rfailure_cause\030\002 \001(\01621.google.cloud.dep" + + "loy.v1.DeployJobRun.FailureCauseB\003\340A\003\022\034\n" + + "\017failure_message\030\003 \001(\tB\003\340A\003\022C\n\010metadata\030" + + "\004 \001(\0132,.google.cloud.deploy.v1.DeployJob" + + "RunMetadataB\003\340A\003\"w\n\014FailureCause\022\035\n\031FAIL" + + "URE_CAUSE_UNSPECIFIED\020\000\022\033\n\027CLOUD_BUILD_U" + + "NAVAILABLE\020\001\022\024\n\020EXECUTION_FAILED\020\002\022\025\n\021DE" + + "ADLINE_EXCEEDED\020\003\"\210\003\n\014VerifyJobRun\0226\n\005bu" + + "ild\030\001 \001(\tB\'\340A\003\372A!\n\037cloudbuild.googleapis" + + ".com/Build\022\031\n\014artifact_uri\030\002 \001(\tB\003\340A\003\022\033\n" + + "\016event_log_path\030\003 \001(\tB\003\340A\003\022M\n\rfailure_ca" + + "use\030\004 \001(\01621.google.cloud.deploy.v1.Verif" + + "yJobRun.FailureCauseB\003\340A\003\022\034\n\017failure_mes" + + "sage\030\005 \001(\tB\003\340A\003\"\232\001\n\014FailureCause\022\035\n\031FAIL" + + "URE_CAUSE_UNSPECIFIED\020\000\022\033\n\027CLOUD_BUILD_U" + + "NAVAILABLE\020\001\022\024\n\020EXECUTION_FAILED\020\002\022\025\n\021DE" + + "ADLINE_EXCEEDED\020\003\022!\n\035VERIFICATION_CONFIG" + + "_NOT_FOUND\020\004\"\255\001\n\022ListJobRunsRequest\022:\n\006p" + + "arent\030\001 \001(\tB*\340A\002\372A$\n\"clouddeploy.googlea" + + "pis.com/Rollout\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022" + + "\027\n\npage_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\t" + + "B\003\340A\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"u\n\023ListJobR" + + "unsResponse\0220\n\010job_runs\030\001 \003(\0132\036.google.c" + + "loud.deploy.v1.JobRun\022\027\n\017next_page_token" + + "\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"K\n\020GetJobRun" + + "Request\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!clouddepl" + + "oy.googleapis.com/JobRun\"\337\001\n\006Config\022\014\n\004n" + + "ame\030\001 \001(\t\022H\n\022supported_versions\030\002 \003(\0132\'." + + "google.cloud.deploy.v1.SkaffoldVersionB\003" + + "\340A\003\022%\n\030default_skaffold_version\030\003 \001(\tB\003\340" + + "A\003:V\352AS\n!clouddeploy.googleapis.com/Conf" + + "ig\022.projects/{project}/locations/{locati" + + "on}/config\"O\n\017SkaffoldVersion\022\017\n\007version" + + "\030\001 \001(\t\022+\n\020support_end_date\030\002 \001(\0132\021.googl" + + "e.type.Date\"K\n\020GetConfigRequest\0227\n\004name\030" + + "\001 \001(\tB)\340A\002\372A#\n!clouddeploy.googleapis.co" + + "m/Config2\245$\n\013CloudDeploy\022\314\001\n\025ListDeliver" + + "yPipelines\0224.google.cloud.deploy.v1.List" + + "DeliveryPipelinesRequest\0325.google.cloud." + + "deploy.v1.ListDeliveryPipelinesResponse\"" + + "F\202\323\344\223\0027\0225/v1/{parent=projects/*/location" + + "s/*}/deliveryPipelines\332A\006parent\022\271\001\n\023GetD" + + "eliveryPipeline\0222.google.cloud.deploy.v1" + + ".GetDeliveryPipelineRequest\032(.google.clo" + + "ud.deploy.v1.DeliveryPipeline\"D\202\323\344\223\0027\0225/" + + "v1/{name=projects/*/locations/*/delivery" + + "Pipelines/*}\332A\004name\022\231\002\n\026CreateDeliveryPi" + + "peline\0225.google.cloud.deploy.v1.CreateDe" + + "liveryPipelineRequest\032\035.google.longrunni" + + "ng.Operation\"\250\001\202\323\344\223\002J\"5/v1/{parent=proje" + + "cts/*/locations/*}/deliveryPipelines:\021de" + + "livery_pipeline\332A-parent,delivery_pipeli" + + "ne,delivery_pipeline_id\312A%\n\020DeliveryPipe" + + "line\022\021OperationMetadata\022\233\002\n\026UpdateDelive" + + "ryPipeline\0225.google.cloud.deploy.v1.Upda" + + "teDeliveryPipelineRequest\032\035.google.longr" + + "unning.Operation\"\252\001\202\323\344\223\002\\2G/v1/{delivery" + + "_pipeline.name=projects/*/locations/*/de" + + "liveryPipelines/*}:\021delivery_pipeline\332A\035" + + "delivery_pipeline,update_mask\312A%\n\020Delive" + + "ryPipeline\022\021OperationMetadata\022\341\001\n\026Delete" + + "DeliveryPipeline\0225.google.cloud.deploy.v" + + "1.DeleteDeliveryPipelineRequest\032\035.google" + + ".longrunning.Operation\"q\202\323\344\223\0027*5/v1/{nam" + "e=projects/*/locations/*/deliveryPipelin" - + "es/*}\332A\004name\022\231\002\n\026CreateDeliveryPipeline\022" - + "5.google.cloud.deploy.v1.CreateDeliveryP" - + "ipelineRequest\032\035.google.longrunning.Oper" - + "ation\"\250\001\202\323\344\223\002J\"5/v1/{parent=projects/*/l" - + "ocations/*}/deliveryPipelines:\021delivery_" - + "pipeline\332A-parent,delivery_pipeline,deli" - + "very_pipeline_id\312A%\n\020DeliveryPipeline\022\021O" - + "perationMetadata\022\233\002\n\026UpdateDeliveryPipel" - + "ine\0225.google.cloud.deploy.v1.UpdateDeliv" - + "eryPipelineRequest\032\035.google.longrunning." - + "Operation\"\252\001\202\323\344\223\002\\2G/v1/{delivery_pipeli" - + "ne.name=projects/*/locations/*/deliveryP" - + "ipelines/*}:\021delivery_pipeline\332A\035deliver" - + "y_pipeline,update_mask\312A%\n\020DeliveryPipel" - + "ine\022\021OperationMetadata\022\341\001\n\026DeleteDeliver" - + "yPipeline\0225.google.cloud.deploy.v1.Delet" - + "eDeliveryPipelineRequest\032\035.google.longru" - + "nning.Operation\"q\202\323\344\223\0027*5/v1/{name=proje" - + "cts/*/locations/*/deliveryPipelines/*}\332A" - + "\004name\312A*\n\025google.protobuf.Empty\022\021Operati" - + "onMetadata\022\244\001\n\013ListTargets\022*.google.clou" - + "d.deploy.v1.ListTargetsRequest\032+.google." - + "cloud.deploy.v1.ListTargetsResponse\"<\202\323\344" - + "\223\002-\022+/v1/{parent=projects/*/locations/*}" - + "/targets\332A\006parent\022\221\001\n\tGetTarget\022(.google" - + ".cloud.deploy.v1.GetTargetRequest\032\036.goog" - + "le.cloud.deploy.v1.Target\":\202\323\344\223\002-\022+/v1/{" - + "name=projects/*/locations/*/targets/*}\332A" - + "\004name\022\317\001\n\014CreateTarget\022+.google.cloud.de" - + "ploy.v1.CreateTargetRequest\032\035.google.lon" - + "grunning.Operation\"s\202\323\344\223\0025\"+/v1/{parent=" - + "projects/*/locations/*}/targets:\006target\332" - + "A\027parent,target,target_id\312A\033\n\006Target\022\021Op" - + "erationMetadata\022\321\001\n\014UpdateTarget\022+.googl" - + "e.cloud.deploy.v1.UpdateTargetRequest\032\035." - + "google.longrunning.Operation\"u\202\323\344\223\002<22/v" - + "1/{target.name=projects/*/locations/*/ta" - + "rgets/*}:\006target\332A\022target,update_mask\312A\033" - + "\n\006Target\022\021OperationMetadata\022\303\001\n\014DeleteTa" - + "rget\022+.google.cloud.deploy.v1.DeleteTarg" - + "etRequest\032\035.google.longrunning.Operation" - + "\"g\202\323\344\223\002-*+/v1/{name=projects/*/locations" - + "/*/targets/*}\332A\004name\312A*\n\025google.protobuf" - + ".Empty\022\021OperationMetadata\022\274\001\n\014ListReleas" - + "es\022+.google.cloud.deploy.v1.ListReleases" - + "Request\032,.google.cloud.deploy.v1.ListRel" - + "easesResponse\"Q\202\323\344\223\002B\022@/v1/{parent=proje" - + "cts/*/locations/*/deliveryPipelines/*}/r" - + "eleases\332A\006parent\022\251\001\n\nGetRelease\022).google" - + ".cloud.deploy.v1.GetReleaseRequest\032\037.goo" - + "gle.cloud.deploy.v1.Release\"O\202\323\344\223\002B\022@/v1" + + "es/*}\332A\004name\312A*\n\025google.protobuf.Empty\022\021", + "OperationMetadata\022\244\001\n\013ListTargets\022*.goog" + + "le.cloud.deploy.v1.ListTargetsRequest\032+." + + "google.cloud.deploy.v1.ListTargetsRespon" + + "se\"<\202\323\344\223\002-\022+/v1/{parent=projects/*/locat" + + "ions/*}/targets\332A\006parent\022\221\001\n\tGetTarget\022(" + + ".google.cloud.deploy.v1.GetTargetRequest" + + "\032\036.google.cloud.deploy.v1.Target\":\202\323\344\223\002-" + + "\022+/v1/{name=projects/*/locations/*/targe" + + "ts/*}\332A\004name\022\317\001\n\014CreateTarget\022+.google.c" + + "loud.deploy.v1.CreateTargetRequest\032\035.goo" + + "gle.longrunning.Operation\"s\202\323\344\223\0025\"+/v1/{" + + "parent=projects/*/locations/*}/targets:\006" + + "target\332A\027parent,target,target_id\312A\033\n\006Tar" + + "get\022\021OperationMetadata\022\321\001\n\014UpdateTarget\022" + + "+.google.cloud.deploy.v1.UpdateTargetReq" + + "uest\032\035.google.longrunning.Operation\"u\202\323\344" + + "\223\002<22/v1/{target.name=projects/*/locatio" + + "ns/*/targets/*}:\006target\332A\022target,update_" + + "mask\312A\033\n\006Target\022\021OperationMetadata\022\303\001\n\014D" + + "eleteTarget\022+.google.cloud.deploy.v1.Del" + + "eteTargetRequest\032\035.google.longrunning.Op" + + "eration\"g\202\323\344\223\002-*+/v1/{name=projects/*/lo" + + "cations/*/targets/*}\332A\004name\312A*\n\025google.p" + + "rotobuf.Empty\022\021OperationMetadata\022\274\001\n\014Lis" + + "tReleases\022+.google.cloud.deploy.v1.ListR" + + "eleasesRequest\032,.google.cloud.deploy.v1." + + "ListReleasesResponse\"Q\202\323\344\223\002B\022@/v1/{paren" + + "t=projects/*/locations/*/deliveryPipelin" + + "es/*}/releases\332A\006parent\022\251\001\n\nGetRelease\022)" + + ".google.cloud.deploy.v1.GetReleaseReques" + + "t\032\037.google.cloud.deploy.v1.Release\"O\202\323\344\223" + + "\002B\022@/v1/{name=projects/*/locations/*/del" + + "iveryPipelines/*/releases/*}\332A\004name\022\353\001\n\r" + + "CreateRelease\022,.google.cloud.deploy.v1.C" + + "reateReleaseRequest\032\035.google.longrunning" + + ".Operation\"\214\001\202\323\344\223\002K\"@/v1/{parent=project" + + "s/*/locations/*/deliveryPipelines/*}/rel" + + "eases:\007release\332A\031parent,release,release_" + + "id\312A\034\n\007Release\022\021OperationMetadata\022\313\001\n\016Ab" + + "andonRelease\022-.google.cloud.deploy.v1.Ab" + + "andonReleaseRequest\032..google.cloud.deplo" + + "y.v1.AbandonReleaseResponse\"Z\202\323\344\223\002M\"H/v1" + "/{name=projects/*/locations/*/deliveryPi" - + "pelines/*/releases/*}\332A\004name\022\353\001\n\rCreateR" - + "elease\022,.google.cloud.deploy.v1.CreateRe" - + "leaseRequest\032\035.google.longrunning.Operat" - + "ion\"\214\001\202\323\344\223\002K\"@/v1/{parent=projects/*/loc" - + "ations/*/deliveryPipelines/*}/releases:\007" - + "release\332A\031parent,release,release_id\312A\034\n\007" - + "Release\022\021OperationMetadata\022\326\001\n\016ApproveRo" - + "llout\022-.google.cloud.deploy.v1.ApproveRo" - + "lloutRequest\032..google.cloud.deploy.v1.Ap" - + "proveRolloutResponse\"e\202\323\344\223\002X\"S/v1/{name=" - + "projects/*/locations/*/deliveryPipelines" - + "/*/releases/*/rollouts/*}:approve:\001*\332A\004n" - + "ame\022\307\001\n\014ListRollouts\022+.google.cloud.depl" - + "oy.v1.ListRolloutsRequest\032,.google.cloud" - + ".deploy.v1.ListRolloutsResponse\"\\\202\323\344\223\002M\022" - + "K/v1/{parent=projects/*/locations/*/deli" - + "veryPipelines/*/releases/*}/rollouts\332A\006p" - + "arent\022\264\001\n\nGetRollout\022).google.cloud.depl" - + "oy.v1.GetRolloutRequest\032\037.google.cloud.d" - + "eploy.v1.Rollout\"Z\202\323\344\223\002M\022K/v1/{name=proj" - + "ects/*/locations/*/deliveryPipelines/*/r" - + "eleases/*/rollouts/*}\332A\004name\022\366\001\n\rCreateR" - + "ollout\022,.google.cloud.deploy.v1.CreateRo" - + "lloutRequest\032\035.google.longrunning.Operat" - + "ion\"\227\001\202\323\344\223\002V\"K/v1/{parent=projects/*/loc" + + "pelines/*/releases/*}:abandon:\001*\332A\004name\022" + + "\326\001\n\016ApproveRollout\022-.google.cloud.deploy" + + ".v1.ApproveRolloutRequest\032..google.cloud" + + ".deploy.v1.ApproveRolloutResponse\"e\202\323\344\223\002" + + "X\"S/v1/{name=projects/*/locations/*/deli" + + "veryPipelines/*/releases/*/rollouts/*}:a" + + "pprove:\001*\332A\004name\022\307\001\n\014ListRollouts\022+.goog" + + "le.cloud.deploy.v1.ListRolloutsRequest\032," + + ".google.cloud.deploy.v1.ListRolloutsResp" + + "onse\"\\\202\323\344\223\002M\022K/v1/{parent=projects/*/loc" + "ations/*/deliveryPipelines/*/releases/*}" - + "/rollouts:\007rollout\332A\031parent,rollout,roll" - + "out_id\312A\034\n\007Rollout\022\021OperationMetadata\022\216\001" - + "\n\tGetConfig\022(.google.cloud.deploy.v1.Get" - + "ConfigRequest\032\036.google.cloud.deploy.v1.C" - + "onfig\"7\202\323\344\223\002*\022(/v1/{name=projects/*/loca" - + "tions/*/config}\332A\004name\032N\312A\032clouddeploy.g" - + "oogleapis.com\322A.https://www.googleapis.c" - + "om/auth/cloud-platformB\347\004\n\032com.google.cl" - + "oud.deploy.v1B\020CloudDeployProtoP\001Zprojects/{project}/locations/{loc" - + "ation}/operations/{operation}\352Ai\n$cloudb" - + "uild.googleapis.com/WorkerPool\022Aprojects" - + "/{project}/locations/{location}/workerPo" - + "ols/{worker_pool}\352Ad\n gkehub.googleapis." - + "com/Membership\022@projects/{project}/locat" - + "ions/{location}/memberships/{membership}" - + "b\006proto3" + + "/rollouts\332A\006parent\022\264\001\n\nGetRollout\022).goog" + + "le.cloud.deploy.v1.GetRolloutRequest\032\037.g" + + "oogle.cloud.deploy.v1.Rollout\"Z\202\323\344\223\002M\022K/" + + "v1/{name=projects/*/locations/*/delivery" + + "Pipelines/*/releases/*/rollouts/*}\332A\004nam" + + "e\022\366\001\n\rCreateRollout\022,.google.cloud.deplo" + + "y.v1.CreateRolloutRequest\032\035.google.longr" + + "unning.Operation\"\227\001\202\323\344\223\002V\"K/v1/{parent=p" + + "rojects/*/locations/*/deliveryPipelines/" + + "*/releases/*}/rollouts:\007rollout\332A\031parent" + + ",rollout,rollout_id\312A\034\n\007Rollout\022\021Operati" + + "onMetadata\022\333\001\n\010RetryJob\022\'.google.cloud.d" + + "eploy.v1.RetryJobRequest\032(.google.cloud." + + "deploy.v1.RetryJobResponse\"|\202\323\344\223\002\\\"W/v1/" + + "{rollout=projects/*/locations/*/delivery" + + "Pipelines/*/releases/*/rollouts/*}:retry" + + "Job:\001*\332A\027rollout,phase_id,job_id\022\316\001\n\013Lis" + + "tJobRuns\022*.google.cloud.deploy.v1.ListJo" + + "bRunsRequest\032+.google.cloud.deploy.v1.Li" + + "stJobRunsResponse\"f\202\323\344\223\002W\022U/v1/{parent=p" + + "rojects/*/locations/*/deliveryPipelines/" + + "*/releases/*/rollouts/*}/jobRuns\332A\006paren" + + "t\022\273\001\n\tGetJobRun\022(.google.cloud.deploy.v1" + + ".GetJobRunRequest\032\036.google.cloud.deploy." + + "v1.JobRun\"d\202\323\344\223\002W\022U/v1/{name=projects/*/" + + "locations/*/deliveryPipelines/*/releases" + + "/*/rollouts/*/jobRuns/*}\332A\004name\022\216\001\n\tGetC" + + "onfig\022(.google.cloud.deploy.v1.GetConfig" + + "Request\032\036.google.cloud.deploy.v1.Config\"" + + "7\202\323\344\223\002*\022(/v1/{name=projects/*/locations/" + + "*/config}\332A\004name\032N\312A\032clouddeploy.googlea" + + "pis.com\322A.https://www.googleapis.com/aut" + + "h/cloud-platformB\347\004\n\032com.google.cloud.de" + + "ploy.v1B\020CloudDeployProtoP\001Zprojects/{project}/locations/{location}" + + "/operations/{operation}\352Ai\n$cloudbuild.g" + + "oogleapis.com/WorkerPool\022Aprojects/{proj" + + "ect}/locations/{location}/workerPools/{w" + + "orker_pool}\352Ad\n gkehub.googleapis.com/Me" + + "mbership\022@projects/{project}/locations/{" + + "location}/memberships/{membership}b\006prot" + + "o3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -644,6 +845,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.type.DateProto.getDescriptor(), @@ -664,6 +866,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SerialPipeline", "Condition", "Etag", + "Suspended", "Pipeline", }); internal_static_google_cloud_deploy_v1_DeliveryPipeline_AnnotationsEntry_descriptor = @@ -696,10 +899,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_Stage_descriptor, new java.lang.String[] { - "TargetId", "Profiles", + "TargetId", "Profiles", "Strategy", }); - internal_static_google_cloud_deploy_v1_PipelineReadyCondition_descriptor = + internal_static_google_cloud_deploy_v1_Strategy_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_deploy_v1_Strategy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Strategy_descriptor, + new java.lang.String[] { + "Standard", "DeploymentStrategy", + }); + internal_static_google_cloud_deploy_v1_Standard_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_deploy_v1_Standard_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Standard_descriptor, + new java.lang.String[] { + "Verify", + }); + internal_static_google_cloud_deploy_v1_PipelineReadyCondition_descriptor = + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_deploy_v1_PipelineReadyCondition_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_PipelineReadyCondition_descriptor, @@ -707,7 +926,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Status", "UpdateTime", }); internal_static_google_cloud_deploy_v1_TargetsPresentCondition_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(6); internal_static_google_cloud_deploy_v1_TargetsPresentCondition_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_TargetsPresentCondition_descriptor, @@ -715,7 +934,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Status", "MissingTargets", "UpdateTime", }); internal_static_google_cloud_deploy_v1_PipelineCondition_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_deploy_v1_PipelineCondition_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_PipelineCondition_descriptor, @@ -723,7 +942,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PipelineReadyCondition", "TargetsPresentCondition", }); internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesRequest_descriptor, @@ -731,7 +950,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "Filter", "OrderBy", }); internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesResponse_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesResponse_descriptor, @@ -739,7 +958,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DeliveryPipelines", "NextPageToken", "Unreachable", }); internal_static_google_cloud_deploy_v1_GetDeliveryPipelineRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_deploy_v1_GetDeliveryPipelineRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_GetDeliveryPipelineRequest_descriptor, @@ -747,7 +966,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_deploy_v1_CreateDeliveryPipelineRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_deploy_v1_CreateDeliveryPipelineRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_CreateDeliveryPipelineRequest_descriptor, @@ -755,7 +974,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "DeliveryPipelineId", "DeliveryPipeline", "RequestId", "ValidateOnly", }); internal_static_google_cloud_deploy_v1_UpdateDeliveryPipelineRequest_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_deploy_v1_UpdateDeliveryPipelineRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_UpdateDeliveryPipelineRequest_descriptor, @@ -763,7 +982,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UpdateMask", "DeliveryPipeline", "RequestId", "AllowMissing", "ValidateOnly", }); internal_static_google_cloud_deploy_v1_DeleteDeliveryPipelineRequest_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_deploy_v1_DeleteDeliveryPipelineRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_DeleteDeliveryPipelineRequest_descriptor, @@ -771,7 +990,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "RequestId", "AllowMissing", "ValidateOnly", "Force", "Etag", }); internal_static_google_cloud_deploy_v1_Target_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_deploy_v1_Target_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_Target_descriptor, @@ -787,6 +1006,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UpdateTime", "Gke", "AnthosCluster", + "Run", "Etag", "ExecutionConfigs", "DeploymentTarget", @@ -808,7 +1028,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_deploy_v1_ExecutionConfig_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_deploy_v1_ExecutionConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ExecutionConfig_descriptor, @@ -819,10 +1039,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "WorkerPool", "ServiceAccount", "ArtifactStorage", + "ExecutionTimeout", "ExecutionEnvironment", }); internal_static_google_cloud_deploy_v1_DefaultPool_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_deploy_v1_DefaultPool_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_DefaultPool_descriptor, @@ -830,7 +1051,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ServiceAccount", "ArtifactStorage", }); internal_static_google_cloud_deploy_v1_PrivatePool_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_deploy_v1_PrivatePool_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_PrivatePool_descriptor, @@ -838,7 +1059,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "WorkerPool", "ServiceAccount", "ArtifactStorage", }); internal_static_google_cloud_deploy_v1_GkeCluster_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_deploy_v1_GkeCluster_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_GkeCluster_descriptor, @@ -846,15 +1067,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Cluster", "InternalIp", }); internal_static_google_cloud_deploy_v1_AnthosCluster_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_deploy_v1_AnthosCluster_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_AnthosCluster_descriptor, new java.lang.String[] { "Membership", }); + internal_static_google_cloud_deploy_v1_CloudRunLocation_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_deploy_v1_CloudRunLocation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_CloudRunLocation_descriptor, + new java.lang.String[] { + "Location", + }); internal_static_google_cloud_deploy_v1_ListTargetsRequest_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_deploy_v1_ListTargetsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ListTargetsRequest_descriptor, @@ -862,7 +1091,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "Filter", "OrderBy", }); internal_static_google_cloud_deploy_v1_ListTargetsResponse_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_deploy_v1_ListTargetsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ListTargetsResponse_descriptor, @@ -870,7 +1099,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Targets", "NextPageToken", "Unreachable", }); internal_static_google_cloud_deploy_v1_GetTargetRequest_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_deploy_v1_GetTargetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_GetTargetRequest_descriptor, @@ -878,7 +1107,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_deploy_v1_CreateTargetRequest_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_deploy_v1_CreateTargetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_CreateTargetRequest_descriptor, @@ -886,7 +1115,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "TargetId", "Target", "RequestId", "ValidateOnly", }); internal_static_google_cloud_deploy_v1_UpdateTargetRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_deploy_v1_UpdateTargetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_UpdateTargetRequest_descriptor, @@ -894,7 +1123,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UpdateMask", "Target", "RequestId", "AllowMissing", "ValidateOnly", }); internal_static_google_cloud_deploy_v1_DeleteTargetRequest_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(26); internal_static_google_cloud_deploy_v1_DeleteTargetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_DeleteTargetRequest_descriptor, @@ -902,7 +1131,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "RequestId", "AllowMissing", "ValidateOnly", "Etag", }); internal_static_google_cloud_deploy_v1_Release_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(27); internal_static_google_cloud_deploy_v1_Release_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_Release_descriptor, @@ -912,6 +1141,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Description", "Annotations", "Labels", + "Abandoned", "CreateTime", "RenderStartTime", "RenderEndTime", @@ -932,7 +1162,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_Release_TargetRender_descriptor, new java.lang.String[] { - "RenderingBuild", "RenderingState", "FailureCause", + "RenderingBuild", "RenderingState", "FailureCause", "FailureMessage", }); internal_static_google_cloud_deploy_v1_Release_AnnotationsEntry_descriptor = internal_static_google_cloud_deploy_v1_Release_descriptor.getNestedTypes().get(1); @@ -967,7 +1197,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_deploy_v1_BuildArtifact_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(28); internal_static_google_cloud_deploy_v1_BuildArtifact_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_BuildArtifact_descriptor, @@ -975,7 +1205,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Image", "Tag", }); internal_static_google_cloud_deploy_v1_TargetArtifact_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(29); internal_static_google_cloud_deploy_v1_TargetArtifact_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_TargetArtifact_descriptor, @@ -983,7 +1213,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ArtifactUri", "SkaffoldConfigPath", "ManifestPath", "Uri", }); internal_static_google_cloud_deploy_v1_ListReleasesRequest_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(30); internal_static_google_cloud_deploy_v1_ListReleasesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ListReleasesRequest_descriptor, @@ -991,7 +1221,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "Filter", "OrderBy", }); internal_static_google_cloud_deploy_v1_ListReleasesResponse_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(31); internal_static_google_cloud_deploy_v1_ListReleasesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ListReleasesResponse_descriptor, @@ -999,7 +1229,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Releases", "NextPageToken", "Unreachable", }); internal_static_google_cloud_deploy_v1_GetReleaseRequest_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(32); internal_static_google_cloud_deploy_v1_GetReleaseRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_GetReleaseRequest_descriptor, @@ -1007,7 +1237,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_deploy_v1_CreateReleaseRequest_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(33); internal_static_google_cloud_deploy_v1_CreateReleaseRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_CreateReleaseRequest_descriptor, @@ -1015,7 +1245,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "ReleaseId", "Release", "RequestId", "ValidateOnly", }); internal_static_google_cloud_deploy_v1_Rollout_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(34); internal_static_google_cloud_deploy_v1_Rollout_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_Rollout_descriptor, @@ -1037,6 +1267,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DeployingBuild", "Etag", "DeployFailureCause", + "Phases", + "Metadata", }); internal_static_google_cloud_deploy_v1_Rollout_AnnotationsEntry_descriptor = internal_static_google_cloud_deploy_v1_Rollout_descriptor.getNestedTypes().get(0); @@ -1054,8 +1286,66 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_deploy_v1_Metadata_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_google_cloud_deploy_v1_Metadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Metadata_descriptor, + new java.lang.String[] { + "CloudRun", + }); + internal_static_google_cloud_deploy_v1_DeployJobRunMetadata_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_google_cloud_deploy_v1_DeployJobRunMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_DeployJobRunMetadata_descriptor, + new java.lang.String[] { + "CloudRun", + }); + internal_static_google_cloud_deploy_v1_CloudRunMetadata_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_google_cloud_deploy_v1_CloudRunMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_CloudRunMetadata_descriptor, + new java.lang.String[] { + "Service", "ServiceUrls", "Revision", + }); + internal_static_google_cloud_deploy_v1_Phase_descriptor = + getDescriptor().getMessageTypes().get(38); + internal_static_google_cloud_deploy_v1_Phase_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Phase_descriptor, + new java.lang.String[] { + "Id", "State", "DeploymentJobs", "Jobs", + }); + internal_static_google_cloud_deploy_v1_DeploymentJobs_descriptor = + getDescriptor().getMessageTypes().get(39); + internal_static_google_cloud_deploy_v1_DeploymentJobs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_DeploymentJobs_descriptor, + new java.lang.String[] { + "DeployJob", "VerifyJob", + }); + internal_static_google_cloud_deploy_v1_Job_descriptor = + getDescriptor().getMessageTypes().get(40); + internal_static_google_cloud_deploy_v1_Job_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Job_descriptor, + new java.lang.String[] { + "Id", "State", "JobRun", "DeployJob", "VerifyJob", "JobType", + }); + internal_static_google_cloud_deploy_v1_DeployJob_descriptor = + getDescriptor().getMessageTypes().get(41); + internal_static_google_cloud_deploy_v1_DeployJob_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_DeployJob_descriptor, new java.lang.String[] {}); + internal_static_google_cloud_deploy_v1_VerifyJob_descriptor = + getDescriptor().getMessageTypes().get(42); + internal_static_google_cloud_deploy_v1_VerifyJob_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_VerifyJob_descriptor, new java.lang.String[] {}); internal_static_google_cloud_deploy_v1_ListRolloutsRequest_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(43); internal_static_google_cloud_deploy_v1_ListRolloutsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ListRolloutsRequest_descriptor, @@ -1063,7 +1353,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "Filter", "OrderBy", }); internal_static_google_cloud_deploy_v1_ListRolloutsResponse_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageTypes().get(44); internal_static_google_cloud_deploy_v1_ListRolloutsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ListRolloutsResponse_descriptor, @@ -1071,7 +1361,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Rollouts", "NextPageToken", "Unreachable", }); internal_static_google_cloud_deploy_v1_GetRolloutRequest_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageTypes().get(45); internal_static_google_cloud_deploy_v1_GetRolloutRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_GetRolloutRequest_descriptor, @@ -1079,7 +1369,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_deploy_v1_CreateRolloutRequest_descriptor = - getDescriptor().getMessageTypes().get(35); + getDescriptor().getMessageTypes().get(46); internal_static_google_cloud_deploy_v1_CreateRolloutRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_CreateRolloutRequest_descriptor, @@ -1087,7 +1377,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "RolloutId", "Rollout", "RequestId", "ValidateOnly", }); internal_static_google_cloud_deploy_v1_OperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(36); + getDescriptor().getMessageTypes().get(47); internal_static_google_cloud_deploy_v1_OperationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_OperationMetadata_descriptor, @@ -1101,7 +1391,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ApiVersion", }); internal_static_google_cloud_deploy_v1_ApproveRolloutRequest_descriptor = - getDescriptor().getMessageTypes().get(37); + getDescriptor().getMessageTypes().get(48); internal_static_google_cloud_deploy_v1_ApproveRolloutRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ApproveRolloutRequest_descriptor, @@ -1109,13 +1399,100 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Approved", }); internal_static_google_cloud_deploy_v1_ApproveRolloutResponse_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageTypes().get(49); internal_static_google_cloud_deploy_v1_ApproveRolloutResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ApproveRolloutResponse_descriptor, new java.lang.String[] {}); + internal_static_google_cloud_deploy_v1_RetryJobRequest_descriptor = + getDescriptor().getMessageTypes().get(50); + internal_static_google_cloud_deploy_v1_RetryJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_RetryJobRequest_descriptor, + new java.lang.String[] { + "Rollout", "PhaseId", "JobId", + }); + internal_static_google_cloud_deploy_v1_RetryJobResponse_descriptor = + getDescriptor().getMessageTypes().get(51); + internal_static_google_cloud_deploy_v1_RetryJobResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_RetryJobResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_deploy_v1_AbandonReleaseRequest_descriptor = + getDescriptor().getMessageTypes().get(52); + internal_static_google_cloud_deploy_v1_AbandonReleaseRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_AbandonReleaseRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_deploy_v1_AbandonReleaseResponse_descriptor = + getDescriptor().getMessageTypes().get(53); + internal_static_google_cloud_deploy_v1_AbandonReleaseResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_AbandonReleaseResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_deploy_v1_JobRun_descriptor = + getDescriptor().getMessageTypes().get(54); + internal_static_google_cloud_deploy_v1_JobRun_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_JobRun_descriptor, + new java.lang.String[] { + "Name", + "Uid", + "PhaseId", + "JobId", + "CreateTime", + "StartTime", + "EndTime", + "State", + "DeployJobRun", + "VerifyJobRun", + "Etag", + "JobRun", + }); + internal_static_google_cloud_deploy_v1_DeployJobRun_descriptor = + getDescriptor().getMessageTypes().get(55); + internal_static_google_cloud_deploy_v1_DeployJobRun_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_DeployJobRun_descriptor, + new java.lang.String[] { + "Build", "FailureCause", "FailureMessage", "Metadata", + }); + internal_static_google_cloud_deploy_v1_VerifyJobRun_descriptor = + getDescriptor().getMessageTypes().get(56); + internal_static_google_cloud_deploy_v1_VerifyJobRun_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_VerifyJobRun_descriptor, + new java.lang.String[] { + "Build", "ArtifactUri", "EventLogPath", "FailureCause", "FailureMessage", + }); + internal_static_google_cloud_deploy_v1_ListJobRunsRequest_descriptor = + getDescriptor().getMessageTypes().get(57); + internal_static_google_cloud_deploy_v1_ListJobRunsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_ListJobRunsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_deploy_v1_ListJobRunsResponse_descriptor = + getDescriptor().getMessageTypes().get(58); + internal_static_google_cloud_deploy_v1_ListJobRunsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_ListJobRunsResponse_descriptor, + new java.lang.String[] { + "JobRuns", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_deploy_v1_GetJobRunRequest_descriptor = + getDescriptor().getMessageTypes().get(59); + internal_static_google_cloud_deploy_v1_GetJobRunRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_GetJobRunRequest_descriptor, + new java.lang.String[] { + "Name", + }); internal_static_google_cloud_deploy_v1_Config_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageTypes().get(60); internal_static_google_cloud_deploy_v1_Config_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_Config_descriptor, @@ -1123,7 +1500,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "SupportedVersions", "DefaultSkaffoldVersion", }); internal_static_google_cloud_deploy_v1_SkaffoldVersion_descriptor = - getDescriptor().getMessageTypes().get(40); + getDescriptor().getMessageTypes().get(61); internal_static_google_cloud_deploy_v1_SkaffoldVersion_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_SkaffoldVersion_descriptor, @@ -1131,7 +1508,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Version", "SupportEndDate", }); internal_static_google_cloud_deploy_v1_GetConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(41); + getDescriptor().getMessageTypes().get(62); internal_static_google_cloud_deploy_v1_GetConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_GetConfigRequest_descriptor, @@ -1156,6 +1533,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.type.DateProto.getDescriptor(); diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunLocation.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunLocation.java new file mode 100644 index 0000000..4bf67a5 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunLocation.java @@ -0,0 +1,635 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Information specifying where to deploy a Cloud Run Service.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.CloudRunLocation} + */ +public final class CloudRunLocation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.CloudRunLocation) + CloudRunLocationOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudRunLocation.newBuilder() to construct. + private CloudRunLocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudRunLocation() { + location_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudRunLocation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CloudRunLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CloudRunLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.CloudRunLocation.class, + com.google.cloud.deploy.v1.CloudRunLocation.Builder.class); + } + + public static final int LOCATION_FIELD_NUMBER = 1; + private volatile java.lang.Object location_; + /** + * + * + *
+   * Required. The location for the Cloud Run Service. Format must be
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + 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(); + location_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The location for the Cloud Run Service. Format must be
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.CloudRunLocation)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.CloudRunLocation other = + (com.google.cloud.deploy.v1.CloudRunLocation) obj; + + if (!getLocation().equals(other.getLocation())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.CloudRunLocation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CloudRunLocation 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.deploy.v1.CloudRunLocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CloudRunLocation 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.deploy.v1.CloudRunLocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CloudRunLocation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.CloudRunLocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CloudRunLocation 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.deploy.v1.CloudRunLocation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CloudRunLocation 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.deploy.v1.CloudRunLocation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CloudRunLocation 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.deploy.v1.CloudRunLocation 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; + } + /** + * + * + *
+   * Information specifying where to deploy a Cloud Run Service.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.CloudRunLocation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.CloudRunLocation) + com.google.cloud.deploy.v1.CloudRunLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CloudRunLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CloudRunLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.CloudRunLocation.class, + com.google.cloud.deploy.v1.CloudRunLocation.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.CloudRunLocation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + location_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CloudRunLocation_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CloudRunLocation getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.CloudRunLocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CloudRunLocation build() { + com.google.cloud.deploy.v1.CloudRunLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CloudRunLocation buildPartial() { + com.google.cloud.deploy.v1.CloudRunLocation result = + new com.google.cloud.deploy.v1.CloudRunLocation(this); + result.location_ = location_; + 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.deploy.v1.CloudRunLocation) { + return mergeFrom((com.google.cloud.deploy.v1.CloudRunLocation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.CloudRunLocation other) { + if (other == com.google.cloud.deploy.v1.CloudRunLocation.getDefaultInstance()) return this; + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + location_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object location_ = ""; + /** + * + * + *
+     * Required. The location for the Cloud Run Service. Format must be
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The location for the Cloud Run Service. Format must be
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The location for the Cloud Run Service. Format must be
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + location_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The location for the Cloud Run Service. Format must be
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + + location_ = getDefaultInstance().getLocation(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The location for the Cloud Run Service. Format must be
+     * `projects/{project}/locations/{location}`.
+     * 
+ * + * + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + location_ = 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.deploy.v1.CloudRunLocation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.CloudRunLocation) + private static final com.google.cloud.deploy.v1.CloudRunLocation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.CloudRunLocation(); + } + + public static com.google.cloud.deploy.v1.CloudRunLocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudRunLocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CloudRunLocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunLocationOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunLocationOrBuilder.java new file mode 100644 index 0000000..c525069 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunLocationOrBuilder.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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface CloudRunLocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.CloudRunLocation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The location for the Cloud Run Service. Format must be
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The location. + */ + java.lang.String getLocation(); + /** + * + * + *
+   * Required. The location for the Cloud Run Service. Format must be
+   * `projects/{project}/locations/{location}`.
+   * 
+ * + * + * string location = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunMetadata.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunMetadata.java new file mode 100644 index 0000000..4289660 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunMetadata.java @@ -0,0 +1,1072 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * CloudRunMetadata contains information from a Cloud Run deployment.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.CloudRunMetadata} + */ +public final class CloudRunMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.CloudRunMetadata) + CloudRunMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudRunMetadata.newBuilder() to construct. + private CloudRunMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudRunMetadata() { + service_ = ""; + serviceUrls_ = com.google.protobuf.LazyStringArrayList.EMPTY; + revision_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudRunMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CloudRunMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CloudRunMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.CloudRunMetadata.class, + com.google.cloud.deploy.v1.CloudRunMetadata.Builder.class); + } + + public static final int SERVICE_FIELD_NUMBER = 1; + private volatile java.lang.Object service_; + /** + * + * + *
+   * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+   * Format is projects/{project}/locations/{location}/services/{service}.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The service. + */ + @java.lang.Override + public java.lang.String getService() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+   * Format is projects/{project}/locations/{location}/services/{service}.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for service. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_URLS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList serviceUrls_; + /** + * + * + *
+   * Output only. The Cloud Run Service urls that are associated with a `Rollout`.
+   * 
+ * + * repeated string service_urls = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the serviceUrls. + */ + public com.google.protobuf.ProtocolStringList getServiceUrlsList() { + return serviceUrls_; + } + /** + * + * + *
+   * Output only. The Cloud Run Service urls that are associated with a `Rollout`.
+   * 
+ * + * repeated string service_urls = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of serviceUrls. + */ + public int getServiceUrlsCount() { + return serviceUrls_.size(); + } + /** + * + * + *
+   * Output only. The Cloud Run Service urls that are associated with a `Rollout`.
+   * 
+ * + * repeated string service_urls = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The serviceUrls at the given index. + */ + public java.lang.String getServiceUrls(int index) { + return serviceUrls_.get(index); + } + /** + * + * + *
+   * Output only. The Cloud Run Service urls that are associated with a `Rollout`.
+   * 
+ * + * repeated string service_urls = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the serviceUrls at the given index. + */ + public com.google.protobuf.ByteString getServiceUrlsBytes(int index) { + return serviceUrls_.getByteString(index); + } + + public static final int REVISION_FIELD_NUMBER = 3; + private volatile java.lang.Object revision_; + /** + * + * + *
+   * Output only. The Cloud Run Revision id associated with a `Rollout`.
+   * 
+ * + * string revision = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The revision. + */ + @java.lang.Override + public java.lang.String getRevision() { + java.lang.Object ref = revision_; + 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(); + revision_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The Cloud Run Revision id associated with a `Rollout`.
+   * 
+ * + * string revision = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for revision. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRevisionBytes() { + java.lang.Object ref = revision_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + revision_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); + } + for (int i = 0; i < serviceUrls_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceUrls_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revision_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, revision_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); + } + { + int dataSize = 0; + for (int i = 0; i < serviceUrls_.size(); i++) { + dataSize += computeStringSizeNoTag(serviceUrls_.getRaw(i)); + } + size += dataSize; + size += 1 * getServiceUrlsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revision_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, revision_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.CloudRunMetadata)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.CloudRunMetadata other = + (com.google.cloud.deploy.v1.CloudRunMetadata) obj; + + if (!getService().equals(other.getService())) return false; + if (!getServiceUrlsList().equals(other.getServiceUrlsList())) return false; + if (!getRevision().equals(other.getRevision())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + if (getServiceUrlsCount() > 0) { + hash = (37 * hash) + SERVICE_URLS_FIELD_NUMBER; + hash = (53 * hash) + getServiceUrlsList().hashCode(); + } + hash = (37 * hash) + REVISION_FIELD_NUMBER; + hash = (53 * hash) + getRevision().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.CloudRunMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CloudRunMetadata 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.deploy.v1.CloudRunMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CloudRunMetadata 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.deploy.v1.CloudRunMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CloudRunMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.CloudRunMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CloudRunMetadata 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.deploy.v1.CloudRunMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CloudRunMetadata 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.deploy.v1.CloudRunMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CloudRunMetadata 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.deploy.v1.CloudRunMetadata 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; + } + /** + * + * + *
+   * CloudRunMetadata contains information from a Cloud Run deployment.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.CloudRunMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.CloudRunMetadata) + com.google.cloud.deploy.v1.CloudRunMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CloudRunMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CloudRunMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.CloudRunMetadata.class, + com.google.cloud.deploy.v1.CloudRunMetadata.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.CloudRunMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + service_ = ""; + + serviceUrls_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + revision_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CloudRunMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CloudRunMetadata getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.CloudRunMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CloudRunMetadata build() { + com.google.cloud.deploy.v1.CloudRunMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CloudRunMetadata buildPartial() { + com.google.cloud.deploy.v1.CloudRunMetadata result = + new com.google.cloud.deploy.v1.CloudRunMetadata(this); + int from_bitField0_ = bitField0_; + result.service_ = service_; + if (((bitField0_ & 0x00000001) != 0)) { + serviceUrls_ = serviceUrls_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.serviceUrls_ = serviceUrls_; + result.revision_ = revision_; + 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.deploy.v1.CloudRunMetadata) { + return mergeFrom((com.google.cloud.deploy.v1.CloudRunMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.CloudRunMetadata other) { + if (other == com.google.cloud.deploy.v1.CloudRunMetadata.getDefaultInstance()) return this; + if (!other.getService().isEmpty()) { + service_ = other.service_; + onChanged(); + } + if (!other.serviceUrls_.isEmpty()) { + if (serviceUrls_.isEmpty()) { + serviceUrls_ = other.serviceUrls_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServiceUrlsIsMutable(); + serviceUrls_.addAll(other.serviceUrls_); + } + onChanged(); + } + if (!other.getRevision().isEmpty()) { + revision_ = other.revision_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + service_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureServiceUrlsIsMutable(); + serviceUrls_.add(s); + break; + } // case 18 + case 26: + { + revision_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object service_ = ""; + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+     * Format is projects/{project}/locations/{location}/services/{service}.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The service. + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+     * Format is projects/{project}/locations/{location}/services/{service}.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for service. + */ + public com.google.protobuf.ByteString getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+     * Format is projects/{project}/locations/{location}/services/{service}.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + service_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+     * Format is projects/{project}/locations/{location}/services/{service}.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearService() { + + service_ = getDefaultInstance().getService(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+     * Format is projects/{project}/locations/{location}/services/{service}.
+     * 
+ * + * string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for service to set. + * @return This builder for chaining. + */ + public Builder setServiceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + service_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList serviceUrls_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureServiceUrlsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + serviceUrls_ = new com.google.protobuf.LazyStringArrayList(serviceUrls_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Output only. The Cloud Run Service urls that are associated with a `Rollout`.
+     * 
+ * + * repeated string service_urls = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the serviceUrls. + */ + public com.google.protobuf.ProtocolStringList getServiceUrlsList() { + return serviceUrls_.getUnmodifiableView(); + } + /** + * + * + *
+     * Output only. The Cloud Run Service urls that are associated with a `Rollout`.
+     * 
+ * + * repeated string service_urls = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of serviceUrls. + */ + public int getServiceUrlsCount() { + return serviceUrls_.size(); + } + /** + * + * + *
+     * Output only. The Cloud Run Service urls that are associated with a `Rollout`.
+     * 
+ * + * repeated string service_urls = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The serviceUrls at the given index. + */ + public java.lang.String getServiceUrls(int index) { + return serviceUrls_.get(index); + } + /** + * + * + *
+     * Output only. The Cloud Run Service urls that are associated with a `Rollout`.
+     * 
+ * + * repeated string service_urls = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the serviceUrls at the given index. + */ + public com.google.protobuf.ByteString getServiceUrlsBytes(int index) { + return serviceUrls_.getByteString(index); + } + /** + * + * + *
+     * Output only. The Cloud Run Service urls that are associated with a `Rollout`.
+     * 
+ * + * repeated string service_urls = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The serviceUrls to set. + * @return This builder for chaining. + */ + public Builder setServiceUrls(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceUrlsIsMutable(); + serviceUrls_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud Run Service urls that are associated with a `Rollout`.
+     * 
+ * + * repeated string service_urls = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The serviceUrls to add. + * @return This builder for chaining. + */ + public Builder addServiceUrls(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceUrlsIsMutable(); + serviceUrls_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud Run Service urls that are associated with a `Rollout`.
+     * 
+ * + * repeated string service_urls = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param values The serviceUrls to add. + * @return This builder for chaining. + */ + public Builder addAllServiceUrls(java.lang.Iterable values) { + ensureServiceUrlsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceUrls_); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud Run Service urls that are associated with a `Rollout`.
+     * 
+ * + * repeated string service_urls = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearServiceUrls() { + serviceUrls_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud Run Service urls that are associated with a `Rollout`.
+     * 
+ * + * repeated string service_urls = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes of the serviceUrls to add. + * @return This builder for chaining. + */ + public Builder addServiceUrlsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureServiceUrlsIsMutable(); + serviceUrls_.add(value); + onChanged(); + return this; + } + + private java.lang.Object revision_ = ""; + /** + * + * + *
+     * Output only. The Cloud Run Revision id associated with a `Rollout`.
+     * 
+ * + * string revision = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The revision. + */ + public java.lang.String getRevision() { + java.lang.Object ref = revision_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + revision_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The Cloud Run Revision id associated with a `Rollout`.
+     * 
+ * + * string revision = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for revision. + */ + public com.google.protobuf.ByteString getRevisionBytes() { + java.lang.Object ref = revision_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + revision_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The Cloud Run Revision id associated with a `Rollout`.
+     * 
+ * + * string revision = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The revision to set. + * @return This builder for chaining. + */ + public Builder setRevision(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + revision_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud Run Revision id associated with a `Rollout`.
+     * 
+ * + * string revision = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRevision() { + + revision_ = getDefaultInstance().getRevision(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud Run Revision id associated with a `Rollout`.
+     * 
+ * + * string revision = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for revision to set. + * @return This builder for chaining. + */ + public Builder setRevisionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + revision_ = 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.deploy.v1.CloudRunMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.CloudRunMetadata) + private static final com.google.cloud.deploy.v1.CloudRunMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.CloudRunMetadata(); + } + + public static com.google.cloud.deploy.v1.CloudRunMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudRunMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CloudRunMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunMetadataOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunMetadataOrBuilder.java new file mode 100644 index 0000000..b07c612 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunMetadataOrBuilder.java @@ -0,0 +1,128 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface CloudRunMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.CloudRunMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+   * Format is projects/{project}/locations/{location}/services/{service}.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The service. + */ + java.lang.String getService(); + /** + * + * + *
+   * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+   * Format is projects/{project}/locations/{location}/services/{service}.
+   * 
+ * + * string service = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for service. + */ + com.google.protobuf.ByteString getServiceBytes(); + + /** + * + * + *
+   * Output only. The Cloud Run Service urls that are associated with a `Rollout`.
+   * 
+ * + * repeated string service_urls = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the serviceUrls. + */ + java.util.List getServiceUrlsList(); + /** + * + * + *
+   * Output only. The Cloud Run Service urls that are associated with a `Rollout`.
+   * 
+ * + * repeated string service_urls = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of serviceUrls. + */ + int getServiceUrlsCount(); + /** + * + * + *
+   * Output only. The Cloud Run Service urls that are associated with a `Rollout`.
+   * 
+ * + * repeated string service_urls = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The serviceUrls at the given index. + */ + java.lang.String getServiceUrls(int index); + /** + * + * + *
+   * Output only. The Cloud Run Service urls that are associated with a `Rollout`.
+   * 
+ * + * repeated string service_urls = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the serviceUrls at the given index. + */ + com.google.protobuf.ByteString getServiceUrlsBytes(int index); + + /** + * + * + *
+   * Output only. The Cloud Run Revision id associated with a `Rollout`.
+   * 
+ * + * string revision = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The revision. + */ + java.lang.String getRevision(); + /** + * + * + *
+   * Output only. The Cloud Run Revision id associated with a `Rollout`.
+   * 
+ * + * string revision = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for revision. + */ + com.google.protobuf.ByteString getRevisionBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Config.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Config.java index c54eab3..130f6b0 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Config.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Config.java @@ -54,75 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Config( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - supportedVersions_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - supportedVersions_.add( - input.readMessage( - com.google.cloud.deploy.v1.SkaffoldVersion.parser(), extensionRegistry)); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - defaultSkaffoldVersion_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - supportedVersions_ = java.util.Collections.unmodifiableList(supportedVersions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_Config_descriptor; @@ -341,7 +272,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultSkaffoldVersion_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, defaultSkaffoldVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -360,7 +291,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultSkaffoldVersion_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, defaultSkaffoldVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -378,7 +309,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getSupportedVersionsList().equals(other.getSupportedVersionsList())) return false; if (!getDefaultSkaffoldVersion().equals(other.getDefaultSkaffoldVersion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -397,7 +328,7 @@ public int hashCode() { } hash = (37 * hash) + DEFAULT_SKAFFOLD_VERSION_FIELD_NUMBER; hash = (53 * hash) + getDefaultSkaffoldVersion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -525,19 +456,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.Config.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSupportedVersionsFieldBuilder(); - } } @java.lang.Override @@ -547,10 +469,11 @@ public Builder clear() { if (supportedVersionsBuilder_ == null) { supportedVersions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + supportedVersions_ = null; supportedVersionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); defaultSkaffoldVersion_ = ""; return this; @@ -675,7 +598,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.Config other) { defaultSkaffoldVersion_ = other.defaultSkaffoldVersion_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -690,17 +613,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.Config parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.cloud.deploy.v1.SkaffoldVersion m = + input.readMessage( + com.google.cloud.deploy.v1.SkaffoldVersion.parser(), extensionRegistry); + if (supportedVersionsBuilder_ == null) { + ensureSupportedVersionsIsMutable(); + supportedVersions_.add(m); + } else { + supportedVersionsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + defaultSkaffoldVersion_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.Config) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1355,7 +1317,18 @@ public Config parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Config(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequest.java index f0f2062..8b60a01 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequest.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequest.java @@ -54,87 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateDeliveryPipelineRequest( - 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 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - deliveryPipelineId_ = s; - break; - } - case 26: - { - com.google.cloud.deploy.v1.DeliveryPipeline.Builder subBuilder = null; - if (deliveryPipeline_ != null) { - subBuilder = deliveryPipeline_.toBuilder(); - } - deliveryPipeline_ = - input.readMessage( - com.google.cloud.deploy.v1.DeliveryPipeline.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deliveryPipeline_); - deliveryPipeline_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = s; - break; - } - case 40: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_CreateDeliveryPipelineRequest_descriptor; @@ -425,7 +344,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(5, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -449,7 +368,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -473,7 +392,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getRequestId().equals(other.getRequestId())) return false; if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -496,7 +415,7 @@ public int hashCode() { hash = (53 * hash) + getRequestId().hashCode(); hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -626,17 +545,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -760,7 +672,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.CreateDeliveryPipelineReques if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -775,18 +687,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + deliveryPipelineId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage( + getDeliveryPipelineFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 40: + { + validateOnly_ = input.readBool(); + + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1464,7 +1420,18 @@ public CreateDeliveryPipelineRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateDeliveryPipelineRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequest.java index b08053d..6b148c4 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequest.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequest.java @@ -54,86 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateReleaseRequest( - 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 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - releaseId_ = s; - break; - } - case 26: - { - com.google.cloud.deploy.v1.Release.Builder subBuilder = null; - if (release_ != null) { - subBuilder = release_.toBuilder(); - } - release_ = - input.readMessage(com.google.cloud.deploy.v1.Release.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(release_); - release_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = s; - break; - } - case 40: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_CreateReleaseRequest_descriptor; @@ -421,7 +341,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(5, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -445,7 +365,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -469,7 +389,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getRequestId().equals(other.getRequestId())) return false; if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -492,7 +412,7 @@ public int hashCode() { hash = (53 * hash) + getRequestId().hashCode(); hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -621,17 +541,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.CreateReleaseRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -755,7 +668,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.CreateReleaseRequest other) if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -770,17 +683,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.CreateReleaseRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + releaseId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getReleaseFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 40: + { + validateOnly_ = input.readBool(); + + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.CreateReleaseRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1453,7 +1410,18 @@ public CreateReleaseRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateReleaseRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequest.java index 2c8b837..e97d8d9 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequest.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequest.java @@ -54,86 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateRolloutRequest( - 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 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - rolloutId_ = s; - break; - } - case 26: - { - com.google.cloud.deploy.v1.Rollout.Builder subBuilder = null; - if (rollout_ != null) { - subBuilder = rollout_.toBuilder(); - } - rollout_ = - input.readMessage(com.google.cloud.deploy.v1.Rollout.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(rollout_); - rollout_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = s; - break; - } - case 40: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_CreateRolloutRequest_descriptor; @@ -421,7 +341,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(5, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -445,7 +365,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -469,7 +389,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getRequestId().equals(other.getRequestId())) return false; if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -492,7 +412,7 @@ public int hashCode() { hash = (53 * hash) + getRequestId().hashCode(); hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -621,17 +541,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.CreateRolloutRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -755,7 +668,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.CreateRolloutRequest other) if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -770,17 +683,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.CreateRolloutRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + rolloutId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getRolloutFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 40: + { + validateOnly_ = input.readBool(); + + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.CreateRolloutRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1453,7 +1410,18 @@ public CreateRolloutRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateRolloutRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequest.java index 9ea49a8..767b75a 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequest.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequest.java @@ -54,86 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateTargetRequest( - 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 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetId_ = s; - break; - } - case 26: - { - com.google.cloud.deploy.v1.Target.Builder subBuilder = null; - if (target_ != null) { - subBuilder = target_.toBuilder(); - } - target_ = - input.readMessage(com.google.cloud.deploy.v1.Target.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(target_); - target_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = s; - break; - } - case 40: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_CreateTargetRequest_descriptor; @@ -421,7 +341,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(5, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -445,7 +365,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -469,7 +389,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getRequestId().equals(other.getRequestId())) return false; if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -492,7 +412,7 @@ public int hashCode() { hash = (53 * hash) + getRequestId().hashCode(); hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -621,17 +541,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.CreateTargetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -754,7 +667,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.CreateTargetRequest other) { if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -769,17 +682,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.CreateTargetRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + targetId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getTargetFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 40: + { + validateOnly_ = input.readBool(); + + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.CreateTargetRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1446,7 +1403,18 @@ public CreateTargetRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateTargetRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DefaultPool.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DefaultPool.java index 26b3feb..7126782 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DefaultPool.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DefaultPool.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DefaultPool( - 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(); - - serviceAccount_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - artifactStorage_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_DefaultPool_descriptor; @@ -249,7 +196,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactStorage_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, artifactStorage_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -264,7 +211,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactStorage_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, artifactStorage_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -281,7 +228,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServiceAccount().equals(other.getServiceAccount())) return false; if (!getArtifactStorage().equals(other.getArtifactStorage())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -296,7 +243,7 @@ public int hashCode() { hash = (53 * hash) + getServiceAccount().hashCode(); hash = (37 * hash) + ARTIFACT_STORAGE_FIELD_NUMBER; hash = (53 * hash) + getArtifactStorage().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -425,17 +372,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.DefaultPool.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -531,7 +471,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.DefaultPool other) { artifactStorage_ = other.artifactStorage_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -546,17 +486,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.DefaultPool parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + serviceAccount_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + artifactStorage_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.DefaultPool) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -829,7 +795,18 @@ public DefaultPool parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DefaultPool(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequest.java index fc2e952..4c6194e 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequest.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequest.java @@ -54,81 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteDeliveryPipelineRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = s; - break; - } - case 24: - { - allowMissing_ = input.readBool(); - break; - } - case 32: - { - validateOnly_ = input.readBool(); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 48: - { - force_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_DeleteDeliveryPipelineRequest_descriptor; @@ -411,7 +336,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (force_ != false) { output.writeBool(6, force_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -438,7 +363,7 @@ public int getSerializedSize() { if (force_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, force_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -460,7 +385,7 @@ public boolean equals(final java.lang.Object obj) { if (getValidateOnly() != other.getValidateOnly()) return false; if (getForce() != other.getForce()) return false; if (!getEtag().equals(other.getEtag())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -483,7 +408,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); hash = (37 * hash) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -613,17 +538,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -745,7 +663,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.DeleteDeliveryPipelineReques etag_ = other.etag_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -760,18 +678,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + allowMissing_ = input.readBool(); + + break; + } // case 24 + case 32: + { + validateOnly_ = input.readBool(); + + break; + } // case 32 + case 42: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 48: + { + force_ = input.readBool(); + + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1368,7 +1335,18 @@ public DeleteDeliveryPipelineRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteDeliveryPipelineRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequest.java index 7cd326f..1ef329d 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequest.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequest.java @@ -54,76 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteTargetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = s; - break; - } - case 24: - { - allowMissing_ = input.readBool(); - break; - } - case 32: - { - validateOnly_ = input.readBool(); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_DeleteTargetRequest_descriptor; @@ -383,7 +313,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, etag_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -407,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, etag_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +358,7 @@ public boolean equals(final java.lang.Object obj) { if (getAllowMissing() != other.getAllowMissing()) return false; if (getValidateOnly() != other.getValidateOnly()) return false; if (!getEtag().equals(other.getEtag())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +379,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); hash = (37 * hash) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -578,17 +508,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.DeleteTargetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -703,7 +626,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.DeleteTargetRequest other) { etag_ = other.etag_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -718,17 +641,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.DeleteTargetRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + allowMissing_ = input.readBool(); + + break; + } // case 24 + case 32: + { + validateOnly_ = input.readBool(); + + break; + } // case 32 + case 42: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.DeleteTargetRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1267,7 +1234,18 @@ public DeleteTargetRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteTargetRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipeline.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipeline.java index 30cdcf9..9814a21 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipeline.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipeline.java @@ -57,164 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeliveryPipeline( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - uid_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - annotations_ = - com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry annotations__ = - input.readMessage( - AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 50: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 66: - { - com.google.cloud.deploy.v1.SerialPipeline.Builder subBuilder = null; - if (pipelineCase_ == 8) { - subBuilder = ((com.google.cloud.deploy.v1.SerialPipeline) pipeline_).toBuilder(); - } - pipeline_ = - input.readMessage( - com.google.cloud.deploy.v1.SerialPipeline.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.deploy.v1.SerialPipeline) pipeline_); - pipeline_ = subBuilder.buildPartial(); - } - pipelineCase_ = 8; - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 90: - { - com.google.cloud.deploy.v1.PipelineCondition.Builder subBuilder = null; - if (condition_ != null) { - subBuilder = condition_.toBuilder(); - } - condition_ = - input.readMessage( - com.google.cloud.deploy.v1.PipelineCondition.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(condition_); - condition_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_DeliveryPipeline_descriptor; @@ -467,9 +309,7 @@ public int getAnnotationsCount() { * *
    * User annotations. These attributes can only be set and used by the
-   * user, and not by Google Cloud Deploy. See
-   * https://google.aip.dev/128#annotations for more details such as format and
-   * size limitations.
+   * user, and not by Google Cloud Deploy.
    * 
* * map<string, string> annotations = 4; @@ -492,9 +332,7 @@ public java.util.Map getAnnotations() { * *
    * User annotations. These attributes can only be set and used by the
-   * user, and not by Google Cloud Deploy. See
-   * https://google.aip.dev/128#annotations for more details such as format and
-   * size limitations.
+   * user, and not by Google Cloud Deploy.
    * 
* * map<string, string> annotations = 4; @@ -508,9 +346,7 @@ public java.util.Map getAnnotationsMap() { * *
    * User annotations. These attributes can only be set and used by the
-   * user, and not by Google Cloud Deploy. See
-   * https://google.aip.dev/128#annotations for more details such as format and
-   * size limitations.
+   * user, and not by Google Cloud Deploy.
    * 
* * map<string, string> annotations = 4; @@ -529,9 +365,7 @@ public java.lang.String getAnnotationsOrDefault( * *
    * User annotations. These attributes can only be set and used by the
-   * user, and not by Google Cloud Deploy. See
-   * https://google.aip.dev/128#annotations for more details such as format and
-   * size limitations.
+   * user, and not by Google Cloud Deploy.
    * 
* * map<string, string> annotations = 4; @@ -941,6 +775,25 @@ public com.google.protobuf.ByteString getEtagBytes() { } } + public static final int SUSPENDED_FIELD_NUMBER = 12; + private boolean suspended_; + /** + * + * + *
+   * When suspended, no new releases or rollouts can be created,
+   * but in-progress ones will complete.
+   * 
+ * + * bool suspended = 12; + * + * @return The suspended. + */ + @java.lang.Override + public boolean getSuspended() { + return suspended_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -983,7 +836,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (condition_ != null) { output.writeMessage(11, getCondition()); } - unknownFields.writeTo(output); + if (suspended_ != false) { + output.writeBool(12, suspended_); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1038,7 +894,10 @@ public int getSerializedSize() { if (condition_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getCondition()); } - size += unknownFields.getSerializedSize(); + if (suspended_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(12, suspended_); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1072,6 +931,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCondition().equals(other.getCondition())) return false; } if (!getEtag().equals(other.getEtag())) return false; + if (getSuspended() != other.getSuspended()) return false; if (!getPipelineCase().equals(other.getPipelineCase())) return false; switch (pipelineCase_) { case 8: @@ -1080,7 +940,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1119,6 +979,8 @@ public int hashCode() { } hash = (37 * hash) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + SUSPENDED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSuspended()); switch (pipelineCase_) { case 8: hash = (37 * hash) + SERIAL_PIPELINE_FIELD_NUMBER; @@ -1127,7 +989,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1282,17 +1144,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.deploy.v1.DeliveryPipeline.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1318,6 +1173,9 @@ public Builder clear() { updateTime_ = null; updateTimeBuilder_ = null; } + if (serialPipelineBuilder_ != null) { + serialPipelineBuilder_.clear(); + } if (conditionBuilder_ == null) { condition_ = null; } else { @@ -1326,6 +1184,8 @@ public Builder clear() { } etag_ = ""; + suspended_ = false; + pipelineCase_ = 0; pipeline_ = null; return this; @@ -1386,6 +1246,7 @@ public com.google.cloud.deploy.v1.DeliveryPipeline buildPartial() { result.condition_ = conditionBuilder_.build(); } result.etag_ = etag_; + result.suspended_ = suspended_; result.pipelineCase_ = pipelineCase_; onBuilt(); return result; @@ -1463,6 +1324,9 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.DeliveryPipeline other) { etag_ = other.etag_; onChanged(); } + if (other.getSuspended() != false) { + setSuspended(other.getSuspended()); + } switch (other.getPipelineCase()) { case SERIAL_PIPELINE: { @@ -1474,7 +1338,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.DeliveryPipeline other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1489,17 +1353,107 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.DeliveryPipeline parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 42 + case 50: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 66: + { + input.readMessage(getSerialPipelineFieldBuilder().getBuilder(), extensionRegistry); + pipelineCase_ = 8; + break; + } // case 66 + case 82: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 90: + { + input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 90 + case 96: + { + suspended_ = input.readBool(); + + break; + } // case 96 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.DeliveryPipeline) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1875,9 +1829,7 @@ public int getAnnotationsCount() { * *
      * User annotations. These attributes can only be set and used by the
-     * user, and not by Google Cloud Deploy. See
-     * https://google.aip.dev/128#annotations for more details such as format and
-     * size limitations.
+     * user, and not by Google Cloud Deploy.
      * 
* * map<string, string> annotations = 4; @@ -1900,9 +1852,7 @@ public java.util.Map getAnnotations() { * *
      * User annotations. These attributes can only be set and used by the
-     * user, and not by Google Cloud Deploy. See
-     * https://google.aip.dev/128#annotations for more details such as format and
-     * size limitations.
+     * user, and not by Google Cloud Deploy.
      * 
* * map<string, string> annotations = 4; @@ -1916,9 +1866,7 @@ public java.util.Map getAnnotationsMap() { * *
      * User annotations. These attributes can only be set and used by the
-     * user, and not by Google Cloud Deploy. See
-     * https://google.aip.dev/128#annotations for more details such as format and
-     * size limitations.
+     * user, and not by Google Cloud Deploy.
      * 
* * map<string, string> annotations = 4; @@ -1937,9 +1885,7 @@ public java.lang.String getAnnotationsOrDefault( * *
      * User annotations. These attributes can only be set and used by the
-     * user, and not by Google Cloud Deploy. See
-     * https://google.aip.dev/128#annotations for more details such as format and
-     * size limitations.
+     * user, and not by Google Cloud Deploy.
      * 
* * map<string, string> annotations = 4; @@ -1965,9 +1911,7 @@ public Builder clearAnnotations() { * *
      * User annotations. These attributes can only be set and used by the
-     * user, and not by Google Cloud Deploy. See
-     * https://google.aip.dev/128#annotations for more details such as format and
-     * size limitations.
+     * user, and not by Google Cloud Deploy.
      * 
* * map<string, string> annotations = 4; @@ -1989,9 +1933,7 @@ public java.util.Map getMutableAnnotations() * *
      * User annotations. These attributes can only be set and used by the
-     * user, and not by Google Cloud Deploy. See
-     * https://google.aip.dev/128#annotations for more details such as format and
-     * size limitations.
+     * user, and not by Google Cloud Deploy.
      * 
* * map<string, string> annotations = 4; @@ -2012,9 +1954,7 @@ public Builder putAnnotations(java.lang.String key, java.lang.String value) { * *
      * User annotations. These attributes can only be set and used by the
-     * user, and not by Google Cloud Deploy. See
-     * https://google.aip.dev/128#annotations for more details such as format and
-     * size limitations.
+     * user, and not by Google Cloud Deploy.
      * 
* * map<string, string> annotations = 4; @@ -3186,6 +3126,61 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { return this; } + private boolean suspended_; + /** + * + * + *
+     * When suspended, no new releases or rollouts can be created,
+     * but in-progress ones will complete.
+     * 
+ * + * bool suspended = 12; + * + * @return The suspended. + */ + @java.lang.Override + public boolean getSuspended() { + return suspended_; + } + /** + * + * + *
+     * When suspended, no new releases or rollouts can be created,
+     * but in-progress ones will complete.
+     * 
+ * + * bool suspended = 12; + * + * @param value The suspended to set. + * @return This builder for chaining. + */ + public Builder setSuspended(boolean value) { + + suspended_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * When suspended, no new releases or rollouts can be created,
+     * but in-progress ones will complete.
+     * 
+ * + * bool suspended = 12; + * + * @return This builder for chaining. + */ + public Builder clearSuspended() { + + suspended_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -3218,7 +3213,18 @@ public DeliveryPipeline parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeliveryPipeline(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineNotificationEvent.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineNotificationEvent.java index 2e617b9..3e434f7 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineNotificationEvent.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineNotificationEvent.java @@ -57,66 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeliveryPipelineNotificationEvent( - 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(); - - message_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - deliveryPipeline_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.DeliveryPipelineNotificationPayloadProto .internal_static_google_cloud_deploy_v1_DeliveryPipelineNotificationEvent_descriptor; @@ -288,7 +228,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (type_ != com.google.cloud.deploy.v1.Type.TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(3, type_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -306,7 +246,7 @@ public int getSerializedSize() { if (type_ != com.google.cloud.deploy.v1.Type.TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -325,7 +265,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMessage().equals(other.getMessage())) return false; if (!getDeliveryPipeline().equals(other.getDeliveryPipeline())) return false; if (type_ != other.type_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -342,7 +282,7 @@ public int hashCode() { hash = (53 * hash) + getDeliveryPipeline().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -474,17 +414,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.DeliveryPipelineNotificationEvent.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -589,7 +522,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.DeliveryPipelineNotification if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -604,18 +537,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.DeliveryPipelineNotificationEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + message_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + deliveryPipeline_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + type_ = input.readEnum(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.deploy.v1.DeliveryPipelineNotificationEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -954,7 +918,18 @@ public DeliveryPipelineNotificationEvent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeliveryPipelineNotificationEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineOrBuilder.java index da244e4..01dcf63 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineOrBuilder.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineOrBuilder.java @@ -105,9 +105,7 @@ public interface DeliveryPipelineOrBuilder * *
    * User annotations. These attributes can only be set and used by the
-   * user, and not by Google Cloud Deploy. See
-   * https://google.aip.dev/128#annotations for more details such as format and
-   * size limitations.
+   * user, and not by Google Cloud Deploy.
    * 
* * map<string, string> annotations = 4; @@ -118,9 +116,7 @@ public interface DeliveryPipelineOrBuilder * *
    * User annotations. These attributes can only be set and used by the
-   * user, and not by Google Cloud Deploy. See
-   * https://google.aip.dev/128#annotations for more details such as format and
-   * size limitations.
+   * user, and not by Google Cloud Deploy.
    * 
* * map<string, string> annotations = 4; @@ -134,9 +130,7 @@ public interface DeliveryPipelineOrBuilder * *
    * User annotations. These attributes can only be set and used by the
-   * user, and not by Google Cloud Deploy. See
-   * https://google.aip.dev/128#annotations for more details such as format and
-   * size limitations.
+   * user, and not by Google Cloud Deploy.
    * 
* * map<string, string> annotations = 4; @@ -147,9 +141,7 @@ public interface DeliveryPipelineOrBuilder * *
    * User annotations. These attributes can only be set and used by the
-   * user, and not by Google Cloud Deploy. See
-   * https://google.aip.dev/128#annotations for more details such as format and
-   * size limitations.
+   * user, and not by Google Cloud Deploy.
    * 
* * map<string, string> annotations = 4; @@ -165,9 +157,7 @@ java.lang.String getAnnotationsOrDefault( * *
    * User annotations. These attributes can only be set and used by the
-   * user, and not by Google Cloud Deploy. See
-   * https://google.aip.dev/128#annotations for more details such as format and
-   * size limitations.
+   * user, and not by Google Cloud Deploy.
    * 
* * map<string, string> annotations = 4; @@ -462,5 +452,19 @@ java.lang.String getLabelsOrDefault( */ com.google.protobuf.ByteString getEtagBytes(); + /** + * + * + *
+   * When suspended, no new releases or rollouts can be created,
+   * but in-progress ones will complete.
+   * 
+ * + * bool suspended = 12; + * + * @return The suspended. + */ + boolean getSuspended(); + public com.google.cloud.deploy.v1.DeliveryPipeline.PipelineCase getPipelineCase(); } diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJob.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJob.java new file mode 100644 index 0000000..158f8e1 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJob.java @@ -0,0 +1,432 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * A deploy Job.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.DeployJob} + */ +public final class DeployJob extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.DeployJob) + DeployJobOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeployJob.newBuilder() to construct. + private DeployJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeployJob() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeployJob(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeployJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeployJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.DeployJob.class, + com.google.cloud.deploy.v1.DeployJob.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.DeployJob)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.DeployJob other = (com.google.cloud.deploy.v1.DeployJob) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.DeployJob parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeployJob 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.deploy.v1.DeployJob parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeployJob 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.deploy.v1.DeployJob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeployJob parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.DeployJob parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeployJob 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.deploy.v1.DeployJob parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeployJob 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.deploy.v1.DeployJob parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeployJob 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.deploy.v1.DeployJob prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A deploy Job.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.DeployJob} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.DeployJob) + com.google.cloud.deploy.v1.DeployJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeployJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeployJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.DeployJob.class, + com.google.cloud.deploy.v1.DeployJob.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.DeployJob.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeployJob_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJob getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.DeployJob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJob build() { + com.google.cloud.deploy.v1.DeployJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJob buildPartial() { + com.google.cloud.deploy.v1.DeployJob result = new com.google.cloud.deploy.v1.DeployJob(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.DeployJob) { + return mergeFrom((com.google.cloud.deploy.v1.DeployJob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.DeployJob other) { + if (other == com.google.cloud.deploy.v1.DeployJob.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.DeployJob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.DeployJob) + private static final com.google.cloud.deploy.v1.DeployJob DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.DeployJob(); + } + + public static com.google.cloud.deploy.v1.DeployJob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeployJob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobOrBuilder.java new file mode 100644 index 0000000..0b7ec80 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobOrBuilder.java @@ -0,0 +1,24 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface DeployJobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.DeployJob) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRun.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRun.java new file mode 100644 index 0000000..32ba3e2 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRun.java @@ -0,0 +1,1467 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * DeployJobRun contains information specific to a deploy `JobRun`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.DeployJobRun} + */ +public final class DeployJobRun extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.DeployJobRun) + DeployJobRunOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeployJobRun.newBuilder() to construct. + private DeployJobRun(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeployJobRun() { + build_ = ""; + failureCause_ = 0; + failureMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeployJobRun(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeployJobRun_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeployJobRun_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.DeployJobRun.class, + com.google.cloud.deploy.v1.DeployJobRun.Builder.class); + } + + /** + * + * + *
+   * Well-known deploy failures.
+   * 
+ * + * Protobuf enum {@code google.cloud.deploy.v1.DeployJobRun.FailureCause} + */ + public enum FailureCause implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No reason for failure is specified.
+     * 
+ * + * FAILURE_CAUSE_UNSPECIFIED = 0; + */ + FAILURE_CAUSE_UNSPECIFIED(0), + /** + * + * + *
+     * Cloud Build is not available, either because it is not enabled or because
+     * Google Cloud Deploy has insufficient permissions. See [Required
+     * permission](/deploy/docs/cloud-deploy-service-account#required_permissions).
+     * 
+ * + * CLOUD_BUILD_UNAVAILABLE = 1; + */ + CLOUD_BUILD_UNAVAILABLE(1), + /** + * + * + *
+     * The deploy operation did not complete successfully; check Cloud Build
+     * logs.
+     * 
+ * + * EXECUTION_FAILED = 2; + */ + EXECUTION_FAILED(2), + /** + * + * + *
+     * The deploy build did not complete within the alloted time.
+     * 
+ * + * DEADLINE_EXCEEDED = 3; + */ + DEADLINE_EXCEEDED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No reason for failure is specified.
+     * 
+ * + * FAILURE_CAUSE_UNSPECIFIED = 0; + */ + public static final int FAILURE_CAUSE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Cloud Build is not available, either because it is not enabled or because
+     * Google Cloud Deploy has insufficient permissions. See [Required
+     * permission](/deploy/docs/cloud-deploy-service-account#required_permissions).
+     * 
+ * + * CLOUD_BUILD_UNAVAILABLE = 1; + */ + public static final int CLOUD_BUILD_UNAVAILABLE_VALUE = 1; + /** + * + * + *
+     * The deploy operation did not complete successfully; check Cloud Build
+     * logs.
+     * 
+ * + * EXECUTION_FAILED = 2; + */ + public static final int EXECUTION_FAILED_VALUE = 2; + /** + * + * + *
+     * The deploy build did not complete within the alloted time.
+     * 
+ * + * DEADLINE_EXCEEDED = 3; + */ + public static final int DEADLINE_EXCEEDED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FailureCause 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 FailureCause forNumber(int value) { + switch (value) { + case 0: + return FAILURE_CAUSE_UNSPECIFIED; + case 1: + return CLOUD_BUILD_UNAVAILABLE; + case 2: + return EXECUTION_FAILED; + case 3: + return DEADLINE_EXCEEDED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FailureCause findValueByNumber(int number) { + return FailureCause.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.deploy.v1.DeployJobRun.getDescriptor().getEnumTypes().get(0); + } + + private static final FailureCause[] VALUES = values(); + + public static FailureCause 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 FailureCause(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.deploy.v1.DeployJobRun.FailureCause) + } + + public static final int BUILD_FIELD_NUMBER = 1; + private volatile java.lang.Object build_; + /** + * + * + *
+   * Output only. The resource name of the Cloud Build `Build` object that is used to deploy.
+   * Format is projects/{project}/locations/{location}/builds/{build}.
+   * 
+ * + * + * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The build. + */ + @java.lang.Override + public java.lang.String getBuild() { + java.lang.Object ref = build_; + 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(); + build_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the Cloud Build `Build` object that is used to deploy.
+   * Format is projects/{project}/locations/{location}/builds/{build}.
+   * 
+ * + * + * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for build. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBuildBytes() { + java.lang.Object ref = build_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + build_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FAILURE_CAUSE_FIELD_NUMBER = 2; + private int failureCause_; + /** + * + * + *
+   * Output only. The reason the deploy failed. This will always be unspecified while the
+   * deploy is in progress or if it succeeded.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun.FailureCause failure_cause = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for failureCause. + */ + @java.lang.Override + public int getFailureCauseValue() { + return failureCause_; + } + /** + * + * + *
+   * Output only. The reason the deploy failed. This will always be unspecified while the
+   * deploy is in progress or if it succeeded.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun.FailureCause failure_cause = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The failureCause. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJobRun.FailureCause getFailureCause() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.DeployJobRun.FailureCause result = + com.google.cloud.deploy.v1.DeployJobRun.FailureCause.valueOf(failureCause_); + return result == null + ? com.google.cloud.deploy.v1.DeployJobRun.FailureCause.UNRECOGNIZED + : result; + } + + public static final int FAILURE_MESSAGE_FIELD_NUMBER = 3; + private volatile java.lang.Object failureMessage_; + /** + * + * + *
+   * Output only. Additional information about the deploy failure, if available.
+   * 
+ * + * string failure_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failureMessage. + */ + @java.lang.Override + public java.lang.String getFailureMessage() { + java.lang.Object ref = failureMessage_; + 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(); + failureMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Additional information about the deploy failure, if available.
+   * 
+ * + * string failure_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for failureMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFailureMessageBytes() { + java.lang.Object ref = failureMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + failureMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_FIELD_NUMBER = 4; + private com.google.cloud.deploy.v1.DeployJobRunMetadata metadata_; + /** + * + * + *
+   * Output only. Metadata containing information about the deploy job run.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRunMetadata metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * + * + *
+   * Output only. Metadata containing information about the deploy job run.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRunMetadata metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJobRunMetadata getMetadata() { + return metadata_ == null + ? com.google.cloud.deploy.v1.DeployJobRunMetadata.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * Output only. Metadata containing information about the deploy job run.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRunMetadata metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJobRunMetadataOrBuilder getMetadataOrBuilder() { + return getMetadata(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(build_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, build_); + } + if (failureCause_ + != com.google.cloud.deploy.v1.DeployJobRun.FailureCause.FAILURE_CAUSE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, failureCause_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(failureMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, failureMessage_); + } + if (metadata_ != null) { + output.writeMessage(4, getMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(build_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, build_); + } + if (failureCause_ + != com.google.cloud.deploy.v1.DeployJobRun.FailureCause.FAILURE_CAUSE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, failureCause_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(failureMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, failureMessage_); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getMetadata()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.DeployJobRun)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.DeployJobRun other = (com.google.cloud.deploy.v1.DeployJobRun) obj; + + if (!getBuild().equals(other.getBuild())) return false; + if (failureCause_ != other.failureCause_) return false; + if (!getFailureMessage().equals(other.getFailureMessage())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BUILD_FIELD_NUMBER; + hash = (53 * hash) + getBuild().hashCode(); + hash = (37 * hash) + FAILURE_CAUSE_FIELD_NUMBER; + hash = (53 * hash) + failureCause_; + hash = (37 * hash) + FAILURE_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getFailureMessage().hashCode(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.DeployJobRun parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeployJobRun 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.deploy.v1.DeployJobRun parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeployJobRun 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.deploy.v1.DeployJobRun parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeployJobRun parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.DeployJobRun parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeployJobRun 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.deploy.v1.DeployJobRun parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeployJobRun 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.deploy.v1.DeployJobRun parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeployJobRun 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.deploy.v1.DeployJobRun 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; + } + /** + * + * + *
+   * DeployJobRun contains information specific to a deploy `JobRun`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.DeployJobRun} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.DeployJobRun) + com.google.cloud.deploy.v1.DeployJobRunOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeployJobRun_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeployJobRun_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.DeployJobRun.class, + com.google.cloud.deploy.v1.DeployJobRun.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.DeployJobRun.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + build_ = ""; + + failureCause_ = 0; + + failureMessage_ = ""; + + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeployJobRun_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJobRun getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.DeployJobRun.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJobRun build() { + com.google.cloud.deploy.v1.DeployJobRun result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJobRun buildPartial() { + com.google.cloud.deploy.v1.DeployJobRun result = + new com.google.cloud.deploy.v1.DeployJobRun(this); + result.build_ = build_; + result.failureCause_ = failureCause_; + result.failureMessage_ = failureMessage_; + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.DeployJobRun) { + return mergeFrom((com.google.cloud.deploy.v1.DeployJobRun) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.DeployJobRun other) { + if (other == com.google.cloud.deploy.v1.DeployJobRun.getDefaultInstance()) return this; + if (!other.getBuild().isEmpty()) { + build_ = other.build_; + onChanged(); + } + if (other.failureCause_ != 0) { + setFailureCauseValue(other.getFailureCauseValue()); + } + if (!other.getFailureMessage().isEmpty()) { + failureMessage_ = other.failureMessage_; + onChanged(); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + build_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + failureCause_ = input.readEnum(); + + break; + } // case 16 + case 26: + { + failureMessage_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object build_ = ""; + /** + * + * + *
+     * Output only. The resource name of the Cloud Build `Build` object that is used to deploy.
+     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * 
+ * + * + * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The build. + */ + public java.lang.String getBuild() { + java.lang.Object ref = build_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + build_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the Cloud Build `Build` object that is used to deploy.
+     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * 
+ * + * + * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for build. + */ + public com.google.protobuf.ByteString getBuildBytes() { + java.lang.Object ref = build_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + build_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the Cloud Build `Build` object that is used to deploy.
+     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * 
+ * + * + * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The build to set. + * @return This builder for chaining. + */ + public Builder setBuild(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + build_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the Cloud Build `Build` object that is used to deploy.
+     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * 
+ * + * + * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearBuild() { + + build_ = getDefaultInstance().getBuild(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the Cloud Build `Build` object that is used to deploy.
+     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * 
+ * + * + * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for build to set. + * @return This builder for chaining. + */ + public Builder setBuildBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + build_ = value; + onChanged(); + return this; + } + + private int failureCause_ = 0; + /** + * + * + *
+     * Output only. The reason the deploy failed. This will always be unspecified while the
+     * deploy is in progress or if it succeeded.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun.FailureCause failure_cause = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for failureCause. + */ + @java.lang.Override + public int getFailureCauseValue() { + return failureCause_; + } + /** + * + * + *
+     * Output only. The reason the deploy failed. This will always be unspecified while the
+     * deploy is in progress or if it succeeded.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun.FailureCause failure_cause = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for failureCause to set. + * @return This builder for chaining. + */ + public Builder setFailureCauseValue(int value) { + + failureCause_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The reason the deploy failed. This will always be unspecified while the
+     * deploy is in progress or if it succeeded.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun.FailureCause failure_cause = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The failureCause. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJobRun.FailureCause getFailureCause() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.DeployJobRun.FailureCause result = + com.google.cloud.deploy.v1.DeployJobRun.FailureCause.valueOf(failureCause_); + return result == null + ? com.google.cloud.deploy.v1.DeployJobRun.FailureCause.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The reason the deploy failed. This will always be unspecified while the
+     * deploy is in progress or if it succeeded.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun.FailureCause failure_cause = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The failureCause to set. + * @return This builder for chaining. + */ + public Builder setFailureCause(com.google.cloud.deploy.v1.DeployJobRun.FailureCause value) { + if (value == null) { + throw new NullPointerException(); + } + + failureCause_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The reason the deploy failed. This will always be unspecified while the
+     * deploy is in progress or if it succeeded.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun.FailureCause failure_cause = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearFailureCause() { + + failureCause_ = 0; + onChanged(); + return this; + } + + private java.lang.Object failureMessage_ = ""; + /** + * + * + *
+     * Output only. Additional information about the deploy failure, if available.
+     * 
+ * + * string failure_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failureMessage. + */ + public java.lang.String getFailureMessage() { + java.lang.Object ref = failureMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + failureMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Additional information about the deploy failure, if available.
+     * 
+ * + * string failure_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for failureMessage. + */ + public com.google.protobuf.ByteString getFailureMessageBytes() { + java.lang.Object ref = failureMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + failureMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Additional information about the deploy failure, if available.
+     * 
+ * + * string failure_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The failureMessage to set. + * @return This builder for chaining. + */ + public Builder setFailureMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + failureMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional information about the deploy failure, if available.
+     * 
+ * + * string failure_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearFailureMessage() { + + failureMessage_ = getDefaultInstance().getFailureMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional information about the deploy failure, if available.
+     * 
+ * + * string failure_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for failureMessage to set. + * @return This builder for chaining. + */ + public Builder setFailureMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + failureMessage_ = value; + onChanged(); + return this; + } + + private com.google.cloud.deploy.v1.DeployJobRunMetadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeployJobRunMetadata, + com.google.cloud.deploy.v1.DeployJobRunMetadata.Builder, + com.google.cloud.deploy.v1.DeployJobRunMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * Output only. Metadata containing information about the deploy job run.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRunMetadata metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * + * + *
+     * Output only. Metadata containing information about the deploy job run.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRunMetadata metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The metadata. + */ + public com.google.cloud.deploy.v1.DeployJobRunMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.deploy.v1.DeployJobRunMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Metadata containing information about the deploy job run.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRunMetadata metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMetadata(com.google.cloud.deploy.v1.DeployJobRunMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Metadata containing information about the deploy job run.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRunMetadata metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMetadata( + com.google.cloud.deploy.v1.DeployJobRunMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Metadata containing information about the deploy job run.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRunMetadata metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeMetadata(com.google.cloud.deploy.v1.DeployJobRunMetadata value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.cloud.deploy.v1.DeployJobRunMetadata.newBuilder(metadata_) + .mergeFrom(value) + .buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Metadata containing information about the deploy job run.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRunMetadata metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Metadata containing information about the deploy job run.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRunMetadata metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.DeployJobRunMetadata.Builder getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Metadata containing information about the deploy job run.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRunMetadata metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.DeployJobRunMetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.deploy.v1.DeployJobRunMetadata.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * Output only. Metadata containing information about the deploy job run.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRunMetadata metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeployJobRunMetadata, + com.google.cloud.deploy.v1.DeployJobRunMetadata.Builder, + com.google.cloud.deploy.v1.DeployJobRunMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeployJobRunMetadata, + com.google.cloud.deploy.v1.DeployJobRunMetadata.Builder, + com.google.cloud.deploy.v1.DeployJobRunMetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.DeployJobRun) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.DeployJobRun) + private static final com.google.cloud.deploy.v1.DeployJobRun DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.DeployJobRun(); + } + + public static com.google.cloud.deploy.v1.DeployJobRun getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeployJobRun parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJobRun getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRunMetadata.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRunMetadata.java new file mode 100644 index 0000000..007e77d --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRunMetadata.java @@ -0,0 +1,730 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * DeployJobRunMetadata surfaces information associated with a `DeployJobRun` to
+ * the user.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.DeployJobRunMetadata} + */ +public final class DeployJobRunMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.DeployJobRunMetadata) + DeployJobRunMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeployJobRunMetadata.newBuilder() to construct. + private DeployJobRunMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeployJobRunMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeployJobRunMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeployJobRunMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeployJobRunMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.DeployJobRunMetadata.class, + com.google.cloud.deploy.v1.DeployJobRunMetadata.Builder.class); + } + + public static final int CLOUD_RUN_FIELD_NUMBER = 1; + private com.google.cloud.deploy.v1.CloudRunMetadata cloudRun_; + /** + * + * + *
+   * Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudRun field is set. + */ + @java.lang.Override + public boolean hasCloudRun() { + return cloudRun_ != null; + } + /** + * + * + *
+   * Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudRun. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.CloudRunMetadata getCloudRun() { + return cloudRun_ == null + ? com.google.cloud.deploy.v1.CloudRunMetadata.getDefaultInstance() + : cloudRun_; + } + /** + * + * + *
+   * Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.CloudRunMetadataOrBuilder getCloudRunOrBuilder() { + return getCloudRun(); + } + + 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 (cloudRun_ != null) { + output.writeMessage(1, getCloudRun()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cloudRun_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCloudRun()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.DeployJobRunMetadata)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.DeployJobRunMetadata other = + (com.google.cloud.deploy.v1.DeployJobRunMetadata) obj; + + if (hasCloudRun() != other.hasCloudRun()) return false; + if (hasCloudRun()) { + if (!getCloudRun().equals(other.getCloudRun())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCloudRun()) { + hash = (37 * hash) + CLOUD_RUN_FIELD_NUMBER; + hash = (53 * hash) + getCloudRun().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.DeployJobRunMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeployJobRunMetadata 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.deploy.v1.DeployJobRunMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeployJobRunMetadata 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.deploy.v1.DeployJobRunMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeployJobRunMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.DeployJobRunMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeployJobRunMetadata 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.deploy.v1.DeployJobRunMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeployJobRunMetadata 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.deploy.v1.DeployJobRunMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeployJobRunMetadata 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.deploy.v1.DeployJobRunMetadata 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; + } + /** + * + * + *
+   * DeployJobRunMetadata surfaces information associated with a `DeployJobRun` to
+   * the user.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.DeployJobRunMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.DeployJobRunMetadata) + com.google.cloud.deploy.v1.DeployJobRunMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeployJobRunMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeployJobRunMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.DeployJobRunMetadata.class, + com.google.cloud.deploy.v1.DeployJobRunMetadata.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.DeployJobRunMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (cloudRunBuilder_ == null) { + cloudRun_ = null; + } else { + cloudRun_ = null; + cloudRunBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeployJobRunMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJobRunMetadata getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.DeployJobRunMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJobRunMetadata build() { + com.google.cloud.deploy.v1.DeployJobRunMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJobRunMetadata buildPartial() { + com.google.cloud.deploy.v1.DeployJobRunMetadata result = + new com.google.cloud.deploy.v1.DeployJobRunMetadata(this); + if (cloudRunBuilder_ == null) { + result.cloudRun_ = cloudRun_; + } else { + result.cloudRun_ = cloudRunBuilder_.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.deploy.v1.DeployJobRunMetadata) { + return mergeFrom((com.google.cloud.deploy.v1.DeployJobRunMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.DeployJobRunMetadata other) { + if (other == com.google.cloud.deploy.v1.DeployJobRunMetadata.getDefaultInstance()) + return this; + if (other.hasCloudRun()) { + mergeCloudRun(other.getCloudRun()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCloudRunFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private com.google.cloud.deploy.v1.CloudRunMetadata cloudRun_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.CloudRunMetadata, + com.google.cloud.deploy.v1.CloudRunMetadata.Builder, + com.google.cloud.deploy.v1.CloudRunMetadataOrBuilder> + cloudRunBuilder_; + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudRun field is set. + */ + public boolean hasCloudRun() { + return cloudRunBuilder_ != null || cloudRun_ != null; + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudRun. + */ + public com.google.cloud.deploy.v1.CloudRunMetadata getCloudRun() { + if (cloudRunBuilder_ == null) { + return cloudRun_ == null + ? com.google.cloud.deploy.v1.CloudRunMetadata.getDefaultInstance() + : cloudRun_; + } else { + return cloudRunBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCloudRun(com.google.cloud.deploy.v1.CloudRunMetadata value) { + if (cloudRunBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cloudRun_ = value; + onChanged(); + } else { + cloudRunBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCloudRun( + com.google.cloud.deploy.v1.CloudRunMetadata.Builder builderForValue) { + if (cloudRunBuilder_ == null) { + cloudRun_ = builderForValue.build(); + onChanged(); + } else { + cloudRunBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCloudRun(com.google.cloud.deploy.v1.CloudRunMetadata value) { + if (cloudRunBuilder_ == null) { + if (cloudRun_ != null) { + cloudRun_ = + com.google.cloud.deploy.v1.CloudRunMetadata.newBuilder(cloudRun_) + .mergeFrom(value) + .buildPartial(); + } else { + cloudRun_ = value; + } + onChanged(); + } else { + cloudRunBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCloudRun() { + if (cloudRunBuilder_ == null) { + cloudRun_ = null; + onChanged(); + } else { + cloudRun_ = null; + cloudRunBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.CloudRunMetadata.Builder getCloudRunBuilder() { + + onChanged(); + return getCloudRunFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.CloudRunMetadataOrBuilder getCloudRunOrBuilder() { + if (cloudRunBuilder_ != null) { + return cloudRunBuilder_.getMessageOrBuilder(); + } else { + return cloudRun_ == null + ? com.google.cloud.deploy.v1.CloudRunMetadata.getDefaultInstance() + : cloudRun_; + } + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.CloudRunMetadata, + com.google.cloud.deploy.v1.CloudRunMetadata.Builder, + com.google.cloud.deploy.v1.CloudRunMetadataOrBuilder> + getCloudRunFieldBuilder() { + if (cloudRunBuilder_ == null) { + cloudRunBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.CloudRunMetadata, + com.google.cloud.deploy.v1.CloudRunMetadata.Builder, + com.google.cloud.deploy.v1.CloudRunMetadataOrBuilder>( + getCloudRun(), getParentForChildren(), isClean()); + cloudRun_ = null; + } + return cloudRunBuilder_; + } + + @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.deploy.v1.DeployJobRunMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.DeployJobRunMetadata) + private static final com.google.cloud.deploy.v1.DeployJobRunMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.DeployJobRunMetadata(); + } + + public static com.google.cloud.deploy.v1.DeployJobRunMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeployJobRunMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJobRunMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRunMetadataOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRunMetadataOrBuilder.java new file mode 100644 index 0000000..d1d5d29 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRunMetadataOrBuilder.java @@ -0,0 +1,66 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface DeployJobRunMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.DeployJobRunMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudRun field is set. + */ + boolean hasCloudRun(); + /** + * + * + *
+   * Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudRun. + */ + com.google.cloud.deploy.v1.CloudRunMetadata getCloudRun(); + /** + * + * + *
+   * Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.CloudRunMetadataOrBuilder getCloudRunOrBuilder(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRunOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRunOrBuilder.java new file mode 100644 index 0000000..5620246 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRunOrBuilder.java @@ -0,0 +1,153 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface DeployJobRunOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.DeployJobRun) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the Cloud Build `Build` object that is used to deploy.
+   * Format is projects/{project}/locations/{location}/builds/{build}.
+   * 
+ * + * + * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The build. + */ + java.lang.String getBuild(); + /** + * + * + *
+   * Output only. The resource name of the Cloud Build `Build` object that is used to deploy.
+   * Format is projects/{project}/locations/{location}/builds/{build}.
+   * 
+ * + * + * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for build. + */ + com.google.protobuf.ByteString getBuildBytes(); + + /** + * + * + *
+   * Output only. The reason the deploy failed. This will always be unspecified while the
+   * deploy is in progress or if it succeeded.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun.FailureCause failure_cause = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for failureCause. + */ + int getFailureCauseValue(); + /** + * + * + *
+   * Output only. The reason the deploy failed. This will always be unspecified while the
+   * deploy is in progress or if it succeeded.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun.FailureCause failure_cause = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The failureCause. + */ + com.google.cloud.deploy.v1.DeployJobRun.FailureCause getFailureCause(); + + /** + * + * + *
+   * Output only. Additional information about the deploy failure, if available.
+   * 
+ * + * string failure_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failureMessage. + */ + java.lang.String getFailureMessage(); + /** + * + * + *
+   * Output only. Additional information about the deploy failure, if available.
+   * 
+ * + * string failure_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for failureMessage. + */ + com.google.protobuf.ByteString getFailureMessageBytes(); + + /** + * + * + *
+   * Output only. Metadata containing information about the deploy job run.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRunMetadata metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * Output only. Metadata containing information about the deploy job run.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRunMetadata metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The metadata. + */ + com.google.cloud.deploy.v1.DeployJobRunMetadata getMetadata(); + /** + * + * + *
+   * Output only. Metadata containing information about the deploy job run.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRunMetadata metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.DeployJobRunMetadataOrBuilder getMetadataOrBuilder(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeploymentJobs.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeploymentJobs.java new file mode 100644 index 0000000..1798860 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeploymentJobs.java @@ -0,0 +1,1003 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Deployment job composition.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.DeploymentJobs} + */ +public final class DeploymentJobs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.DeploymentJobs) + DeploymentJobsOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeploymentJobs.newBuilder() to construct. + private DeploymentJobs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeploymentJobs() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeploymentJobs(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeploymentJobs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeploymentJobs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.DeploymentJobs.class, + com.google.cloud.deploy.v1.DeploymentJobs.Builder.class); + } + + public static final int DEPLOY_JOB_FIELD_NUMBER = 1; + private com.google.cloud.deploy.v1.Job deployJob_; + /** + * + * + *
+   * Output only. The deploy Job. This is the first job run in the phase.
+   * 
+ * + * .google.cloud.deploy.v1.Job deploy_job = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deployJob field is set. + */ + @java.lang.Override + public boolean hasDeployJob() { + return deployJob_ != null; + } + /** + * + * + *
+   * Output only. The deploy Job. This is the first job run in the phase.
+   * 
+ * + * .google.cloud.deploy.v1.Job deploy_job = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deployJob. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Job getDeployJob() { + return deployJob_ == null ? com.google.cloud.deploy.v1.Job.getDefaultInstance() : deployJob_; + } + /** + * + * + *
+   * Output only. The deploy Job. This is the first job run in the phase.
+   * 
+ * + * .google.cloud.deploy.v1.Job deploy_job = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.JobOrBuilder getDeployJobOrBuilder() { + return getDeployJob(); + } + + public static final int VERIFY_JOB_FIELD_NUMBER = 2; + private com.google.cloud.deploy.v1.Job verifyJob_; + /** + * + * + *
+   * Output only. The verify Job. Runs after a deploy if the deploy succeeds.
+   * 
+ * + * .google.cloud.deploy.v1.Job verify_job = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the verifyJob field is set. + */ + @java.lang.Override + public boolean hasVerifyJob() { + return verifyJob_ != null; + } + /** + * + * + *
+   * Output only. The verify Job. Runs after a deploy if the deploy succeeds.
+   * 
+ * + * .google.cloud.deploy.v1.Job verify_job = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The verifyJob. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Job getVerifyJob() { + return verifyJob_ == null ? com.google.cloud.deploy.v1.Job.getDefaultInstance() : verifyJob_; + } + /** + * + * + *
+   * Output only. The verify Job. Runs after a deploy if the deploy succeeds.
+   * 
+ * + * .google.cloud.deploy.v1.Job verify_job = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.JobOrBuilder getVerifyJobOrBuilder() { + return getVerifyJob(); + } + + 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 (deployJob_ != null) { + output.writeMessage(1, getDeployJob()); + } + if (verifyJob_ != null) { + output.writeMessage(2, getVerifyJob()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (deployJob_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDeployJob()); + } + if (verifyJob_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getVerifyJob()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.DeploymentJobs)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.DeploymentJobs other = + (com.google.cloud.deploy.v1.DeploymentJobs) obj; + + if (hasDeployJob() != other.hasDeployJob()) return false; + if (hasDeployJob()) { + if (!getDeployJob().equals(other.getDeployJob())) return false; + } + if (hasVerifyJob() != other.hasVerifyJob()) return false; + if (hasVerifyJob()) { + if (!getVerifyJob().equals(other.getVerifyJob())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDeployJob()) { + hash = (37 * hash) + DEPLOY_JOB_FIELD_NUMBER; + hash = (53 * hash) + getDeployJob().hashCode(); + } + if (hasVerifyJob()) { + hash = (37 * hash) + VERIFY_JOB_FIELD_NUMBER; + hash = (53 * hash) + getVerifyJob().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.DeploymentJobs parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeploymentJobs 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.deploy.v1.DeploymentJobs parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeploymentJobs 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.deploy.v1.DeploymentJobs parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeploymentJobs parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.DeploymentJobs parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeploymentJobs 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.deploy.v1.DeploymentJobs parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeploymentJobs 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.deploy.v1.DeploymentJobs parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeploymentJobs 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.deploy.v1.DeploymentJobs 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; + } + /** + * + * + *
+   * Deployment job composition.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.DeploymentJobs} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.DeploymentJobs) + com.google.cloud.deploy.v1.DeploymentJobsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeploymentJobs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeploymentJobs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.DeploymentJobs.class, + com.google.cloud.deploy.v1.DeploymentJobs.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.DeploymentJobs.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (deployJobBuilder_ == null) { + deployJob_ = null; + } else { + deployJob_ = null; + deployJobBuilder_ = null; + } + if (verifyJobBuilder_ == null) { + verifyJob_ = null; + } else { + verifyJob_ = null; + verifyJobBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeploymentJobs_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeploymentJobs getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.DeploymentJobs.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeploymentJobs build() { + com.google.cloud.deploy.v1.DeploymentJobs result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeploymentJobs buildPartial() { + com.google.cloud.deploy.v1.DeploymentJobs result = + new com.google.cloud.deploy.v1.DeploymentJobs(this); + if (deployJobBuilder_ == null) { + result.deployJob_ = deployJob_; + } else { + result.deployJob_ = deployJobBuilder_.build(); + } + if (verifyJobBuilder_ == null) { + result.verifyJob_ = verifyJob_; + } else { + result.verifyJob_ = verifyJobBuilder_.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.deploy.v1.DeploymentJobs) { + return mergeFrom((com.google.cloud.deploy.v1.DeploymentJobs) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.DeploymentJobs other) { + if (other == com.google.cloud.deploy.v1.DeploymentJobs.getDefaultInstance()) return this; + if (other.hasDeployJob()) { + mergeDeployJob(other.getDeployJob()); + } + if (other.hasVerifyJob()) { + mergeVerifyJob(other.getVerifyJob()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getDeployJobFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getVerifyJobFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private com.google.cloud.deploy.v1.Job deployJob_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Job, + com.google.cloud.deploy.v1.Job.Builder, + com.google.cloud.deploy.v1.JobOrBuilder> + deployJobBuilder_; + /** + * + * + *
+     * Output only. The deploy Job. This is the first job run in the phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job deploy_job = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deployJob field is set. + */ + public boolean hasDeployJob() { + return deployJobBuilder_ != null || deployJob_ != null; + } + /** + * + * + *
+     * Output only. The deploy Job. This is the first job run in the phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job deploy_job = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deployJob. + */ + public com.google.cloud.deploy.v1.Job getDeployJob() { + if (deployJobBuilder_ == null) { + return deployJob_ == null + ? com.google.cloud.deploy.v1.Job.getDefaultInstance() + : deployJob_; + } else { + return deployJobBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The deploy Job. This is the first job run in the phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job deploy_job = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeployJob(com.google.cloud.deploy.v1.Job value) { + if (deployJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deployJob_ = value; + onChanged(); + } else { + deployJobBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The deploy Job. This is the first job run in the phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job deploy_job = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeployJob(com.google.cloud.deploy.v1.Job.Builder builderForValue) { + if (deployJobBuilder_ == null) { + deployJob_ = builderForValue.build(); + onChanged(); + } else { + deployJobBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The deploy Job. This is the first job run in the phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job deploy_job = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeployJob(com.google.cloud.deploy.v1.Job value) { + if (deployJobBuilder_ == null) { + if (deployJob_ != null) { + deployJob_ = + com.google.cloud.deploy.v1.Job.newBuilder(deployJob_).mergeFrom(value).buildPartial(); + } else { + deployJob_ = value; + } + onChanged(); + } else { + deployJobBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The deploy Job. This is the first job run in the phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job deploy_job = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeployJob() { + if (deployJobBuilder_ == null) { + deployJob_ = null; + onChanged(); + } else { + deployJob_ = null; + deployJobBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The deploy Job. This is the first job run in the phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job deploy_job = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.Job.Builder getDeployJobBuilder() { + + onChanged(); + return getDeployJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The deploy Job. This is the first job run in the phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job deploy_job = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.JobOrBuilder getDeployJobOrBuilder() { + if (deployJobBuilder_ != null) { + return deployJobBuilder_.getMessageOrBuilder(); + } else { + return deployJob_ == null + ? com.google.cloud.deploy.v1.Job.getDefaultInstance() + : deployJob_; + } + } + /** + * + * + *
+     * Output only. The deploy Job. This is the first job run in the phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job deploy_job = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Job, + com.google.cloud.deploy.v1.Job.Builder, + com.google.cloud.deploy.v1.JobOrBuilder> + getDeployJobFieldBuilder() { + if (deployJobBuilder_ == null) { + deployJobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Job, + com.google.cloud.deploy.v1.Job.Builder, + com.google.cloud.deploy.v1.JobOrBuilder>( + getDeployJob(), getParentForChildren(), isClean()); + deployJob_ = null; + } + return deployJobBuilder_; + } + + private com.google.cloud.deploy.v1.Job verifyJob_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Job, + com.google.cloud.deploy.v1.Job.Builder, + com.google.cloud.deploy.v1.JobOrBuilder> + verifyJobBuilder_; + /** + * + * + *
+     * Output only. The verify Job. Runs after a deploy if the deploy succeeds.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job verify_job = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the verifyJob field is set. + */ + public boolean hasVerifyJob() { + return verifyJobBuilder_ != null || verifyJob_ != null; + } + /** + * + * + *
+     * Output only. The verify Job. Runs after a deploy if the deploy succeeds.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job verify_job = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The verifyJob. + */ + public com.google.cloud.deploy.v1.Job getVerifyJob() { + if (verifyJobBuilder_ == null) { + return verifyJob_ == null + ? com.google.cloud.deploy.v1.Job.getDefaultInstance() + : verifyJob_; + } else { + return verifyJobBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The verify Job. Runs after a deploy if the deploy succeeds.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job verify_job = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setVerifyJob(com.google.cloud.deploy.v1.Job value) { + if (verifyJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + verifyJob_ = value; + onChanged(); + } else { + verifyJobBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The verify Job. Runs after a deploy if the deploy succeeds.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job verify_job = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setVerifyJob(com.google.cloud.deploy.v1.Job.Builder builderForValue) { + if (verifyJobBuilder_ == null) { + verifyJob_ = builderForValue.build(); + onChanged(); + } else { + verifyJobBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The verify Job. Runs after a deploy if the deploy succeeds.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job verify_job = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeVerifyJob(com.google.cloud.deploy.v1.Job value) { + if (verifyJobBuilder_ == null) { + if (verifyJob_ != null) { + verifyJob_ = + com.google.cloud.deploy.v1.Job.newBuilder(verifyJob_).mergeFrom(value).buildPartial(); + } else { + verifyJob_ = value; + } + onChanged(); + } else { + verifyJobBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The verify Job. Runs after a deploy if the deploy succeeds.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job verify_job = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearVerifyJob() { + if (verifyJobBuilder_ == null) { + verifyJob_ = null; + onChanged(); + } else { + verifyJob_ = null; + verifyJobBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The verify Job. Runs after a deploy if the deploy succeeds.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job verify_job = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.Job.Builder getVerifyJobBuilder() { + + onChanged(); + return getVerifyJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The verify Job. Runs after a deploy if the deploy succeeds.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job verify_job = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.JobOrBuilder getVerifyJobOrBuilder() { + if (verifyJobBuilder_ != null) { + return verifyJobBuilder_.getMessageOrBuilder(); + } else { + return verifyJob_ == null + ? com.google.cloud.deploy.v1.Job.getDefaultInstance() + : verifyJob_; + } + } + /** + * + * + *
+     * Output only. The verify Job. Runs after a deploy if the deploy succeeds.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job verify_job = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Job, + com.google.cloud.deploy.v1.Job.Builder, + com.google.cloud.deploy.v1.JobOrBuilder> + getVerifyJobFieldBuilder() { + if (verifyJobBuilder_ == null) { + verifyJobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Job, + com.google.cloud.deploy.v1.Job.Builder, + com.google.cloud.deploy.v1.JobOrBuilder>( + getVerifyJob(), getParentForChildren(), isClean()); + verifyJob_ = null; + } + return verifyJobBuilder_; + } + + @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.deploy.v1.DeploymentJobs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.DeploymentJobs) + private static final com.google.cloud.deploy.v1.DeploymentJobs DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.DeploymentJobs(); + } + + public static com.google.cloud.deploy.v1.DeploymentJobs getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeploymentJobs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeploymentJobs getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeploymentJobsOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeploymentJobsOrBuilder.java new file mode 100644 index 0000000..5b7b20a --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeploymentJobsOrBuilder.java @@ -0,0 +1,101 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface DeploymentJobsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.DeploymentJobs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The deploy Job. This is the first job run in the phase.
+   * 
+ * + * .google.cloud.deploy.v1.Job deploy_job = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deployJob field is set. + */ + boolean hasDeployJob(); + /** + * + * + *
+   * Output only. The deploy Job. This is the first job run in the phase.
+   * 
+ * + * .google.cloud.deploy.v1.Job deploy_job = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deployJob. + */ + com.google.cloud.deploy.v1.Job getDeployJob(); + /** + * + * + *
+   * Output only. The deploy Job. This is the first job run in the phase.
+   * 
+ * + * .google.cloud.deploy.v1.Job deploy_job = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.JobOrBuilder getDeployJobOrBuilder(); + + /** + * + * + *
+   * Output only. The verify Job. Runs after a deploy if the deploy succeeds.
+   * 
+ * + * .google.cloud.deploy.v1.Job verify_job = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the verifyJob field is set. + */ + boolean hasVerifyJob(); + /** + * + * + *
+   * Output only. The verify Job. Runs after a deploy if the deploy succeeds.
+   * 
+ * + * .google.cloud.deploy.v1.Job verify_job = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The verifyJob. + */ + com.google.cloud.deploy.v1.Job getVerifyJob(); + /** + * + * + *
+   * Output only. The verify Job. Runs after a deploy if the deploy succeeds.
+   * 
+ * + * .google.cloud.deploy.v1.Job verify_job = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.JobOrBuilder getVerifyJobOrBuilder(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ExecutionConfig.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ExecutionConfig.java index 40c537b..d4583cf 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ExecutionConfig.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ExecutionConfig.java @@ -55,131 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExecutionConfig( - 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 8: - { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - usages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - usages_.add(rawValue); - break; - } - case 10: - { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while (input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - usages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - usages_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 18: - { - com.google.cloud.deploy.v1.DefaultPool.Builder subBuilder = null; - if (executionEnvironmentCase_ == 2) { - subBuilder = - ((com.google.cloud.deploy.v1.DefaultPool) executionEnvironment_).toBuilder(); - } - executionEnvironment_ = - input.readMessage( - com.google.cloud.deploy.v1.DefaultPool.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.deploy.v1.DefaultPool) executionEnvironment_); - executionEnvironment_ = subBuilder.buildPartial(); - } - executionEnvironmentCase_ = 2; - break; - } - case 26: - { - com.google.cloud.deploy.v1.PrivatePool.Builder subBuilder = null; - if (executionEnvironmentCase_ == 3) { - subBuilder = - ((com.google.cloud.deploy.v1.PrivatePool) executionEnvironment_).toBuilder(); - } - executionEnvironment_ = - input.readMessage( - com.google.cloud.deploy.v1.PrivatePool.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.deploy.v1.PrivatePool) executionEnvironment_); - executionEnvironment_ = subBuilder.buildPartial(); - } - executionEnvironmentCase_ = 3; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - workerPool_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - serviceAccount_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - artifactStorage_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - usages_ = java.util.Collections.unmodifiableList(usages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_ExecutionConfig_descriptor; @@ -235,6 +110,16 @@ public enum ExecutionEnvironmentUsage implements com.google.protobuf.ProtocolMes * DEPLOY = 2; */ DEPLOY(2), + /** + * + * + *
+     * Use for deployment verification.
+     * 
+ * + * VERIFY = 3; + */ + VERIFY(3), UNRECOGNIZED(-1), ; @@ -268,6 +153,16 @@ public enum ExecutionEnvironmentUsage implements com.google.protobuf.ProtocolMes * DEPLOY = 2; */ public static final int DEPLOY_VALUE = 2; + /** + * + * + *
+     * Use for deployment verification.
+     * 
+ * + * VERIFY = 3; + */ + public static final int VERIFY_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -299,6 +194,8 @@ public static ExecutionEnvironmentUsage forNumber(int value) { return RENDER; case 2: return DEPLOY; + case 3: + return VERIFY; default: return null; } @@ -796,6 +693,66 @@ public com.google.protobuf.ByteString getArtifactStorageBytes() { } } + public static final int EXECUTION_TIMEOUT_FIELD_NUMBER = 7; + private com.google.protobuf.Duration executionTimeout_; + /** + * + * + *
+   * Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and
+   * 24h in seconds format.
+   * If unspecified, a default timeout of 1h is used.
+   * 
+ * + * + * .google.protobuf.Duration execution_timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the executionTimeout field is set. + */ + @java.lang.Override + public boolean hasExecutionTimeout() { + return executionTimeout_ != null; + } + /** + * + * + *
+   * Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and
+   * 24h in seconds format.
+   * If unspecified, a default timeout of 1h is used.
+   * 
+ * + * + * .google.protobuf.Duration execution_timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The executionTimeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getExecutionTimeout() { + return executionTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : executionTimeout_; + } + /** + * + * + *
+   * Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and
+   * 24h in seconds format.
+   * If unspecified, a default timeout of 1h is used.
+   * 
+ * + * + * .google.protobuf.Duration execution_timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getExecutionTimeoutOrBuilder() { + return getExecutionTimeout(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -833,7 +790,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactStorage_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, artifactStorage_); } - unknownFields.writeTo(output); + if (executionTimeout_ != null) { + output.writeMessage(7, getExecutionTimeout()); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -873,7 +833,10 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactStorage_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, artifactStorage_); } - size += unknownFields.getSerializedSize(); + if (executionTimeout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getExecutionTimeout()); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -893,6 +856,10 @@ public boolean equals(final java.lang.Object obj) { if (!getWorkerPool().equals(other.getWorkerPool())) return false; if (!getServiceAccount().equals(other.getServiceAccount())) return false; if (!getArtifactStorage().equals(other.getArtifactStorage())) return false; + if (hasExecutionTimeout() != other.hasExecutionTimeout()) return false; + if (hasExecutionTimeout()) { + if (!getExecutionTimeout().equals(other.getExecutionTimeout())) return false; + } if (!getExecutionEnvironmentCase().equals(other.getExecutionEnvironmentCase())) return false; switch (executionEnvironmentCase_) { case 2: @@ -904,7 +871,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -925,6 +892,10 @@ public int hashCode() { hash = (53 * hash) + getServiceAccount().hashCode(); hash = (37 * hash) + ARTIFACT_STORAGE_FIELD_NUMBER; hash = (53 * hash) + getArtifactStorage().hashCode(); + if (hasExecutionTimeout()) { + hash = (37 * hash) + EXECUTION_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getExecutionTimeout().hashCode(); + } switch (executionEnvironmentCase_) { case 2: hash = (37 * hash) + DEFAULT_POOL_FIELD_NUMBER; @@ -937,7 +908,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1066,17 +1037,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.ExecutionConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1084,12 +1048,24 @@ public Builder clear() { super.clear(); usages_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); + if (defaultPoolBuilder_ != null) { + defaultPoolBuilder_.clear(); + } + if (privatePoolBuilder_ != null) { + privatePoolBuilder_.clear(); + } workerPool_ = ""; serviceAccount_ = ""; artifactStorage_ = ""; + if (executionTimeoutBuilder_ == null) { + executionTimeout_ = null; + } else { + executionTimeout_ = null; + executionTimeoutBuilder_ = null; + } executionEnvironmentCase_ = 0; executionEnvironment_ = null; return this; @@ -1142,6 +1118,11 @@ public com.google.cloud.deploy.v1.ExecutionConfig buildPartial() { result.workerPool_ = workerPool_; result.serviceAccount_ = serviceAccount_; result.artifactStorage_ = artifactStorage_; + if (executionTimeoutBuilder_ == null) { + result.executionTimeout_ = executionTimeout_; + } else { + result.executionTimeout_ = executionTimeoutBuilder_.build(); + } result.executionEnvironmentCase_ = executionEnvironmentCase_; onBuilt(); return result; @@ -1214,6 +1195,9 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.ExecutionConfig other) { artifactStorage_ = other.artifactStorage_; onChanged(); } + if (other.hasExecutionTimeout()) { + mergeExecutionTimeout(other.getExecutionTimeout()); + } switch (other.getExecutionEnvironmentCase()) { case DEFAULT_POOL: { @@ -1230,7 +1214,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.ExecutionConfig other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1245,17 +1229,87 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.ExecutionConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int tmpRaw = input.readEnum(); + ensureUsagesIsMutable(); + usages_.add(tmpRaw); + break; + } // case 8 + case 10: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureUsagesIsMutable(); + usages_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 10 + case 18: + { + input.readMessage(getDefaultPoolFieldBuilder().getBuilder(), extensionRegistry); + executionEnvironmentCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getPrivatePoolFieldBuilder().getBuilder(), extensionRegistry); + executionEnvironmentCase_ = 3; + break; + } // case 26 + case 34: + { + workerPool_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + serviceAccount_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + artifactStorage_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + input.readMessage( + getExecutionTimeoutFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.ExecutionConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2350,6 +2404,227 @@ public Builder setArtifactStorageBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.Duration executionTimeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + executionTimeoutBuilder_; + /** + * + * + *
+     * Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and
+     * 24h in seconds format.
+     * If unspecified, a default timeout of 1h is used.
+     * 
+ * + * + * .google.protobuf.Duration execution_timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the executionTimeout field is set. + */ + public boolean hasExecutionTimeout() { + return executionTimeoutBuilder_ != null || executionTimeout_ != null; + } + /** + * + * + *
+     * Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and
+     * 24h in seconds format.
+     * If unspecified, a default timeout of 1h is used.
+     * 
+ * + * + * .google.protobuf.Duration execution_timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The executionTimeout. + */ + public com.google.protobuf.Duration getExecutionTimeout() { + if (executionTimeoutBuilder_ == null) { + return executionTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : executionTimeout_; + } else { + return executionTimeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and
+     * 24h in seconds format.
+     * If unspecified, a default timeout of 1h is used.
+     * 
+ * + * + * .google.protobuf.Duration execution_timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExecutionTimeout(com.google.protobuf.Duration value) { + if (executionTimeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + executionTimeout_ = value; + onChanged(); + } else { + executionTimeoutBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and
+     * 24h in seconds format.
+     * If unspecified, a default timeout of 1h is used.
+     * 
+ * + * + * .google.protobuf.Duration execution_timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExecutionTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (executionTimeoutBuilder_ == null) { + executionTimeout_ = builderForValue.build(); + onChanged(); + } else { + executionTimeoutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and
+     * 24h in seconds format.
+     * If unspecified, a default timeout of 1h is used.
+     * 
+ * + * + * .google.protobuf.Duration execution_timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeExecutionTimeout(com.google.protobuf.Duration value) { + if (executionTimeoutBuilder_ == null) { + if (executionTimeout_ != null) { + executionTimeout_ = + com.google.protobuf.Duration.newBuilder(executionTimeout_) + .mergeFrom(value) + .buildPartial(); + } else { + executionTimeout_ = value; + } + onChanged(); + } else { + executionTimeoutBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and
+     * 24h in seconds format.
+     * If unspecified, a default timeout of 1h is used.
+     * 
+ * + * + * .google.protobuf.Duration execution_timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearExecutionTimeout() { + if (executionTimeoutBuilder_ == null) { + executionTimeout_ = null; + onChanged(); + } else { + executionTimeout_ = null; + executionTimeoutBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and
+     * 24h in seconds format.
+     * If unspecified, a default timeout of 1h is used.
+     * 
+ * + * + * .google.protobuf.Duration execution_timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Duration.Builder getExecutionTimeoutBuilder() { + + onChanged(); + return getExecutionTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and
+     * 24h in seconds format.
+     * If unspecified, a default timeout of 1h is used.
+     * 
+ * + * + * .google.protobuf.Duration execution_timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.DurationOrBuilder getExecutionTimeoutOrBuilder() { + if (executionTimeoutBuilder_ != null) { + return executionTimeoutBuilder_.getMessageOrBuilder(); + } else { + return executionTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : executionTimeout_; + } + } + /** + * + * + *
+     * Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and
+     * 24h in seconds format.
+     * If unspecified, a default timeout of 1h is used.
+     * 
+ * + * + * .google.protobuf.Duration execution_timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getExecutionTimeoutFieldBuilder() { + if (executionTimeoutBuilder_ == null) { + executionTimeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getExecutionTimeout(), getParentForChildren(), isClean()); + executionTimeout_ = null; + } + return executionTimeoutBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -2382,7 +2657,18 @@ public ExecutionConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExecutionConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ExecutionConfigOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ExecutionConfigOrBuilder.java index 85db511..4e27a37 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ExecutionConfigOrBuilder.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ExecutionConfigOrBuilder.java @@ -274,6 +274,53 @@ public interface ExecutionConfigOrBuilder */ com.google.protobuf.ByteString getArtifactStorageBytes(); + /** + * + * + *
+   * Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and
+   * 24h in seconds format.
+   * If unspecified, a default timeout of 1h is used.
+   * 
+ * + * + * .google.protobuf.Duration execution_timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the executionTimeout field is set. + */ + boolean hasExecutionTimeout(); + /** + * + * + *
+   * Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and
+   * 24h in seconds format.
+   * If unspecified, a default timeout of 1h is used.
+   * 
+ * + * + * .google.protobuf.Duration execution_timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The executionTimeout. + */ + com.google.protobuf.Duration getExecutionTimeout(); + /** + * + * + *
+   * Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and
+   * 24h in seconds format.
+   * If unspecified, a default timeout of 1h is used.
+   * 
+ * + * + * .google.protobuf.Duration execution_timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.DurationOrBuilder getExecutionTimeoutOrBuilder(); + public com.google.cloud.deploy.v1.ExecutionConfig.ExecutionEnvironmentCase getExecutionEnvironmentCase(); } diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetConfigRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetConfigRequest.java index 2d6fb0b..d896852 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetConfigRequest.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetConfigRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_GetConfigRequest_descriptor; @@ -183,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +149,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -212,7 +166,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.deploy.v1.GetConfigRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -225,7 +179,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -354,17 +308,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.GetConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -453,7 +400,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.GetConfigRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -468,17 +415,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.GetConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.GetConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -630,7 +597,18 @@ public GetConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequest.java index 699616f..d0276ad 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequest.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetDeliveryPipelineRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_GetDeliveryPipelineRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.deploy.v1.GetDeliveryPipelineRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.GetDeliveryPipelineRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -457,7 +404,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.GetDeliveryPipelineRequest o name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -472,18 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.GetDeliveryPipelineRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.deploy.v1.GetDeliveryPipelineRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -640,7 +606,18 @@ public GetDeliveryPipelineRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetDeliveryPipelineRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetJobRunRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetJobRunRequest.java new file mode 100644 index 0000000..210d49b --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetJobRunRequest.java @@ -0,0 +1,635 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * GetJobRunRequest is the request object used by `GetJobRun`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.GetJobRunRequest} + */ +public final class GetJobRunRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.GetJobRunRequest) + GetJobRunRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetJobRunRequest.newBuilder() to construct. + private GetJobRunRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetJobRunRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetJobRunRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetJobRunRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetJobRunRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.GetJobRunRequest.class, + com.google.cloud.deploy.v1.GetJobRunRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of the `JobRun`. Format must be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the `JobRun`. Format must be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.GetJobRunRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.GetJobRunRequest other = + (com.google.cloud.deploy.v1.GetJobRunRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.GetJobRunRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetJobRunRequest 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.deploy.v1.GetJobRunRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetJobRunRequest 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.deploy.v1.GetJobRunRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetJobRunRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.GetJobRunRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetJobRunRequest 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.deploy.v1.GetJobRunRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetJobRunRequest 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.deploy.v1.GetJobRunRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetJobRunRequest 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.deploy.v1.GetJobRunRequest 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; + } + /** + * + * + *
+   * GetJobRunRequest is the request object used by `GetJobRun`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.GetJobRunRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.GetJobRunRequest) + com.google.cloud.deploy.v1.GetJobRunRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetJobRunRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetJobRunRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.GetJobRunRequest.class, + com.google.cloud.deploy.v1.GetJobRunRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.GetJobRunRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetJobRunRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetJobRunRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.GetJobRunRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetJobRunRequest build() { + com.google.cloud.deploy.v1.GetJobRunRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetJobRunRequest buildPartial() { + com.google.cloud.deploy.v1.GetJobRunRequest result = + new com.google.cloud.deploy.v1.GetJobRunRequest(this); + result.name_ = name_; + 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.deploy.v1.GetJobRunRequest) { + return mergeFrom((com.google.cloud.deploy.v1.GetJobRunRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.GetJobRunRequest other) { + if (other == com.google.cloud.deploy.v1.GetJobRunRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the `JobRun`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the `JobRun`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the `JobRun`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the `JobRun`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the `JobRun`. Format must be
+     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + 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.deploy.v1.GetJobRunRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.GetJobRunRequest) + private static final com.google.cloud.deploy.v1.GetJobRunRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.GetJobRunRequest(); + } + + public static com.google.cloud.deploy.v1.GetJobRunRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetJobRunRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetJobRunRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetJobRunRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetJobRunRequestOrBuilder.java new file mode 100644 index 0000000..3473f3a --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetJobRunRequestOrBuilder.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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface GetJobRunRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.GetJobRunRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the `JobRun`. Format must be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the `JobRun`. Format must be
+   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequest.java index 8ac63ed..d4228eb 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequest.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetReleaseRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_GetReleaseRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.deploy.v1.GetReleaseRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.GetReleaseRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.GetReleaseRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,17 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.GetReleaseRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.GetReleaseRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -637,7 +604,18 @@ public GetReleaseRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetReleaseRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequest.java index cd39273..4f48a55 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequest.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRolloutRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_GetRolloutRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.deploy.v1.GetRolloutRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.GetRolloutRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.GetRolloutRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,17 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.GetRolloutRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.GetRolloutRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -637,7 +604,18 @@ public GetRolloutRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRolloutRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequest.java index 1b74a40..7d8c23f 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequest.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetTargetRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_GetTargetRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.deploy.v1.GetTargetRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.GetTargetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.GetTargetRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,17 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.GetTargetRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.GetTargetRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -637,7 +604,18 @@ public GetTargetRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetTargetRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeCluster.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeCluster.java index dd7f895..1dd538b 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeCluster.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeCluster.java @@ -52,57 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GkeCluster( - 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(); - - cluster_ = s; - break; - } - case 16: - { - internalIp_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_GkeCluster_descriptor; @@ -213,7 +162,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (internalIp_ != false) { output.writeBool(2, internalIp_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -228,7 +177,7 @@ public int getSerializedSize() { if (internalIp_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, internalIp_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -245,7 +194,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCluster().equals(other.getCluster())) return false; if (getInternalIp() != other.getInternalIp()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -260,7 +209,7 @@ public int hashCode() { hash = (53 * hash) + getCluster().hashCode(); hash = (37 * hash) + INTERNAL_IP_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getInternalIp()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -388,17 +337,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.GkeCluster.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -493,7 +435,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.GkeCluster other) { if (other.getInternalIp() != false) { setInternalIp(other.getInternalIp()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -508,17 +450,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.GkeCluster parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + cluster_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + internalIp_ = input.readBool(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.GkeCluster) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -735,7 +703,18 @@ public GkeCluster parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GkeCluster(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Job.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Job.java new file mode 100644 index 0000000..c7e3618 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Job.java @@ -0,0 +1,1929 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Job represents an operation for a `Rollout`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Job} + */ +public final class Job extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.Job) + JobOrBuilder { + private static final long serialVersionUID = 0L; + // Use Job.newBuilder() to construct. + private Job(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Job() { + id_ = ""; + state_ = 0; + jobRun_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Job(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Job_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Job_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Job.class, com.google.cloud.deploy.v1.Job.Builder.class); + } + + /** + * + * + *
+   * Valid states of a Job.
+   * 
+ * + * Protobuf enum {@code google.cloud.deploy.v1.Job.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The Job has an unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The Job is waiting for an earlier Phase(s) or Job(s) to complete.
+     * 
+ * + * PENDING = 1; + */ + PENDING(1), + /** + * + * + *
+     * The Job is disabled.
+     * 
+ * + * DISABLED = 2; + */ + DISABLED(2), + /** + * + * + *
+     * The Job is in progress.
+     * 
+ * + * IN_PROGRESS = 3; + */ + IN_PROGRESS(3), + /** + * + * + *
+     * The Job succeeded.
+     * 
+ * + * SUCCEEDED = 4; + */ + SUCCEEDED(4), + /** + * + * + *
+     * The Job failed.
+     * 
+ * + * FAILED = 5; + */ + FAILED(5), + /** + * + * + *
+     * The Job was aborted.
+     * 
+ * + * ABORTED = 6; + */ + ABORTED(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The Job has an unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The Job is waiting for an earlier Phase(s) or Job(s) to complete.
+     * 
+ * + * PENDING = 1; + */ + public static final int PENDING_VALUE = 1; + /** + * + * + *
+     * The Job is disabled.
+     * 
+ * + * DISABLED = 2; + */ + public static final int DISABLED_VALUE = 2; + /** + * + * + *
+     * The Job is in progress.
+     * 
+ * + * IN_PROGRESS = 3; + */ + public static final int IN_PROGRESS_VALUE = 3; + /** + * + * + *
+     * The Job succeeded.
+     * 
+ * + * SUCCEEDED = 4; + */ + public static final int SUCCEEDED_VALUE = 4; + /** + * + * + *
+     * The Job failed.
+     * 
+ * + * FAILED = 5; + */ + public static final int FAILED_VALUE = 5; + /** + * + * + *
+     * The Job was aborted.
+     * 
+ * + * ABORTED = 6; + */ + public static final int ABORTED_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return PENDING; + case 2: + return DISABLED; + case 3: + return IN_PROGRESS; + case 4: + return SUCCEEDED; + case 5: + return FAILED; + case 6: + return ABORTED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.deploy.v1.Job.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.deploy.v1.Job.State) + } + + private int jobTypeCase_ = 0; + private java.lang.Object jobType_; + + public enum JobTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DEPLOY_JOB(4), + VERIFY_JOB(5), + JOBTYPE_NOT_SET(0); + private final int value; + + private JobTypeCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JobTypeCase valueOf(int value) { + return forNumber(value); + } + + public static JobTypeCase forNumber(int value) { + switch (value) { + case 4: + return DEPLOY_JOB; + case 5: + return VERIFY_JOB; + case 0: + return JOBTYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public JobTypeCase getJobTypeCase() { + return JobTypeCase.forNumber(jobTypeCase_); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * + * + *
+   * Output only. The ID of the Job.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The ID of the Job.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 2; + private int state_; + /** + * + * + *
+   * Output only. The current state of the Job.
+   * 
+ * + * .google.cloud.deploy.v1.Job.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The current state of the Job.
+   * 
+ * + * .google.cloud.deploy.v1.Job.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Job.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.Job.State result = + com.google.cloud.deploy.v1.Job.State.valueOf(state_); + return result == null ? com.google.cloud.deploy.v1.Job.State.UNRECOGNIZED : result; + } + + public static final int JOB_RUN_FIELD_NUMBER = 3; + private volatile java.lang.Object jobRun_; + /** + * + * + *
+   * Output only. The name of the `JobRun` responsible for the most recent invocation of this
+   * Job.
+   * 
+ * + * + * string job_run = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The jobRun. + */ + @java.lang.Override + public java.lang.String getJobRun() { + java.lang.Object ref = jobRun_; + 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(); + jobRun_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of the `JobRun` responsible for the most recent invocation of this
+   * Job.
+   * 
+ * + * + * string job_run = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for jobRun. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJobRunBytes() { + java.lang.Object ref = jobRun_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobRun_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEPLOY_JOB_FIELD_NUMBER = 4; + /** + * + * + *
+   * Output only. A deploy Job.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJob deploy_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deployJob field is set. + */ + @java.lang.Override + public boolean hasDeployJob() { + return jobTypeCase_ == 4; + } + /** + * + * + *
+   * Output only. A deploy Job.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJob deploy_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deployJob. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJob getDeployJob() { + if (jobTypeCase_ == 4) { + return (com.google.cloud.deploy.v1.DeployJob) jobType_; + } + return com.google.cloud.deploy.v1.DeployJob.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. A deploy Job.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJob deploy_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJobOrBuilder getDeployJobOrBuilder() { + if (jobTypeCase_ == 4) { + return (com.google.cloud.deploy.v1.DeployJob) jobType_; + } + return com.google.cloud.deploy.v1.DeployJob.getDefaultInstance(); + } + + public static final int VERIFY_JOB_FIELD_NUMBER = 5; + /** + * + * + *
+   * Output only. A verify Job.
+   * 
+ * + * + * .google.cloud.deploy.v1.VerifyJob verify_job = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the verifyJob field is set. + */ + @java.lang.Override + public boolean hasVerifyJob() { + return jobTypeCase_ == 5; + } + /** + * + * + *
+   * Output only. A verify Job.
+   * 
+ * + * + * .google.cloud.deploy.v1.VerifyJob verify_job = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The verifyJob. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.VerifyJob getVerifyJob() { + if (jobTypeCase_ == 5) { + return (com.google.cloud.deploy.v1.VerifyJob) jobType_; + } + return com.google.cloud.deploy.v1.VerifyJob.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. A verify Job.
+   * 
+ * + * + * .google.cloud.deploy.v1.VerifyJob verify_job = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.VerifyJobOrBuilder getVerifyJobOrBuilder() { + if (jobTypeCase_ == 5) { + return (com.google.cloud.deploy.v1.VerifyJob) jobType_; + } + return com.google.cloud.deploy.v1.VerifyJob.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (state_ != com.google.cloud.deploy.v1.Job.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobRun_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, jobRun_); + } + if (jobTypeCase_ == 4) { + output.writeMessage(4, (com.google.cloud.deploy.v1.DeployJob) jobType_); + } + if (jobTypeCase_ == 5) { + output.writeMessage(5, (com.google.cloud.deploy.v1.VerifyJob) jobType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (state_ != com.google.cloud.deploy.v1.Job.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobRun_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, jobRun_); + } + if (jobTypeCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.deploy.v1.DeployJob) jobType_); + } + if (jobTypeCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.deploy.v1.VerifyJob) jobType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.Job)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.Job other = (com.google.cloud.deploy.v1.Job) obj; + + if (!getId().equals(other.getId())) return false; + if (state_ != other.state_) return false; + if (!getJobRun().equals(other.getJobRun())) return false; + if (!getJobTypeCase().equals(other.getJobTypeCase())) return false; + switch (jobTypeCase_) { + case 4: + if (!getDeployJob().equals(other.getDeployJob())) return false; + break; + case 5: + if (!getVerifyJob().equals(other.getVerifyJob())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + JOB_RUN_FIELD_NUMBER; + hash = (53 * hash) + getJobRun().hashCode(); + switch (jobTypeCase_) { + case 4: + hash = (37 * hash) + DEPLOY_JOB_FIELD_NUMBER; + hash = (53 * hash) + getDeployJob().hashCode(); + break; + case 5: + hash = (37 * hash) + VERIFY_JOB_FIELD_NUMBER; + hash = (53 * hash) + getVerifyJob().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.Job parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Job 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.deploy.v1.Job parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Job 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.deploy.v1.Job parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Job parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.Job parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Job 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.deploy.v1.Job parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Job 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.deploy.v1.Job parseFrom(com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Job 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.deploy.v1.Job 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; + } + /** + * + * + *
+   * Job represents an operation for a `Rollout`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Job} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.Job) + com.google.cloud.deploy.v1.JobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Job_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Job_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Job.class, com.google.cloud.deploy.v1.Job.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.Job.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + id_ = ""; + + state_ = 0; + + jobRun_ = ""; + + if (deployJobBuilder_ != null) { + deployJobBuilder_.clear(); + } + if (verifyJobBuilder_ != null) { + verifyJobBuilder_.clear(); + } + jobTypeCase_ = 0; + jobType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Job_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Job getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.Job.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Job build() { + com.google.cloud.deploy.v1.Job result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Job buildPartial() { + com.google.cloud.deploy.v1.Job result = new com.google.cloud.deploy.v1.Job(this); + result.id_ = id_; + result.state_ = state_; + result.jobRun_ = jobRun_; + if (jobTypeCase_ == 4) { + if (deployJobBuilder_ == null) { + result.jobType_ = jobType_; + } else { + result.jobType_ = deployJobBuilder_.build(); + } + } + if (jobTypeCase_ == 5) { + if (verifyJobBuilder_ == null) { + result.jobType_ = jobType_; + } else { + result.jobType_ = verifyJobBuilder_.build(); + } + } + result.jobTypeCase_ = jobTypeCase_; + 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.deploy.v1.Job) { + return mergeFrom((com.google.cloud.deploy.v1.Job) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.Job other) { + if (other == com.google.cloud.deploy.v1.Job.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getJobRun().isEmpty()) { + jobRun_ = other.jobRun_; + onChanged(); + } + switch (other.getJobTypeCase()) { + case DEPLOY_JOB: + { + mergeDeployJob(other.getDeployJob()); + break; + } + case VERIFY_JOB: + { + mergeVerifyJob(other.getVerifyJob()); + break; + } + case JOBTYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + state_ = input.readEnum(); + + break; + } // case 16 + case 26: + { + jobRun_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getDeployJobFieldBuilder().getBuilder(), extensionRegistry); + jobTypeCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage(getVerifyJobFieldBuilder().getBuilder(), extensionRegistry); + jobTypeCase_ = 5; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int jobTypeCase_ = 0; + private java.lang.Object jobType_; + + public JobTypeCase getJobTypeCase() { + return JobTypeCase.forNumber(jobTypeCase_); + } + + public Builder clearJobType() { + jobTypeCase_ = 0; + jobType_ = null; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * Output only. The ID of the Job.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The ID of the Job.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The ID of the Job.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ID of the Job.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ID of the Job.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The current state of the Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The current state of the Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of the Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Job.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.Job.State result = + com.google.cloud.deploy.v1.Job.State.valueOf(state_); + return result == null ? com.google.cloud.deploy.v1.Job.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The current state of the Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.deploy.v1.Job.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of the Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.Job.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object jobRun_ = ""; + /** + * + * + *
+     * Output only. The name of the `JobRun` responsible for the most recent invocation of this
+     * Job.
+     * 
+ * + * + * string job_run = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The jobRun. + */ + public java.lang.String getJobRun() { + java.lang.Object ref = jobRun_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobRun_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of the `JobRun` responsible for the most recent invocation of this
+     * Job.
+     * 
+ * + * + * string job_run = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for jobRun. + */ + public com.google.protobuf.ByteString getJobRunBytes() { + java.lang.Object ref = jobRun_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobRun_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of the `JobRun` responsible for the most recent invocation of this
+     * Job.
+     * 
+ * + * + * string job_run = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The jobRun to set. + * @return This builder for chaining. + */ + public Builder setJobRun(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jobRun_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the `JobRun` responsible for the most recent invocation of this
+     * Job.
+     * 
+ * + * + * string job_run = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearJobRun() { + + jobRun_ = getDefaultInstance().getJobRun(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the `JobRun` responsible for the most recent invocation of this
+     * Job.
+     * 
+ * + * + * string job_run = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for jobRun to set. + * @return This builder for chaining. + */ + public Builder setJobRunBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jobRun_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeployJob, + com.google.cloud.deploy.v1.DeployJob.Builder, + com.google.cloud.deploy.v1.DeployJobOrBuilder> + deployJobBuilder_; + /** + * + * + *
+     * Output only. A deploy Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJob deploy_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deployJob field is set. + */ + @java.lang.Override + public boolean hasDeployJob() { + return jobTypeCase_ == 4; + } + /** + * + * + *
+     * Output only. A deploy Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJob deploy_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deployJob. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJob getDeployJob() { + if (deployJobBuilder_ == null) { + if (jobTypeCase_ == 4) { + return (com.google.cloud.deploy.v1.DeployJob) jobType_; + } + return com.google.cloud.deploy.v1.DeployJob.getDefaultInstance(); + } else { + if (jobTypeCase_ == 4) { + return deployJobBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.DeployJob.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. A deploy Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJob deploy_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeployJob(com.google.cloud.deploy.v1.DeployJob value) { + if (deployJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jobType_ = value; + onChanged(); + } else { + deployJobBuilder_.setMessage(value); + } + jobTypeCase_ = 4; + return this; + } + /** + * + * + *
+     * Output only. A deploy Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJob deploy_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeployJob(com.google.cloud.deploy.v1.DeployJob.Builder builderForValue) { + if (deployJobBuilder_ == null) { + jobType_ = builderForValue.build(); + onChanged(); + } else { + deployJobBuilder_.setMessage(builderForValue.build()); + } + jobTypeCase_ = 4; + return this; + } + /** + * + * + *
+     * Output only. A deploy Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJob deploy_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeployJob(com.google.cloud.deploy.v1.DeployJob value) { + if (deployJobBuilder_ == null) { + if (jobTypeCase_ == 4 + && jobType_ != com.google.cloud.deploy.v1.DeployJob.getDefaultInstance()) { + jobType_ = + com.google.cloud.deploy.v1.DeployJob.newBuilder( + (com.google.cloud.deploy.v1.DeployJob) jobType_) + .mergeFrom(value) + .buildPartial(); + } else { + jobType_ = value; + } + onChanged(); + } else { + if (jobTypeCase_ == 4) { + deployJobBuilder_.mergeFrom(value); + } else { + deployJobBuilder_.setMessage(value); + } + } + jobTypeCase_ = 4; + return this; + } + /** + * + * + *
+     * Output only. A deploy Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJob deploy_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeployJob() { + if (deployJobBuilder_ == null) { + if (jobTypeCase_ == 4) { + jobTypeCase_ = 0; + jobType_ = null; + onChanged(); + } + } else { + if (jobTypeCase_ == 4) { + jobTypeCase_ = 0; + jobType_ = null; + } + deployJobBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. A deploy Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJob deploy_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.DeployJob.Builder getDeployJobBuilder() { + return getDeployJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. A deploy Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJob deploy_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJobOrBuilder getDeployJobOrBuilder() { + if ((jobTypeCase_ == 4) && (deployJobBuilder_ != null)) { + return deployJobBuilder_.getMessageOrBuilder(); + } else { + if (jobTypeCase_ == 4) { + return (com.google.cloud.deploy.v1.DeployJob) jobType_; + } + return com.google.cloud.deploy.v1.DeployJob.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. A deploy Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJob deploy_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeployJob, + com.google.cloud.deploy.v1.DeployJob.Builder, + com.google.cloud.deploy.v1.DeployJobOrBuilder> + getDeployJobFieldBuilder() { + if (deployJobBuilder_ == null) { + if (!(jobTypeCase_ == 4)) { + jobType_ = com.google.cloud.deploy.v1.DeployJob.getDefaultInstance(); + } + deployJobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeployJob, + com.google.cloud.deploy.v1.DeployJob.Builder, + com.google.cloud.deploy.v1.DeployJobOrBuilder>( + (com.google.cloud.deploy.v1.DeployJob) jobType_, getParentForChildren(), isClean()); + jobType_ = null; + } + jobTypeCase_ = 4; + onChanged(); + ; + return deployJobBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.VerifyJob, + com.google.cloud.deploy.v1.VerifyJob.Builder, + com.google.cloud.deploy.v1.VerifyJobOrBuilder> + verifyJobBuilder_; + /** + * + * + *
+     * Output only. A verify Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJob verify_job = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the verifyJob field is set. + */ + @java.lang.Override + public boolean hasVerifyJob() { + return jobTypeCase_ == 5; + } + /** + * + * + *
+     * Output only. A verify Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJob verify_job = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The verifyJob. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.VerifyJob getVerifyJob() { + if (verifyJobBuilder_ == null) { + if (jobTypeCase_ == 5) { + return (com.google.cloud.deploy.v1.VerifyJob) jobType_; + } + return com.google.cloud.deploy.v1.VerifyJob.getDefaultInstance(); + } else { + if (jobTypeCase_ == 5) { + return verifyJobBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.VerifyJob.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. A verify Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJob verify_job = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setVerifyJob(com.google.cloud.deploy.v1.VerifyJob value) { + if (verifyJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jobType_ = value; + onChanged(); + } else { + verifyJobBuilder_.setMessage(value); + } + jobTypeCase_ = 5; + return this; + } + /** + * + * + *
+     * Output only. A verify Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJob verify_job = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setVerifyJob(com.google.cloud.deploy.v1.VerifyJob.Builder builderForValue) { + if (verifyJobBuilder_ == null) { + jobType_ = builderForValue.build(); + onChanged(); + } else { + verifyJobBuilder_.setMessage(builderForValue.build()); + } + jobTypeCase_ = 5; + return this; + } + /** + * + * + *
+     * Output only. A verify Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJob verify_job = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeVerifyJob(com.google.cloud.deploy.v1.VerifyJob value) { + if (verifyJobBuilder_ == null) { + if (jobTypeCase_ == 5 + && jobType_ != com.google.cloud.deploy.v1.VerifyJob.getDefaultInstance()) { + jobType_ = + com.google.cloud.deploy.v1.VerifyJob.newBuilder( + (com.google.cloud.deploy.v1.VerifyJob) jobType_) + .mergeFrom(value) + .buildPartial(); + } else { + jobType_ = value; + } + onChanged(); + } else { + if (jobTypeCase_ == 5) { + verifyJobBuilder_.mergeFrom(value); + } else { + verifyJobBuilder_.setMessage(value); + } + } + jobTypeCase_ = 5; + return this; + } + /** + * + * + *
+     * Output only. A verify Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJob verify_job = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearVerifyJob() { + if (verifyJobBuilder_ == null) { + if (jobTypeCase_ == 5) { + jobTypeCase_ = 0; + jobType_ = null; + onChanged(); + } + } else { + if (jobTypeCase_ == 5) { + jobTypeCase_ = 0; + jobType_ = null; + } + verifyJobBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. A verify Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJob verify_job = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.VerifyJob.Builder getVerifyJobBuilder() { + return getVerifyJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. A verify Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJob verify_job = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.VerifyJobOrBuilder getVerifyJobOrBuilder() { + if ((jobTypeCase_ == 5) && (verifyJobBuilder_ != null)) { + return verifyJobBuilder_.getMessageOrBuilder(); + } else { + if (jobTypeCase_ == 5) { + return (com.google.cloud.deploy.v1.VerifyJob) jobType_; + } + return com.google.cloud.deploy.v1.VerifyJob.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. A verify Job.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJob verify_job = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.VerifyJob, + com.google.cloud.deploy.v1.VerifyJob.Builder, + com.google.cloud.deploy.v1.VerifyJobOrBuilder> + getVerifyJobFieldBuilder() { + if (verifyJobBuilder_ == null) { + if (!(jobTypeCase_ == 5)) { + jobType_ = com.google.cloud.deploy.v1.VerifyJob.getDefaultInstance(); + } + verifyJobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.VerifyJob, + com.google.cloud.deploy.v1.VerifyJob.Builder, + com.google.cloud.deploy.v1.VerifyJobOrBuilder>( + (com.google.cloud.deploy.v1.VerifyJob) jobType_, getParentForChildren(), isClean()); + jobType_ = null; + } + jobTypeCase_ = 5; + onChanged(); + ; + return verifyJobBuilder_; + } + + @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.deploy.v1.Job) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.Job) + private static final com.google.cloud.deploy.v1.Job DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.Job(); + } + + public static com.google.cloud.deploy.v1.Job getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Job parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Job getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobOrBuilder.java new file mode 100644 index 0000000..1b794cb --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobOrBuilder.java @@ -0,0 +1,192 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface JobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.Job) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The ID of the Job.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Output only. The ID of the Job.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Output only. The current state of the Job.
+   * 
+ * + * .google.cloud.deploy.v1.Job.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The current state of the Job.
+   * 
+ * + * .google.cloud.deploy.v1.Job.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.deploy.v1.Job.State getState(); + + /** + * + * + *
+   * Output only. The name of the `JobRun` responsible for the most recent invocation of this
+   * Job.
+   * 
+ * + * + * string job_run = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The jobRun. + */ + java.lang.String getJobRun(); + /** + * + * + *
+   * Output only. The name of the `JobRun` responsible for the most recent invocation of this
+   * Job.
+   * 
+ * + * + * string job_run = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for jobRun. + */ + com.google.protobuf.ByteString getJobRunBytes(); + + /** + * + * + *
+   * Output only. A deploy Job.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJob deploy_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deployJob field is set. + */ + boolean hasDeployJob(); + /** + * + * + *
+   * Output only. A deploy Job.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJob deploy_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deployJob. + */ + com.google.cloud.deploy.v1.DeployJob getDeployJob(); + /** + * + * + *
+   * Output only. A deploy Job.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJob deploy_job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.DeployJobOrBuilder getDeployJobOrBuilder(); + + /** + * + * + *
+   * Output only. A verify Job.
+   * 
+ * + * + * .google.cloud.deploy.v1.VerifyJob verify_job = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the verifyJob field is set. + */ + boolean hasVerifyJob(); + /** + * + * + *
+   * Output only. A verify Job.
+   * 
+ * + * + * .google.cloud.deploy.v1.VerifyJob verify_job = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The verifyJob. + */ + com.google.cloud.deploy.v1.VerifyJob getVerifyJob(); + /** + * + * + *
+   * Output only. A verify Job.
+   * 
+ * + * + * .google.cloud.deploy.v1.VerifyJob verify_job = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.VerifyJobOrBuilder getVerifyJobOrBuilder(); + + public com.google.cloud.deploy.v1.Job.JobTypeCase getJobTypeCase(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRun.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRun.java new file mode 100644 index 0000000..87a48e2 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRun.java @@ -0,0 +1,3242 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * A `JobRun` resource in the Google Cloud Deploy API.
+ * A `JobRun` contains information of a single `Rollout` job evaluation.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.JobRun} + */ +public final class JobRun extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.JobRun) + JobRunOrBuilder { + private static final long serialVersionUID = 0L; + // Use JobRun.newBuilder() to construct. + private JobRun(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private JobRun() { + name_ = ""; + uid_ = ""; + phaseId_ = ""; + jobId_ = ""; + state_ = 0; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new JobRun(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_JobRun_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_JobRun_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.JobRun.class, + com.google.cloud.deploy.v1.JobRun.Builder.class); + } + + /** + * + * + *
+   * Valid states of a `JobRun`.
+   * 
+ * + * Protobuf enum {@code google.cloud.deploy.v1.JobRun.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The `JobRun` has an unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The `JobRun` is in progress.
+     * 
+ * + * IN_PROGRESS = 1; + */ + IN_PROGRESS(1), + /** + * + * + *
+     * The `JobRun` has succeeded.
+     * 
+ * + * SUCCEEDED = 2; + */ + SUCCEEDED(2), + /** + * + * + *
+     * The `JobRun` has failed.
+     * 
+ * + * FAILED = 3; + */ + FAILED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The `JobRun` has an unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The `JobRun` is in progress.
+     * 
+ * + * IN_PROGRESS = 1; + */ + public static final int IN_PROGRESS_VALUE = 1; + /** + * + * + *
+     * The `JobRun` has succeeded.
+     * 
+ * + * SUCCEEDED = 2; + */ + public static final int SUCCEEDED_VALUE = 2; + /** + * + * + *
+     * The `JobRun` has failed.
+     * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return IN_PROGRESS; + case 2: + return SUCCEEDED; + case 3: + return FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.deploy.v1.JobRun.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.deploy.v1.JobRun.State) + } + + private int jobRunCase_ = 0; + private java.lang.Object jobRun_; + + public enum JobRunCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DEPLOY_JOB_RUN(9), + VERIFY_JOB_RUN(10), + JOBRUN_NOT_SET(0); + private final int value; + + private JobRunCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JobRunCase valueOf(int value) { + return forNumber(value); + } + + public static JobRunCase forNumber(int value) { + switch (value) { + case 9: + return DEPLOY_JOB_RUN; + case 10: + return VERIFY_JOB_RUN; + case 0: + return JOBRUN_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public JobRunCase getJobRunCase() { + return JobRunCase.forNumber(jobRunCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Optional. Name of the `JobRun`. Format is projects/{project}/locations/{location}/
+   * deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/
+   * {rollouts}/jobRuns/{uuid}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+   * Optional. Name of the `JobRun`. Format is projects/{project}/locations/{location}/
+   * deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/
+   * {rollouts}/jobRuns/{uuid}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 UID_FIELD_NUMBER = 2; + private volatile java.lang.Object uid_; + /** + * + * + *
+   * Output only. Unique identifier of the `JobRun`.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Unique identifier of the `JobRun`.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PHASE_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object phaseId_; + /** + * + * + *
+   * Output only. ID of the `Rollout` phase this `JobRun` belongs in.
+   * 
+ * + * string phase_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The phaseId. + */ + @java.lang.Override + public java.lang.String getPhaseId() { + java.lang.Object ref = phaseId_; + 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(); + phaseId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. ID of the `Rollout` phase this `JobRun` belongs in.
+   * 
+ * + * string phase_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for phaseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPhaseIdBytes() { + java.lang.Object ref = phaseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + phaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOB_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object jobId_; + /** + * + * + *
+   * Output only. ID of the `Rollout` job this `JobRun` corresponds to.
+   * 
+ * + * string job_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The jobId. + */ + @java.lang.Override + public java.lang.String getJobId() { + java.lang.Object ref = jobId_; + 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(); + jobId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. ID of the `Rollout` job this `JobRun` corresponds to.
+   * 
+ * + * string job_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for jobId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJobIdBytes() { + java.lang.Object ref = jobId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time at which the `JobRun` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time at which the `JobRun` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time at which the `JobRun` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int START_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Output only. Time at which the `JobRun` was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Output only. Time at which the `JobRun` was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Output only. Time at which the `JobRun` was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. Time at which the `JobRun` ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. Time at which the `JobRun` ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. Time at which the `JobRun` ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int STATE_FIELD_NUMBER = 8; + private int state_; + /** + * + * + *
+   * Output only. The current state of the `JobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.JobRun.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The current state of the `JobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.JobRun.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.JobRun.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.JobRun.State result = + com.google.cloud.deploy.v1.JobRun.State.valueOf(state_); + return result == null ? com.google.cloud.deploy.v1.JobRun.State.UNRECOGNIZED : result; + } + + public static final int DEPLOY_JOB_RUN_FIELD_NUMBER = 9; + /** + * + * + *
+   * Output only. Information specific to a deploy `JobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun deploy_job_run = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deployJobRun field is set. + */ + @java.lang.Override + public boolean hasDeployJobRun() { + return jobRunCase_ == 9; + } + /** + * + * + *
+   * Output only. Information specific to a deploy `JobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun deploy_job_run = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deployJobRun. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJobRun getDeployJobRun() { + if (jobRunCase_ == 9) { + return (com.google.cloud.deploy.v1.DeployJobRun) jobRun_; + } + return com.google.cloud.deploy.v1.DeployJobRun.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. Information specific to a deploy `JobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun deploy_job_run = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJobRunOrBuilder getDeployJobRunOrBuilder() { + if (jobRunCase_ == 9) { + return (com.google.cloud.deploy.v1.DeployJobRun) jobRun_; + } + return com.google.cloud.deploy.v1.DeployJobRun.getDefaultInstance(); + } + + public static final int VERIFY_JOB_RUN_FIELD_NUMBER = 10; + /** + * + * + *
+   * Output only. Information specific to a verify `JobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun verify_job_run = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the verifyJobRun field is set. + */ + @java.lang.Override + public boolean hasVerifyJobRun() { + return jobRunCase_ == 10; + } + /** + * + * + *
+   * Output only. Information specific to a verify `JobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun verify_job_run = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The verifyJobRun. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.VerifyJobRun getVerifyJobRun() { + if (jobRunCase_ == 10) { + return (com.google.cloud.deploy.v1.VerifyJobRun) jobRun_; + } + return com.google.cloud.deploy.v1.VerifyJobRun.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. Information specific to a verify `JobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun verify_job_run = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.VerifyJobRunOrBuilder getVerifyJobRunOrBuilder() { + if (jobRunCase_ == 10) { + return (com.google.cloud.deploy.v1.VerifyJobRun) jobRun_; + } + return com.google.cloud.deploy.v1.VerifyJobRun.getDefaultInstance(); + } + + public static final int ETAG_FIELD_NUMBER = 11; + private volatile java.lang.Object etag_; + /** + * + * + *
+   * Output only. This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(phaseId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, phaseId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, jobId_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (startTime_ != null) { + output.writeMessage(6, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(7, getEndTime()); + } + if (state_ != com.google.cloud.deploy.v1.JobRun.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(8, state_); + } + if (jobRunCase_ == 9) { + output.writeMessage(9, (com.google.cloud.deploy.v1.DeployJobRun) jobRun_); + } + if (jobRunCase_ == 10) { + output.writeMessage(10, (com.google.cloud.deploy.v1.VerifyJobRun) jobRun_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, etag_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(phaseId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, phaseId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, jobId_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getEndTime()); + } + if (state_ != com.google.cloud.deploy.v1.JobRun.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, state_); + } + if (jobRunCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.cloud.deploy.v1.DeployJobRun) jobRun_); + } + if (jobRunCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, (com.google.cloud.deploy.v1.VerifyJobRun) jobRun_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, etag_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.JobRun)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.JobRun other = (com.google.cloud.deploy.v1.JobRun) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUid().equals(other.getUid())) return false; + if (!getPhaseId().equals(other.getPhaseId())) return false; + if (!getJobId().equals(other.getJobId())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (state_ != other.state_) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getJobRunCase().equals(other.getJobRunCase())) return false; + switch (jobRunCase_) { + case 9: + if (!getDeployJobRun().equals(other.getDeployJobRun())) return false; + break; + case 10: + if (!getVerifyJobRun().equals(other.getVerifyJobRun())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + PHASE_ID_FIELD_NUMBER; + hash = (53 * hash) + getPhaseId().hashCode(); + hash = (37 * hash) + JOB_ID_FIELD_NUMBER; + hash = (53 * hash) + getJobId().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + switch (jobRunCase_) { + case 9: + hash = (37 * hash) + DEPLOY_JOB_RUN_FIELD_NUMBER; + hash = (53 * hash) + getDeployJobRun().hashCode(); + break; + case 10: + hash = (37 * hash) + VERIFY_JOB_RUN_FIELD_NUMBER; + hash = (53 * hash) + getVerifyJobRun().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.JobRun parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.JobRun 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.deploy.v1.JobRun parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.JobRun 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.deploy.v1.JobRun parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.JobRun parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.JobRun parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.JobRun 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.deploy.v1.JobRun parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.JobRun 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.deploy.v1.JobRun parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.JobRun 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.deploy.v1.JobRun prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A `JobRun` resource in the Google Cloud Deploy API.
+   * A `JobRun` contains information of a single `Rollout` job evaluation.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.JobRun} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.JobRun) + com.google.cloud.deploy.v1.JobRunOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_JobRun_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_JobRun_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.JobRun.class, + com.google.cloud.deploy.v1.JobRun.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.JobRun.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + uid_ = ""; + + phaseId_ = ""; + + jobId_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + state_ = 0; + + if (deployJobRunBuilder_ != null) { + deployJobRunBuilder_.clear(); + } + if (verifyJobRunBuilder_ != null) { + verifyJobRunBuilder_.clear(); + } + etag_ = ""; + + jobRunCase_ = 0; + jobRun_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_JobRun_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.JobRun getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.JobRun.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.JobRun build() { + com.google.cloud.deploy.v1.JobRun result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.JobRun buildPartial() { + com.google.cloud.deploy.v1.JobRun result = new com.google.cloud.deploy.v1.JobRun(this); + result.name_ = name_; + result.uid_ = uid_; + result.phaseId_ = phaseId_; + result.jobId_ = jobId_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.state_ = state_; + if (jobRunCase_ == 9) { + if (deployJobRunBuilder_ == null) { + result.jobRun_ = jobRun_; + } else { + result.jobRun_ = deployJobRunBuilder_.build(); + } + } + if (jobRunCase_ == 10) { + if (verifyJobRunBuilder_ == null) { + result.jobRun_ = jobRun_; + } else { + result.jobRun_ = verifyJobRunBuilder_.build(); + } + } + result.etag_ = etag_; + result.jobRunCase_ = jobRunCase_; + 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.deploy.v1.JobRun) { + return mergeFrom((com.google.cloud.deploy.v1.JobRun) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.JobRun other) { + if (other == com.google.cloud.deploy.v1.JobRun.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + onChanged(); + } + if (!other.getPhaseId().isEmpty()) { + phaseId_ = other.phaseId_; + onChanged(); + } + if (!other.getJobId().isEmpty()) { + jobId_ = other.jobId_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + onChanged(); + } + switch (other.getJobRunCase()) { + case DEPLOY_JOB_RUN: + { + mergeDeployJobRun(other.getDeployJobRun()); + break; + } + case VERIFY_JOB_RUN: + { + mergeVerifyJobRun(other.getVerifyJobRun()); + break; + } + case JOBRUN_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + phaseId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + jobId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 64: + { + state_ = input.readEnum(); + + break; + } // case 64 + case 74: + { + input.readMessage(getDeployJobRunFieldBuilder().getBuilder(), extensionRegistry); + jobRunCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage(getVerifyJobRunFieldBuilder().getBuilder(), extensionRegistry); + jobRunCase_ = 10; + break; + } // case 82 + case 90: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int jobRunCase_ = 0; + private java.lang.Object jobRun_; + + public JobRunCase getJobRunCase() { + return JobRunCase.forNumber(jobRunCase_); + } + + public Builder clearJobRun() { + jobRunCase_ = 0; + jobRun_ = null; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Optional. Name of the `JobRun`. Format is projects/{project}/locations/{location}/
+     * deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/
+     * {rollouts}/jobRuns/{uuid}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. Name of the `JobRun`. Format is projects/{project}/locations/{location}/
+     * deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/
+     * {rollouts}/jobRuns/{uuid}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. Name of the `JobRun`. Format is projects/{project}/locations/{location}/
+     * deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/
+     * {rollouts}/jobRuns/{uuid}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + /** + * + * + *
+     * Optional. Name of the `JobRun`. Format is projects/{project}/locations/{location}/
+     * deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/
+     * {rollouts}/jobRuns/{uuid}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Name of the `JobRun`. Format is projects/{project}/locations/{location}/
+     * deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/
+     * {rollouts}/jobRuns/{uuid}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + * + * + *
+     * Output only. Unique identifier of the `JobRun`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Unique identifier of the `JobRun`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Unique identifier of the `JobRun`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Unique identifier of the `JobRun`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + + uid_ = getDefaultInstance().getUid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Unique identifier of the `JobRun`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uid_ = value; + onChanged(); + return this; + } + + private java.lang.Object phaseId_ = ""; + /** + * + * + *
+     * Output only. ID of the `Rollout` phase this `JobRun` belongs in.
+     * 
+ * + * string phase_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The phaseId. + */ + public java.lang.String getPhaseId() { + java.lang.Object ref = phaseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phaseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. ID of the `Rollout` phase this `JobRun` belongs in.
+     * 
+ * + * string phase_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for phaseId. + */ + public com.google.protobuf.ByteString getPhaseIdBytes() { + java.lang.Object ref = phaseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + phaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. ID of the `Rollout` phase this `JobRun` belongs in.
+     * 
+ * + * string phase_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The phaseId to set. + * @return This builder for chaining. + */ + public Builder setPhaseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + phaseId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. ID of the `Rollout` phase this `JobRun` belongs in.
+     * 
+ * + * string phase_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPhaseId() { + + phaseId_ = getDefaultInstance().getPhaseId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. ID of the `Rollout` phase this `JobRun` belongs in.
+     * 
+ * + * string phase_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for phaseId to set. + * @return This builder for chaining. + */ + public Builder setPhaseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + phaseId_ = value; + onChanged(); + return this; + } + + private java.lang.Object jobId_ = ""; + /** + * + * + *
+     * Output only. ID of the `Rollout` job this `JobRun` corresponds to.
+     * 
+ * + * string job_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The jobId. + */ + public java.lang.String getJobId() { + java.lang.Object ref = jobId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. ID of the `Rollout` job this `JobRun` corresponds to.
+     * 
+ * + * string job_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for jobId. + */ + public com.google.protobuf.ByteString getJobIdBytes() { + java.lang.Object ref = jobId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. ID of the `Rollout` job this `JobRun` corresponds to.
+     * 
+ * + * string job_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The jobId to set. + * @return This builder for chaining. + */ + public Builder setJobId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jobId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. ID of the `Rollout` job this `JobRun` corresponds to.
+     * 
+ * + * string job_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearJobId() { + + jobId_ = getDefaultInstance().getJobId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. ID of the `Rollout` job this `JobRun` corresponds to.
+     * 
+ * + * string job_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for jobId to set. + * @return This builder for chaining. + */ + public Builder setJobIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jobId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time at which the `JobRun` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Output only. Time at which the `JobRun` was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. Time at which the `JobRun` ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. Time at which the `JobRun` ended.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The current state of the `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.JobRun.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The current state of the `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.JobRun.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of the `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.JobRun.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.JobRun.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.JobRun.State result = + com.google.cloud.deploy.v1.JobRun.State.valueOf(state_); + return result == null ? com.google.cloud.deploy.v1.JobRun.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The current state of the `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.JobRun.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.deploy.v1.JobRun.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current state of the `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.JobRun.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeployJobRun, + com.google.cloud.deploy.v1.DeployJobRun.Builder, + com.google.cloud.deploy.v1.DeployJobRunOrBuilder> + deployJobRunBuilder_; + /** + * + * + *
+     * Output only. Information specific to a deploy `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun deploy_job_run = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deployJobRun field is set. + */ + @java.lang.Override + public boolean hasDeployJobRun() { + return jobRunCase_ == 9; + } + /** + * + * + *
+     * Output only. Information specific to a deploy `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun deploy_job_run = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deployJobRun. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJobRun getDeployJobRun() { + if (deployJobRunBuilder_ == null) { + if (jobRunCase_ == 9) { + return (com.google.cloud.deploy.v1.DeployJobRun) jobRun_; + } + return com.google.cloud.deploy.v1.DeployJobRun.getDefaultInstance(); + } else { + if (jobRunCase_ == 9) { + return deployJobRunBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.DeployJobRun.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Information specific to a deploy `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun deploy_job_run = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeployJobRun(com.google.cloud.deploy.v1.DeployJobRun value) { + if (deployJobRunBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jobRun_ = value; + onChanged(); + } else { + deployJobRunBuilder_.setMessage(value); + } + jobRunCase_ = 9; + return this; + } + /** + * + * + *
+     * Output only. Information specific to a deploy `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun deploy_job_run = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeployJobRun( + com.google.cloud.deploy.v1.DeployJobRun.Builder builderForValue) { + if (deployJobRunBuilder_ == null) { + jobRun_ = builderForValue.build(); + onChanged(); + } else { + deployJobRunBuilder_.setMessage(builderForValue.build()); + } + jobRunCase_ = 9; + return this; + } + /** + * + * + *
+     * Output only. Information specific to a deploy `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun deploy_job_run = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeployJobRun(com.google.cloud.deploy.v1.DeployJobRun value) { + if (deployJobRunBuilder_ == null) { + if (jobRunCase_ == 9 + && jobRun_ != com.google.cloud.deploy.v1.DeployJobRun.getDefaultInstance()) { + jobRun_ = + com.google.cloud.deploy.v1.DeployJobRun.newBuilder( + (com.google.cloud.deploy.v1.DeployJobRun) jobRun_) + .mergeFrom(value) + .buildPartial(); + } else { + jobRun_ = value; + } + onChanged(); + } else { + if (jobRunCase_ == 9) { + deployJobRunBuilder_.mergeFrom(value); + } else { + deployJobRunBuilder_.setMessage(value); + } + } + jobRunCase_ = 9; + return this; + } + /** + * + * + *
+     * Output only. Information specific to a deploy `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun deploy_job_run = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeployJobRun() { + if (deployJobRunBuilder_ == null) { + if (jobRunCase_ == 9) { + jobRunCase_ = 0; + jobRun_ = null; + onChanged(); + } + } else { + if (jobRunCase_ == 9) { + jobRunCase_ = 0; + jobRun_ = null; + } + deployJobRunBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Information specific to a deploy `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun deploy_job_run = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.DeployJobRun.Builder getDeployJobRunBuilder() { + return getDeployJobRunFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Information specific to a deploy `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun deploy_job_run = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeployJobRunOrBuilder getDeployJobRunOrBuilder() { + if ((jobRunCase_ == 9) && (deployJobRunBuilder_ != null)) { + return deployJobRunBuilder_.getMessageOrBuilder(); + } else { + if (jobRunCase_ == 9) { + return (com.google.cloud.deploy.v1.DeployJobRun) jobRun_; + } + return com.google.cloud.deploy.v1.DeployJobRun.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Information specific to a deploy `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun deploy_job_run = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeployJobRun, + com.google.cloud.deploy.v1.DeployJobRun.Builder, + com.google.cloud.deploy.v1.DeployJobRunOrBuilder> + getDeployJobRunFieldBuilder() { + if (deployJobRunBuilder_ == null) { + if (!(jobRunCase_ == 9)) { + jobRun_ = com.google.cloud.deploy.v1.DeployJobRun.getDefaultInstance(); + } + deployJobRunBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeployJobRun, + com.google.cloud.deploy.v1.DeployJobRun.Builder, + com.google.cloud.deploy.v1.DeployJobRunOrBuilder>( + (com.google.cloud.deploy.v1.DeployJobRun) jobRun_, + getParentForChildren(), + isClean()); + jobRun_ = null; + } + jobRunCase_ = 9; + onChanged(); + ; + return deployJobRunBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.VerifyJobRun, + com.google.cloud.deploy.v1.VerifyJobRun.Builder, + com.google.cloud.deploy.v1.VerifyJobRunOrBuilder> + verifyJobRunBuilder_; + /** + * + * + *
+     * Output only. Information specific to a verify `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun verify_job_run = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the verifyJobRun field is set. + */ + @java.lang.Override + public boolean hasVerifyJobRun() { + return jobRunCase_ == 10; + } + /** + * + * + *
+     * Output only. Information specific to a verify `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun verify_job_run = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The verifyJobRun. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.VerifyJobRun getVerifyJobRun() { + if (verifyJobRunBuilder_ == null) { + if (jobRunCase_ == 10) { + return (com.google.cloud.deploy.v1.VerifyJobRun) jobRun_; + } + return com.google.cloud.deploy.v1.VerifyJobRun.getDefaultInstance(); + } else { + if (jobRunCase_ == 10) { + return verifyJobRunBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.VerifyJobRun.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Information specific to a verify `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun verify_job_run = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setVerifyJobRun(com.google.cloud.deploy.v1.VerifyJobRun value) { + if (verifyJobRunBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jobRun_ = value; + onChanged(); + } else { + verifyJobRunBuilder_.setMessage(value); + } + jobRunCase_ = 10; + return this; + } + /** + * + * + *
+     * Output only. Information specific to a verify `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun verify_job_run = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setVerifyJobRun( + com.google.cloud.deploy.v1.VerifyJobRun.Builder builderForValue) { + if (verifyJobRunBuilder_ == null) { + jobRun_ = builderForValue.build(); + onChanged(); + } else { + verifyJobRunBuilder_.setMessage(builderForValue.build()); + } + jobRunCase_ = 10; + return this; + } + /** + * + * + *
+     * Output only. Information specific to a verify `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun verify_job_run = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeVerifyJobRun(com.google.cloud.deploy.v1.VerifyJobRun value) { + if (verifyJobRunBuilder_ == null) { + if (jobRunCase_ == 10 + && jobRun_ != com.google.cloud.deploy.v1.VerifyJobRun.getDefaultInstance()) { + jobRun_ = + com.google.cloud.deploy.v1.VerifyJobRun.newBuilder( + (com.google.cloud.deploy.v1.VerifyJobRun) jobRun_) + .mergeFrom(value) + .buildPartial(); + } else { + jobRun_ = value; + } + onChanged(); + } else { + if (jobRunCase_ == 10) { + verifyJobRunBuilder_.mergeFrom(value); + } else { + verifyJobRunBuilder_.setMessage(value); + } + } + jobRunCase_ = 10; + return this; + } + /** + * + * + *
+     * Output only. Information specific to a verify `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun verify_job_run = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearVerifyJobRun() { + if (verifyJobRunBuilder_ == null) { + if (jobRunCase_ == 10) { + jobRunCase_ = 0; + jobRun_ = null; + onChanged(); + } + } else { + if (jobRunCase_ == 10) { + jobRunCase_ = 0; + jobRun_ = null; + } + verifyJobRunBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Information specific to a verify `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun verify_job_run = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.VerifyJobRun.Builder getVerifyJobRunBuilder() { + return getVerifyJobRunFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Information specific to a verify `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun verify_job_run = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.VerifyJobRunOrBuilder getVerifyJobRunOrBuilder() { + if ((jobRunCase_ == 10) && (verifyJobRunBuilder_ != null)) { + return verifyJobRunBuilder_.getMessageOrBuilder(); + } else { + if (jobRunCase_ == 10) { + return (com.google.cloud.deploy.v1.VerifyJobRun) jobRun_; + } + return com.google.cloud.deploy.v1.VerifyJobRun.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Information specific to a verify `JobRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun verify_job_run = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.VerifyJobRun, + com.google.cloud.deploy.v1.VerifyJobRun.Builder, + com.google.cloud.deploy.v1.VerifyJobRunOrBuilder> + getVerifyJobRunFieldBuilder() { + if (verifyJobRunBuilder_ == null) { + if (!(jobRunCase_ == 10)) { + jobRun_ = com.google.cloud.deploy.v1.VerifyJobRun.getDefaultInstance(); + } + verifyJobRunBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.VerifyJobRun, + com.google.cloud.deploy.v1.VerifyJobRun.Builder, + com.google.cloud.deploy.v1.VerifyJobRunOrBuilder>( + (com.google.cloud.deploy.v1.VerifyJobRun) jobRun_, + getParentForChildren(), + isClean()); + jobRun_ = null; + } + jobRunCase_ = 10; + onChanged(); + ; + return verifyJobRunBuilder_; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Output only. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + etag_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + + etag_ = getDefaultInstance().getEtag(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + etag_ = value; + 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.deploy.v1.JobRun) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.JobRun) + private static final com.google.cloud.deploy.v1.JobRun DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.JobRun(); + } + + public static com.google.cloud.deploy.v1.JobRun getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JobRun parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.JobRun getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRunName.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRunName.java new file mode 100644 index 0000000..8ba974e --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRunName.java @@ -0,0 +1,337 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1; + +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 JobRunName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DELIVERY_PIPELINE_RELEASE_ROLLOUT_JOB_RUN = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{job_run}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String deliveryPipeline; + private final String release; + private final String rollout; + private final String jobRun; + + @Deprecated + protected JobRunName() { + project = null; + location = null; + deliveryPipeline = null; + release = null; + rollout = null; + jobRun = null; + } + + private JobRunName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + deliveryPipeline = Preconditions.checkNotNull(builder.getDeliveryPipeline()); + release = Preconditions.checkNotNull(builder.getRelease()); + rollout = Preconditions.checkNotNull(builder.getRollout()); + jobRun = Preconditions.checkNotNull(builder.getJobRun()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeliveryPipeline() { + return deliveryPipeline; + } + + public String getRelease() { + return release; + } + + public String getRollout() { + return rollout; + } + + public String getJobRun() { + return jobRun; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static JobRunName of( + String project, + String location, + String deliveryPipeline, + String release, + String rollout, + String jobRun) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDeliveryPipeline(deliveryPipeline) + .setRelease(release) + .setRollout(rollout) + .setJobRun(jobRun) + .build(); + } + + public static String format( + String project, + String location, + String deliveryPipeline, + String release, + String rollout, + String jobRun) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDeliveryPipeline(deliveryPipeline) + .setRelease(release) + .setRollout(rollout) + .setJobRun(jobRun) + .build() + .toString(); + } + + public static JobRunName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DELIVERY_PIPELINE_RELEASE_ROLLOUT_JOB_RUN.validatedMatch( + formattedString, "JobRunName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("delivery_pipeline"), + matchMap.get("release"), + matchMap.get("rollout"), + matchMap.get("job_run")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (JobRunName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DELIVERY_PIPELINE_RELEASE_ROLLOUT_JOB_RUN.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (deliveryPipeline != null) { + fieldMapBuilder.put("delivery_pipeline", deliveryPipeline); + } + if (release != null) { + fieldMapBuilder.put("release", release); + } + if (rollout != null) { + fieldMapBuilder.put("rollout", rollout); + } + if (jobRun != null) { + fieldMapBuilder.put("job_run", jobRun); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DELIVERY_PIPELINE_RELEASE_ROLLOUT_JOB_RUN.instantiate( + "project", + project, + "location", + location, + "delivery_pipeline", + deliveryPipeline, + "release", + release, + "rollout", + rollout, + "job_run", + jobRun); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + JobRunName that = ((JobRunName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.deliveryPipeline, that.deliveryPipeline) + && Objects.equals(this.release, that.release) + && Objects.equals(this.rollout, that.rollout) + && Objects.equals(this.jobRun, that.jobRun); + } + 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(deliveryPipeline); + h *= 1000003; + h ^= Objects.hashCode(release); + h *= 1000003; + h ^= Objects.hashCode(rollout); + h *= 1000003; + h ^= Objects.hashCode(jobRun); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{job_run}. + */ + public static class Builder { + private String project; + private String location; + private String deliveryPipeline; + private String release; + private String rollout; + private String jobRun; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeliveryPipeline() { + return deliveryPipeline; + } + + public String getRelease() { + return release; + } + + public String getRollout() { + return rollout; + } + + public String getJobRun() { + return jobRun; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDeliveryPipeline(String deliveryPipeline) { + this.deliveryPipeline = deliveryPipeline; + return this; + } + + public Builder setRelease(String release) { + this.release = release; + return this; + } + + public Builder setRollout(String rollout) { + this.rollout = rollout; + return this; + } + + public Builder setJobRun(String jobRun) { + this.jobRun = jobRun; + return this; + } + + private Builder(JobRunName jobRunName) { + this.project = jobRunName.project; + this.location = jobRunName.location; + this.deliveryPipeline = jobRunName.deliveryPipeline; + this.release = jobRunName.release; + this.rollout = jobRunName.rollout; + this.jobRun = jobRunName.jobRun; + } + + public JobRunName build() { + return new JobRunName(this); + } + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRunNotificationEvent.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRunNotificationEvent.java new file mode 100644 index 0000000..b18ef99 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRunNotificationEvent.java @@ -0,0 +1,1656 @@ +/* + * 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/deploy/v1/jobrun_notification_payload.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Payload proto for "clouddeploy.googleapis.com/jobrun_notification"
+ * Platform Log event that describes the failure to send JobRun resource update
+ * Pub/Sub notification.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.JobRunNotificationEvent} + */ +public final class JobRunNotificationEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.JobRunNotificationEvent) + JobRunNotificationEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use JobRunNotificationEvent.newBuilder() to construct. + private JobRunNotificationEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private JobRunNotificationEvent() { + message_ = ""; + jobRun_ = ""; + pipelineUid_ = ""; + releaseUid_ = ""; + rolloutUid_ = ""; + targetId_ = ""; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new JobRunNotificationEvent(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.JobRunNotificationPayloadProto + .internal_static_google_cloud_deploy_v1_JobRunNotificationEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.JobRunNotificationPayloadProto + .internal_static_google_cloud_deploy_v1_JobRunNotificationEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.JobRunNotificationEvent.class, + com.google.cloud.deploy.v1.JobRunNotificationEvent.Builder.class); + } + + public static final int MESSAGE_FIELD_NUMBER = 1; + private volatile java.lang.Object message_; + /** + * + * + *
+   * Debug message for when a notification fails to send.
+   * 
+ * + * string message = 1; + * + * @return The message. + */ + @java.lang.Override + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } + } + /** + * + * + *
+   * Debug message for when a notification fails to send.
+   * 
+ * + * string message = 1; + * + * @return The bytes for message. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOB_RUN_FIELD_NUMBER = 2; + private volatile java.lang.Object jobRun_; + /** + * + * + *
+   * The name of the `JobRun`.
+   * 
+ * + * string job_run = 2; + * + * @return The jobRun. + */ + @java.lang.Override + public java.lang.String getJobRun() { + java.lang.Object ref = jobRun_; + 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(); + jobRun_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the `JobRun`.
+   * 
+ * + * string job_run = 2; + * + * @return The bytes for jobRun. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJobRunBytes() { + java.lang.Object ref = jobRun_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobRun_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PIPELINE_UID_FIELD_NUMBER = 3; + private volatile java.lang.Object pipelineUid_; + /** + * + * + *
+   * Unique identifier of the `DeliveryPipeline`.
+   * 
+ * + * string pipeline_uid = 3; + * + * @return The pipelineUid. + */ + @java.lang.Override + public java.lang.String getPipelineUid() { + java.lang.Object ref = pipelineUid_; + 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(); + pipelineUid_ = s; + return s; + } + } + /** + * + * + *
+   * Unique identifier of the `DeliveryPipeline`.
+   * 
+ * + * string pipeline_uid = 3; + * + * @return The bytes for pipelineUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPipelineUidBytes() { + java.lang.Object ref = pipelineUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pipelineUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELEASE_UID_FIELD_NUMBER = 4; + private volatile java.lang.Object releaseUid_; + /** + * + * + *
+   * Unique identifier of the `Release`.
+   * 
+ * + * string release_uid = 4; + * + * @return The releaseUid. + */ + @java.lang.Override + public java.lang.String getReleaseUid() { + java.lang.Object ref = releaseUid_; + 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(); + releaseUid_ = s; + return s; + } + } + /** + * + * + *
+   * Unique identifier of the `Release`.
+   * 
+ * + * string release_uid = 4; + * + * @return The bytes for releaseUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReleaseUidBytes() { + java.lang.Object ref = releaseUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + releaseUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROLLOUT_UID_FIELD_NUMBER = 5; + private volatile java.lang.Object rolloutUid_; + /** + * + * + *
+   * Unique identifier of the `Rollout`.
+   * 
+ * + * string rollout_uid = 5; + * + * @return The rolloutUid. + */ + @java.lang.Override + public java.lang.String getRolloutUid() { + java.lang.Object ref = rolloutUid_; + 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(); + rolloutUid_ = s; + return s; + } + } + /** + * + * + *
+   * Unique identifier of the `Rollout`.
+   * 
+ * + * string rollout_uid = 5; + * + * @return The bytes for rolloutUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRolloutUidBytes() { + java.lang.Object ref = rolloutUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rolloutUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_ID_FIELD_NUMBER = 6; + private volatile java.lang.Object targetId_; + /** + * + * + *
+   * ID of the `Target`.
+   * 
+ * + * string target_id = 6; + * + * @return The targetId. + */ + @java.lang.Override + public java.lang.String getTargetId() { + java.lang.Object ref = targetId_; + 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(); + targetId_ = s; + return s; + } + } + /** + * + * + *
+   * ID of the `Target`.
+   * 
+ * + * string target_id = 6; + * + * @return The bytes for targetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetIdBytes() { + java.lang.Object ref = targetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 7; + private int type_; + /** + * + * + *
+   * Type of this notification, e.g. for a Pub/Sub failure.
+   * 
+ * + * .google.cloud.deploy.v1.Type type = 7; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Type of this notification, e.g. for a Pub/Sub failure.
+   * 
+ * + * .google.cloud.deploy.v1.Type type = 7; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.Type result = com.google.cloud.deploy.v1.Type.valueOf(type_); + return result == null ? com.google.cloud.deploy.v1.Type.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, message_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobRun_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jobRun_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pipelineUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pipelineUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(releaseUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, releaseUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rolloutUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, rolloutUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, targetId_); + } + if (type_ != com.google.cloud.deploy.v1.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, type_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, message_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobRun_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jobRun_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pipelineUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pipelineUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(releaseUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, releaseUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rolloutUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, rolloutUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, targetId_); + } + if (type_ != com.google.cloud.deploy.v1.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.JobRunNotificationEvent)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.JobRunNotificationEvent other = + (com.google.cloud.deploy.v1.JobRunNotificationEvent) obj; + + if (!getMessage().equals(other.getMessage())) return false; + if (!getJobRun().equals(other.getJobRun())) return false; + if (!getPipelineUid().equals(other.getPipelineUid())) return false; + if (!getReleaseUid().equals(other.getReleaseUid())) return false; + if (!getRolloutUid().equals(other.getRolloutUid())) return false; + if (!getTargetId().equals(other.getTargetId())) return false; + if (type_ != other.type_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (37 * hash) + JOB_RUN_FIELD_NUMBER; + hash = (53 * hash) + getJobRun().hashCode(); + hash = (37 * hash) + PIPELINE_UID_FIELD_NUMBER; + hash = (53 * hash) + getPipelineUid().hashCode(); + hash = (37 * hash) + RELEASE_UID_FIELD_NUMBER; + hash = (53 * hash) + getReleaseUid().hashCode(); + hash = (37 * hash) + ROLLOUT_UID_FIELD_NUMBER; + hash = (53 * hash) + getRolloutUid().hashCode(); + hash = (37 * hash) + TARGET_ID_FIELD_NUMBER; + hash = (53 * hash) + getTargetId().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.JobRunNotificationEvent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.JobRunNotificationEvent 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.deploy.v1.JobRunNotificationEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.JobRunNotificationEvent 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.deploy.v1.JobRunNotificationEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.JobRunNotificationEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.JobRunNotificationEvent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.JobRunNotificationEvent 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.deploy.v1.JobRunNotificationEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.JobRunNotificationEvent 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.deploy.v1.JobRunNotificationEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.JobRunNotificationEvent 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.deploy.v1.JobRunNotificationEvent 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; + } + /** + * + * + *
+   * Payload proto for "clouddeploy.googleapis.com/jobrun_notification"
+   * Platform Log event that describes the failure to send JobRun resource update
+   * Pub/Sub notification.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.JobRunNotificationEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.JobRunNotificationEvent) + com.google.cloud.deploy.v1.JobRunNotificationEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.JobRunNotificationPayloadProto + .internal_static_google_cloud_deploy_v1_JobRunNotificationEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.JobRunNotificationPayloadProto + .internal_static_google_cloud_deploy_v1_JobRunNotificationEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.JobRunNotificationEvent.class, + com.google.cloud.deploy.v1.JobRunNotificationEvent.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.JobRunNotificationEvent.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + message_ = ""; + + jobRun_ = ""; + + pipelineUid_ = ""; + + releaseUid_ = ""; + + rolloutUid_ = ""; + + targetId_ = ""; + + type_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.JobRunNotificationPayloadProto + .internal_static_google_cloud_deploy_v1_JobRunNotificationEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.JobRunNotificationEvent getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.JobRunNotificationEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.JobRunNotificationEvent build() { + com.google.cloud.deploy.v1.JobRunNotificationEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.JobRunNotificationEvent buildPartial() { + com.google.cloud.deploy.v1.JobRunNotificationEvent result = + new com.google.cloud.deploy.v1.JobRunNotificationEvent(this); + result.message_ = message_; + result.jobRun_ = jobRun_; + result.pipelineUid_ = pipelineUid_; + result.releaseUid_ = releaseUid_; + result.rolloutUid_ = rolloutUid_; + result.targetId_ = targetId_; + result.type_ = type_; + 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.deploy.v1.JobRunNotificationEvent) { + return mergeFrom((com.google.cloud.deploy.v1.JobRunNotificationEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.JobRunNotificationEvent other) { + if (other == com.google.cloud.deploy.v1.JobRunNotificationEvent.getDefaultInstance()) + return this; + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + onChanged(); + } + if (!other.getJobRun().isEmpty()) { + jobRun_ = other.jobRun_; + onChanged(); + } + if (!other.getPipelineUid().isEmpty()) { + pipelineUid_ = other.pipelineUid_; + onChanged(); + } + if (!other.getReleaseUid().isEmpty()) { + releaseUid_ = other.releaseUid_; + onChanged(); + } + if (!other.getRolloutUid().isEmpty()) { + rolloutUid_ = other.rolloutUid_; + onChanged(); + } + if (!other.getTargetId().isEmpty()) { + targetId_ = other.targetId_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + message_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + jobRun_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + pipelineUid_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + releaseUid_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + rolloutUid_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + targetId_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 56: + { + type_ = input.readEnum(); + + break; + } // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object message_ = ""; + /** + * + * + *
+     * Debug message for when a notification fails to send.
+     * 
+ * + * string message = 1; + * + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Debug message for when a notification fails to send.
+     * 
+ * + * string message = 1; + * + * @return The bytes for message. + */ + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Debug message for when a notification fails to send.
+     * 
+ * + * string message = 1; + * + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + message_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Debug message for when a notification fails to send.
+     * 
+ * + * string message = 1; + * + * @return This builder for chaining. + */ + public Builder clearMessage() { + + message_ = getDefaultInstance().getMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Debug message for when a notification fails to send.
+     * 
+ * + * string message = 1; + * + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + message_ = value; + onChanged(); + return this; + } + + private java.lang.Object jobRun_ = ""; + /** + * + * + *
+     * The name of the `JobRun`.
+     * 
+ * + * string job_run = 2; + * + * @return The jobRun. + */ + public java.lang.String getJobRun() { + java.lang.Object ref = jobRun_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobRun_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the `JobRun`.
+     * 
+ * + * string job_run = 2; + * + * @return The bytes for jobRun. + */ + public com.google.protobuf.ByteString getJobRunBytes() { + java.lang.Object ref = jobRun_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobRun_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the `JobRun`.
+     * 
+ * + * string job_run = 2; + * + * @param value The jobRun to set. + * @return This builder for chaining. + */ + public Builder setJobRun(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jobRun_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the `JobRun`.
+     * 
+ * + * string job_run = 2; + * + * @return This builder for chaining. + */ + public Builder clearJobRun() { + + jobRun_ = getDefaultInstance().getJobRun(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the `JobRun`.
+     * 
+ * + * string job_run = 2; + * + * @param value The bytes for jobRun to set. + * @return This builder for chaining. + */ + public Builder setJobRunBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jobRun_ = value; + onChanged(); + return this; + } + + private java.lang.Object pipelineUid_ = ""; + /** + * + * + *
+     * Unique identifier of the `DeliveryPipeline`.
+     * 
+ * + * string pipeline_uid = 3; + * + * @return The pipelineUid. + */ + public java.lang.String getPipelineUid() { + java.lang.Object ref = pipelineUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pipelineUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Unique identifier of the `DeliveryPipeline`.
+     * 
+ * + * string pipeline_uid = 3; + * + * @return The bytes for pipelineUid. + */ + public com.google.protobuf.ByteString getPipelineUidBytes() { + java.lang.Object ref = pipelineUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pipelineUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Unique identifier of the `DeliveryPipeline`.
+     * 
+ * + * string pipeline_uid = 3; + * + * @param value The pipelineUid to set. + * @return This builder for chaining. + */ + public Builder setPipelineUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pipelineUid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Unique identifier of the `DeliveryPipeline`.
+     * 
+ * + * string pipeline_uid = 3; + * + * @return This builder for chaining. + */ + public Builder clearPipelineUid() { + + pipelineUid_ = getDefaultInstance().getPipelineUid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Unique identifier of the `DeliveryPipeline`.
+     * 
+ * + * string pipeline_uid = 3; + * + * @param value The bytes for pipelineUid to set. + * @return This builder for chaining. + */ + public Builder setPipelineUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pipelineUid_ = value; + onChanged(); + return this; + } + + private java.lang.Object releaseUid_ = ""; + /** + * + * + *
+     * Unique identifier of the `Release`.
+     * 
+ * + * string release_uid = 4; + * + * @return The releaseUid. + */ + public java.lang.String getReleaseUid() { + java.lang.Object ref = releaseUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + releaseUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Unique identifier of the `Release`.
+     * 
+ * + * string release_uid = 4; + * + * @return The bytes for releaseUid. + */ + public com.google.protobuf.ByteString getReleaseUidBytes() { + java.lang.Object ref = releaseUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + releaseUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Unique identifier of the `Release`.
+     * 
+ * + * string release_uid = 4; + * + * @param value The releaseUid to set. + * @return This builder for chaining. + */ + public Builder setReleaseUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + releaseUid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Unique identifier of the `Release`.
+     * 
+ * + * string release_uid = 4; + * + * @return This builder for chaining. + */ + public Builder clearReleaseUid() { + + releaseUid_ = getDefaultInstance().getReleaseUid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Unique identifier of the `Release`.
+     * 
+ * + * string release_uid = 4; + * + * @param value The bytes for releaseUid to set. + * @return This builder for chaining. + */ + public Builder setReleaseUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + releaseUid_ = value; + onChanged(); + return this; + } + + private java.lang.Object rolloutUid_ = ""; + /** + * + * + *
+     * Unique identifier of the `Rollout`.
+     * 
+ * + * string rollout_uid = 5; + * + * @return The rolloutUid. + */ + public java.lang.String getRolloutUid() { + java.lang.Object ref = rolloutUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rolloutUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Unique identifier of the `Rollout`.
+     * 
+ * + * string rollout_uid = 5; + * + * @return The bytes for rolloutUid. + */ + public com.google.protobuf.ByteString getRolloutUidBytes() { + java.lang.Object ref = rolloutUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rolloutUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Unique identifier of the `Rollout`.
+     * 
+ * + * string rollout_uid = 5; + * + * @param value The rolloutUid to set. + * @return This builder for chaining. + */ + public Builder setRolloutUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + rolloutUid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Unique identifier of the `Rollout`.
+     * 
+ * + * string rollout_uid = 5; + * + * @return This builder for chaining. + */ + public Builder clearRolloutUid() { + + rolloutUid_ = getDefaultInstance().getRolloutUid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Unique identifier of the `Rollout`.
+     * 
+ * + * string rollout_uid = 5; + * + * @param value The bytes for rolloutUid to set. + * @return This builder for chaining. + */ + public Builder setRolloutUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + rolloutUid_ = value; + onChanged(); + return this; + } + + private java.lang.Object targetId_ = ""; + /** + * + * + *
+     * ID of the `Target`.
+     * 
+ * + * string target_id = 6; + * + * @return The targetId. + */ + public java.lang.String getTargetId() { + java.lang.Object ref = targetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * ID of the `Target`.
+     * 
+ * + * string target_id = 6; + * + * @return The bytes for targetId. + */ + public com.google.protobuf.ByteString getTargetIdBytes() { + java.lang.Object ref = targetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * ID of the `Target`.
+     * 
+ * + * string target_id = 6; + * + * @param value The targetId to set. + * @return This builder for chaining. + */ + public Builder setTargetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the `Target`.
+     * 
+ * + * string target_id = 6; + * + * @return This builder for chaining. + */ + public Builder clearTargetId() { + + targetId_ = getDefaultInstance().getTargetId(); + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the `Target`.
+     * 
+ * + * string target_id = 6; + * + * @param value The bytes for targetId to set. + * @return This builder for chaining. + */ + public Builder setTargetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetId_ = value; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Type of this notification, e.g. for a Pub/Sub failure.
+     * 
+ * + * .google.cloud.deploy.v1.Type type = 7; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Type of this notification, e.g. for a Pub/Sub failure.
+     * 
+ * + * .google.cloud.deploy.v1.Type type = 7; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of this notification, e.g. for a Pub/Sub failure.
+     * 
+ * + * .google.cloud.deploy.v1.Type type = 7; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Type getType() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.Type result = com.google.cloud.deploy.v1.Type.valueOf(type_); + return result == null ? com.google.cloud.deploy.v1.Type.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Type of this notification, e.g. for a Pub/Sub failure.
+     * 
+ * + * .google.cloud.deploy.v1.Type type = 7; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.deploy.v1.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of this notification, e.g. for a Pub/Sub failure.
+     * 
+ * + * .google.cloud.deploy.v1.Type type = 7; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.JobRunNotificationEvent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.JobRunNotificationEvent) + private static final com.google.cloud.deploy.v1.JobRunNotificationEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.JobRunNotificationEvent(); + } + + public static com.google.cloud.deploy.v1.JobRunNotificationEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JobRunNotificationEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.JobRunNotificationEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRunNotificationEventOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRunNotificationEventOrBuilder.java new file mode 100644 index 0000000..579a152 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRunNotificationEventOrBuilder.java @@ -0,0 +1,200 @@ +/* + * 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/deploy/v1/jobrun_notification_payload.proto + +package com.google.cloud.deploy.v1; + +public interface JobRunNotificationEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.JobRunNotificationEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Debug message for when a notification fails to send.
+   * 
+ * + * string message = 1; + * + * @return The message. + */ + java.lang.String getMessage(); + /** + * + * + *
+   * Debug message for when a notification fails to send.
+   * 
+ * + * string message = 1; + * + * @return The bytes for message. + */ + com.google.protobuf.ByteString getMessageBytes(); + + /** + * + * + *
+   * The name of the `JobRun`.
+   * 
+ * + * string job_run = 2; + * + * @return The jobRun. + */ + java.lang.String getJobRun(); + /** + * + * + *
+   * The name of the `JobRun`.
+   * 
+ * + * string job_run = 2; + * + * @return The bytes for jobRun. + */ + com.google.protobuf.ByteString getJobRunBytes(); + + /** + * + * + *
+   * Unique identifier of the `DeliveryPipeline`.
+   * 
+ * + * string pipeline_uid = 3; + * + * @return The pipelineUid. + */ + java.lang.String getPipelineUid(); + /** + * + * + *
+   * Unique identifier of the `DeliveryPipeline`.
+   * 
+ * + * string pipeline_uid = 3; + * + * @return The bytes for pipelineUid. + */ + com.google.protobuf.ByteString getPipelineUidBytes(); + + /** + * + * + *
+   * Unique identifier of the `Release`.
+   * 
+ * + * string release_uid = 4; + * + * @return The releaseUid. + */ + java.lang.String getReleaseUid(); + /** + * + * + *
+   * Unique identifier of the `Release`.
+   * 
+ * + * string release_uid = 4; + * + * @return The bytes for releaseUid. + */ + com.google.protobuf.ByteString getReleaseUidBytes(); + + /** + * + * + *
+   * Unique identifier of the `Rollout`.
+   * 
+ * + * string rollout_uid = 5; + * + * @return The rolloutUid. + */ + java.lang.String getRolloutUid(); + /** + * + * + *
+   * Unique identifier of the `Rollout`.
+   * 
+ * + * string rollout_uid = 5; + * + * @return The bytes for rolloutUid. + */ + com.google.protobuf.ByteString getRolloutUidBytes(); + + /** + * + * + *
+   * ID of the `Target`.
+   * 
+ * + * string target_id = 6; + * + * @return The targetId. + */ + java.lang.String getTargetId(); + /** + * + * + *
+   * ID of the `Target`.
+   * 
+ * + * string target_id = 6; + * + * @return The bytes for targetId. + */ + com.google.protobuf.ByteString getTargetIdBytes(); + + /** + * + * + *
+   * Type of this notification, e.g. for a Pub/Sub failure.
+   * 
+ * + * .google.cloud.deploy.v1.Type type = 7; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Type of this notification, e.g. for a Pub/Sub failure.
+   * 
+ * + * .google.cloud.deploy.v1.Type type = 7; + * + * @return The type. + */ + com.google.cloud.deploy.v1.Type getType(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRunNotificationPayloadProto.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRunNotificationPayloadProto.java new file mode 100644 index 0000000..1ff2afd --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRunNotificationPayloadProto.java @@ -0,0 +1,74 @@ +/* + * 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/deploy/v1/jobrun_notification_payload.proto + +package com.google.cloud.deploy.v1; + +public final class JobRunNotificationPayloadProto { + private JobRunNotificationPayloadProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_JobRunNotificationEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_JobRunNotificationEvent_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n8google/cloud/deploy/v1/jobrun_notifica" + + "tion_payload.proto\022\026google.cloud.deploy." + + "v1\032&google/cloud/deploy/v1/log_enums.pro" + + "to\"\272\001\n\027JobRunNotificationEvent\022\017\n\007messag" + + "e\030\001 \001(\t\022\017\n\007job_run\030\002 \001(\t\022\024\n\014pipeline_uid" + + "\030\003 \001(\t\022\023\n\013release_uid\030\004 \001(\t\022\023\n\013rollout_u" + + "id\030\005 \001(\t\022\021\n\ttarget_id\030\006 \001(\t\022*\n\004type\030\007 \001(" + + "\0162\034.google.cloud.deploy.v1.TypeB|\n\032com.g" + + "oogle.cloud.deploy.v1B\036JobRunNotificatio" + + "nPayloadProtoP\001Z + * Optional. Name of the `JobRun`. Format is projects/{project}/locations/{location}/ + * deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/ + * {rollouts}/jobRuns/{uuid}. + * + * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Optional. Name of the `JobRun`. Format is projects/{project}/locations/{location}/
+   * deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/
+   * {rollouts}/jobRuns/{uuid}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Unique identifier of the `JobRun`.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. Unique identifier of the `JobRun`.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. ID of the `Rollout` phase this `JobRun` belongs in.
+   * 
+ * + * string phase_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The phaseId. + */ + java.lang.String getPhaseId(); + /** + * + * + *
+   * Output only. ID of the `Rollout` phase this `JobRun` belongs in.
+   * 
+ * + * string phase_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for phaseId. + */ + com.google.protobuf.ByteString getPhaseIdBytes(); + + /** + * + * + *
+   * Output only. ID of the `Rollout` job this `JobRun` corresponds to.
+   * 
+ * + * string job_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The jobId. + */ + java.lang.String getJobId(); + /** + * + * + *
+   * Output only. ID of the `Rollout` job this `JobRun` corresponds to.
+   * 
+ * + * string job_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for jobId. + */ + com.google.protobuf.ByteString getJobIdBytes(); + + /** + * + * + *
+   * Output only. Time at which the `JobRun` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time at which the `JobRun` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time at which the `JobRun` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time at which the `JobRun` was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Output only. Time at which the `JobRun` was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Output only. Time at which the `JobRun` was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time at which the `JobRun` ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. Time at which the `JobRun` ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. Time at which the `JobRun` ended.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The current state of the `JobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.JobRun.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The current state of the `JobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.JobRun.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.deploy.v1.JobRun.State getState(); + + /** + * + * + *
+   * Output only. Information specific to a deploy `JobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun deploy_job_run = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deployJobRun field is set. + */ + boolean hasDeployJobRun(); + /** + * + * + *
+   * Output only. Information specific to a deploy `JobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun deploy_job_run = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deployJobRun. + */ + com.google.cloud.deploy.v1.DeployJobRun getDeployJobRun(); + /** + * + * + *
+   * Output only. Information specific to a deploy `JobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeployJobRun deploy_job_run = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.DeployJobRunOrBuilder getDeployJobRunOrBuilder(); + + /** + * + * + *
+   * Output only. Information specific to a verify `JobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun verify_job_run = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the verifyJobRun field is set. + */ + boolean hasVerifyJobRun(); + /** + * + * + *
+   * Output only. Information specific to a verify `JobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun verify_job_run = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The verifyJobRun. + */ + com.google.cloud.deploy.v1.VerifyJobRun getVerifyJobRun(); + /** + * + * + *
+   * Output only. Information specific to a verify `JobRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun verify_job_run = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.VerifyJobRunOrBuilder getVerifyJobRunOrBuilder(); + + /** + * + * + *
+   * Output only. This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Output only. This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + public com.google.cloud.deploy.v1.JobRun.JobRunCase getJobRunCase(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequest.java index ba3a315..ba67009 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequest.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListDeliveryPipelinesRequest( - 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; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesRequest_descriptor; @@ -402,7 +330,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -426,7 +354,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -447,7 +375,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -468,7 +396,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -598,17 +526,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -725,7 +646,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -740,18 +661,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1307,7 +1271,18 @@ public ListDeliveryPipelinesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListDeliveryPipelinesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesResponse.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesResponse.java index 0b5d183..1ee2b31 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesResponse.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesResponse.java @@ -54,81 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListDeliveryPipelinesResponse( - 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)) { - deliveryPipelines_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - deliveryPipelines_.add( - input.readMessage( - com.google.cloud.deploy.v1.DeliveryPipeline.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - deliveryPipelines_ = java.util.Collections.unmodifiableList(deliveryPipelines_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_ListDeliveryPipelinesResponse_descriptor; @@ -349,7 +274,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < unreachable_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -373,7 +298,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnreachableList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -392,7 +317,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDeliveryPipelinesList().equals(other.getDeliveryPipelinesList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -413,7 +338,7 @@ public int hashCode() { hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; hash = (53 * hash) + getUnreachableList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -543,19 +468,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getDeliveryPipelinesFieldBuilder(); - } } @java.lang.Override @@ -563,10 +479,11 @@ public Builder clear() { super.clear(); if (deliveryPipelinesBuilder_ == null) { deliveryPipelines_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + deliveryPipelines_ = null; deliveryPipelinesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -705,7 +622,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.ListDeliveryPipelinesRespons } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -720,18 +637,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.deploy.v1.DeliveryPipeline m = + input.readMessage( + com.google.cloud.deploy.v1.DeliveryPipeline.parser(), extensionRegistry); + if (deliveryPipelinesBuilder_ == null) { + ensureDeliveryPipelinesIsMutable(); + deliveryPipelines_.add(m); + } else { + deliveryPipelinesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1408,7 +1364,18 @@ public ListDeliveryPipelinesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListDeliveryPipelinesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListJobRunsRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListJobRunsRequest.java new file mode 100644 index 0000000..3cf9247 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListJobRunsRequest.java @@ -0,0 +1,1289 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * ListJobRunsRequest is the request object used by `ListJobRuns`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListJobRunsRequest} + */ +public final class ListJobRunsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.ListJobRunsRequest) + ListJobRunsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListJobRunsRequest.newBuilder() to construct. + private ListJobRunsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListJobRunsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListJobRunsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListJobRunsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListJobRunsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListJobRunsRequest.class, + com.google.cloud.deploy.v1.ListJobRunsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The `Rollout` which owns this collection of `JobRun` objects.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The `Rollout` which owns this collection of `JobRun` objects.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Optional. The maximum number of `JobRun` objects to return. The service may return
+   * fewer than this value. If unspecified, at most 50 `JobRun` objects will be
+   * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A page token, received from a previous `ListJobRuns` call. Provide this
+   * to retrieve the subsequent page.
+   * When paginating, all other provided parameters match the call that provided
+   * the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A page token, received from a previous `ListJobRuns` call. Provide this
+   * to retrieve the subsequent page.
+   * When paginating, all other provided parameters match the call that provided
+   * the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Optional. Filter results to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Filter results to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + private volatile java.lang.Object orderBy_; + /** + * + * + *
+   * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.ListJobRunsRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.ListJobRunsRequest other = + (com.google.cloud.deploy.v1.ListJobRunsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.ListJobRunsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListJobRunsRequest 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.deploy.v1.ListJobRunsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListJobRunsRequest 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.deploy.v1.ListJobRunsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListJobRunsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.ListJobRunsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListJobRunsRequest 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.deploy.v1.ListJobRunsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListJobRunsRequest 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.deploy.v1.ListJobRunsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListJobRunsRequest 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.deploy.v1.ListJobRunsRequest 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; + } + /** + * + * + *
+   * ListJobRunsRequest is the request object used by `ListJobRuns`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListJobRunsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.ListJobRunsRequest) + com.google.cloud.deploy.v1.ListJobRunsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListJobRunsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListJobRunsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListJobRunsRequest.class, + com.google.cloud.deploy.v1.ListJobRunsRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.ListJobRunsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + orderBy_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListJobRunsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListJobRunsRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.ListJobRunsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListJobRunsRequest build() { + com.google.cloud.deploy.v1.ListJobRunsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListJobRunsRequest buildPartial() { + com.google.cloud.deploy.v1.ListJobRunsRequest result = + new com.google.cloud.deploy.v1.ListJobRunsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + result.orderBy_ = orderBy_; + 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.deploy.v1.ListJobRunsRequest) { + return mergeFrom((com.google.cloud.deploy.v1.ListJobRunsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.ListJobRunsRequest other) { + if (other == com.google.cloud.deploy.v1.ListJobRunsRequest.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(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The `Rollout` which owns this collection of `JobRun` objects.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The `Rollout` which owns this collection of `JobRun` objects.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The `Rollout` which owns this collection of `JobRun` objects.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `Rollout` which owns this collection of `JobRun` objects.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `Rollout` which owns this collection of `JobRun` objects.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of `JobRun` objects to return. The service may return
+     * fewer than this value. If unspecified, at most 50 `JobRun` objects will be
+     * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of `JobRun` objects to return. The service may return
+     * fewer than this value. If unspecified, at most 50 `JobRun` objects will be
+     * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of `JobRun` objects to return. The service may return
+     * fewer than this value. If unspecified, at most 50 `JobRun` objects will be
+     * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A page token, received from a previous `ListJobRuns` call. Provide this
+     * to retrieve the subsequent page.
+     * When paginating, all other provided parameters match the call that provided
+     * the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListJobRuns` call. Provide this
+     * to retrieve the subsequent page.
+     * When paginating, all other provided parameters match the call that provided
+     * the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListJobRuns` call. Provide this
+     * to retrieve the subsequent page.
+     * When paginating, all other provided parameters match the call that provided
+     * the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListJobRuns` call. Provide this
+     * to retrieve the subsequent page.
+     * When paginating, all other provided parameters match the call that provided
+     * the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListJobRuns` call. Provide this
+     * to retrieve the subsequent page.
+     * When paginating, all other provided parameters match the call that provided
+     * the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Filter results to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Filter results to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Filter results to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter results to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter results to be returned. See https://google.aip.dev/160 for more
+     * details.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = 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.deploy.v1.ListJobRunsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.ListJobRunsRequest) + private static final com.google.cloud.deploy.v1.ListJobRunsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.ListJobRunsRequest(); + } + + public static com.google.cloud.deploy.v1.ListJobRunsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListJobRunsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListJobRunsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListJobRunsRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListJobRunsRequestOrBuilder.java new file mode 100644 index 0000000..a209e62 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListJobRunsRequestOrBuilder.java @@ -0,0 +1,152 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface ListJobRunsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.ListJobRunsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The `Rollout` which owns this collection of `JobRun` objects.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The `Rollout` which owns this collection of `JobRun` objects.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of `JobRun` objects to return. The service may return
+   * fewer than this value. If unspecified, at most 50 `JobRun` objects will be
+   * returned. The maximum value is 1000; values above 1000 will be set to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListJobRuns` call. Provide this
+   * to retrieve the subsequent page.
+   * When paginating, all other provided parameters match the call that provided
+   * the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A page token, received from a previous `ListJobRuns` call. Provide this
+   * to retrieve the subsequent page.
+   * When paginating, all other provided parameters match the call that provided
+   * the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filter results to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filter results to be returned. See https://google.aip.dev/160 for more
+   * details.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListJobRunsResponse.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListJobRunsResponse.java new file mode 100644 index 0000000..9c9fd5e --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListJobRunsResponse.java @@ -0,0 +1,1379 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * ListJobRunsResponse is the response object returned by `ListJobRuns`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListJobRunsResponse} + */ +public final class ListJobRunsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.ListJobRunsResponse) + ListJobRunsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListJobRunsResponse.newBuilder() to construct. + private ListJobRunsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListJobRunsResponse() { + jobRuns_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListJobRunsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListJobRunsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListJobRunsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListJobRunsResponse.class, + com.google.cloud.deploy.v1.ListJobRunsResponse.Builder.class); + } + + public static final int JOB_RUNS_FIELD_NUMBER = 1; + private java.util.List jobRuns_; + /** + * + * + *
+   * The `JobRun` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + @java.lang.Override + public java.util.List getJobRunsList() { + return jobRuns_; + } + /** + * + * + *
+   * The `JobRun` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + @java.lang.Override + public java.util.List + getJobRunsOrBuilderList() { + return jobRuns_; + } + /** + * + * + *
+   * The `JobRun` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + @java.lang.Override + public int getJobRunsCount() { + return jobRuns_.size(); + } + /** + * + * + *
+   * The `JobRun` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.JobRun getJobRuns(int index) { + return jobRuns_.get(index); + } + /** + * + * + *
+   * The `JobRun` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.JobRunOrBuilder getJobRunsOrBuilder(int index) { + return jobRuns_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page. If
+   * this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page. If
+   * this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList unreachable_; + /** + * + * + *
+   * Locations that could not be reached
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + /** + * + * + *
+   * Locations that could not be reached
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+   * Locations that could not be reached
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < jobRuns_.size(); i++) { + output.writeMessage(1, jobRuns_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < jobRuns_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, jobRuns_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.ListJobRunsResponse)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.ListJobRunsResponse other = + (com.google.cloud.deploy.v1.ListJobRunsResponse) obj; + + if (!getJobRunsList().equals(other.getJobRunsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getJobRunsCount() > 0) { + hash = (37 * hash) + JOB_RUNS_FIELD_NUMBER; + hash = (53 * hash) + getJobRunsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.ListJobRunsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListJobRunsResponse 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.deploy.v1.ListJobRunsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListJobRunsResponse 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.deploy.v1.ListJobRunsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListJobRunsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.ListJobRunsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListJobRunsResponse 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.deploy.v1.ListJobRunsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListJobRunsResponse 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.deploy.v1.ListJobRunsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListJobRunsResponse 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.deploy.v1.ListJobRunsResponse 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; + } + /** + * + * + *
+   * ListJobRunsResponse is the response object returned by `ListJobRuns`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListJobRunsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.ListJobRunsResponse) + com.google.cloud.deploy.v1.ListJobRunsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListJobRunsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListJobRunsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListJobRunsResponse.class, + com.google.cloud.deploy.v1.ListJobRunsResponse.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.ListJobRunsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (jobRunsBuilder_ == null) { + jobRuns_ = java.util.Collections.emptyList(); + } else { + jobRuns_ = null; + jobRunsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListJobRunsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListJobRunsResponse getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.ListJobRunsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListJobRunsResponse build() { + com.google.cloud.deploy.v1.ListJobRunsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListJobRunsResponse buildPartial() { + com.google.cloud.deploy.v1.ListJobRunsResponse result = + new com.google.cloud.deploy.v1.ListJobRunsResponse(this); + int from_bitField0_ = bitField0_; + if (jobRunsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + jobRuns_ = java.util.Collections.unmodifiableList(jobRuns_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.jobRuns_ = jobRuns_; + } else { + result.jobRuns_ = jobRunsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + unreachable_ = unreachable_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.unreachable_ = unreachable_; + 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.deploy.v1.ListJobRunsResponse) { + return mergeFrom((com.google.cloud.deploy.v1.ListJobRunsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.ListJobRunsResponse other) { + if (other == com.google.cloud.deploy.v1.ListJobRunsResponse.getDefaultInstance()) return this; + if (jobRunsBuilder_ == null) { + if (!other.jobRuns_.isEmpty()) { + if (jobRuns_.isEmpty()) { + jobRuns_ = other.jobRuns_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureJobRunsIsMutable(); + jobRuns_.addAll(other.jobRuns_); + } + onChanged(); + } + } else { + if (!other.jobRuns_.isEmpty()) { + if (jobRunsBuilder_.isEmpty()) { + jobRunsBuilder_.dispose(); + jobRunsBuilder_ = null; + jobRuns_ = other.jobRuns_; + bitField0_ = (bitField0_ & ~0x00000001); + jobRunsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getJobRunsFieldBuilder() + : null; + } else { + jobRunsBuilder_.addAllMessages(other.jobRuns_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.deploy.v1.JobRun m = + input.readMessage( + com.google.cloud.deploy.v1.JobRun.parser(), extensionRegistry); + if (jobRunsBuilder_ == null) { + ensureJobRunsIsMutable(); + jobRuns_.add(m); + } else { + jobRunsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List jobRuns_ = + java.util.Collections.emptyList(); + + private void ensureJobRunsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + jobRuns_ = new java.util.ArrayList(jobRuns_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.JobRun, + com.google.cloud.deploy.v1.JobRun.Builder, + com.google.cloud.deploy.v1.JobRunOrBuilder> + jobRunsBuilder_; + + /** + * + * + *
+     * The `JobRun` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + public java.util.List getJobRunsList() { + if (jobRunsBuilder_ == null) { + return java.util.Collections.unmodifiableList(jobRuns_); + } else { + return jobRunsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The `JobRun` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + public int getJobRunsCount() { + if (jobRunsBuilder_ == null) { + return jobRuns_.size(); + } else { + return jobRunsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The `JobRun` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + public com.google.cloud.deploy.v1.JobRun getJobRuns(int index) { + if (jobRunsBuilder_ == null) { + return jobRuns_.get(index); + } else { + return jobRunsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The `JobRun` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + public Builder setJobRuns(int index, com.google.cloud.deploy.v1.JobRun value) { + if (jobRunsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobRunsIsMutable(); + jobRuns_.set(index, value); + onChanged(); + } else { + jobRunsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The `JobRun` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + public Builder setJobRuns( + int index, com.google.cloud.deploy.v1.JobRun.Builder builderForValue) { + if (jobRunsBuilder_ == null) { + ensureJobRunsIsMutable(); + jobRuns_.set(index, builderForValue.build()); + onChanged(); + } else { + jobRunsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `JobRun` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + public Builder addJobRuns(com.google.cloud.deploy.v1.JobRun value) { + if (jobRunsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobRunsIsMutable(); + jobRuns_.add(value); + onChanged(); + } else { + jobRunsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The `JobRun` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + public Builder addJobRuns(int index, com.google.cloud.deploy.v1.JobRun value) { + if (jobRunsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobRunsIsMutable(); + jobRuns_.add(index, value); + onChanged(); + } else { + jobRunsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The `JobRun` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + public Builder addJobRuns(com.google.cloud.deploy.v1.JobRun.Builder builderForValue) { + if (jobRunsBuilder_ == null) { + ensureJobRunsIsMutable(); + jobRuns_.add(builderForValue.build()); + onChanged(); + } else { + jobRunsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `JobRun` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + public Builder addJobRuns( + int index, com.google.cloud.deploy.v1.JobRun.Builder builderForValue) { + if (jobRunsBuilder_ == null) { + ensureJobRunsIsMutable(); + jobRuns_.add(index, builderForValue.build()); + onChanged(); + } else { + jobRunsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `JobRun` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + public Builder addAllJobRuns( + java.lang.Iterable values) { + if (jobRunsBuilder_ == null) { + ensureJobRunsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jobRuns_); + onChanged(); + } else { + jobRunsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The `JobRun` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + public Builder clearJobRuns() { + if (jobRunsBuilder_ == null) { + jobRuns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + jobRunsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The `JobRun` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + public Builder removeJobRuns(int index) { + if (jobRunsBuilder_ == null) { + ensureJobRunsIsMutable(); + jobRuns_.remove(index); + onChanged(); + } else { + jobRunsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The `JobRun` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + public com.google.cloud.deploy.v1.JobRun.Builder getJobRunsBuilder(int index) { + return getJobRunsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The `JobRun` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + public com.google.cloud.deploy.v1.JobRunOrBuilder getJobRunsOrBuilder(int index) { + if (jobRunsBuilder_ == null) { + return jobRuns_.get(index); + } else { + return jobRunsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The `JobRun` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + public java.util.List + getJobRunsOrBuilderList() { + if (jobRunsBuilder_ != null) { + return jobRunsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(jobRuns_); + } + } + /** + * + * + *
+     * The `JobRun` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + public com.google.cloud.deploy.v1.JobRun.Builder addJobRunsBuilder() { + return getJobRunsFieldBuilder() + .addBuilder(com.google.cloud.deploy.v1.JobRun.getDefaultInstance()); + } + /** + * + * + *
+     * The `JobRun` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + public com.google.cloud.deploy.v1.JobRun.Builder addJobRunsBuilder(int index) { + return getJobRunsFieldBuilder() + .addBuilder(index, com.google.cloud.deploy.v1.JobRun.getDefaultInstance()); + } + /** + * + * + *
+     * The `JobRun` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + public java.util.List getJobRunsBuilderList() { + return getJobRunsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.JobRun, + com.google.cloud.deploy.v1.JobRun.Builder, + com.google.cloud.deploy.v1.JobRunOrBuilder> + getJobRunsFieldBuilder() { + if (jobRunsBuilder_ == null) { + jobRunsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.JobRun, + com.google.cloud.deploy.v1.JobRun.Builder, + com.google.cloud.deploy.v1.JobRunOrBuilder>( + jobRuns_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + jobRuns_ = null; + } + return jobRunsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page. If
+     * this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page. If
+     * this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page. If
+     * this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page. If
+     * this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page. If
+     * this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unreachable_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUnreachableIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Locations that could not be reached
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_.getUnmodifiableView(); + } + /** + * + * + *
+     * Locations that could not be reached
+     * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + /** + * + * + *
+     * Locations that could not be reached
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached
+     * 
+ * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached
+     * 
+ * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached
+     * 
+ * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached
+     * 
+ * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + 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.deploy.v1.ListJobRunsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.ListJobRunsResponse) + private static final com.google.cloud.deploy.v1.ListJobRunsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.ListJobRunsResponse(); + } + + public static com.google.cloud.deploy.v1.ListJobRunsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListJobRunsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListJobRunsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListJobRunsResponseOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListJobRunsResponseOrBuilder.java new file mode 100644 index 0000000..0093094 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListJobRunsResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface ListJobRunsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.ListJobRunsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The `JobRun` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + java.util.List getJobRunsList(); + /** + * + * + *
+   * The `JobRun` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + com.google.cloud.deploy.v1.JobRun getJobRuns(int index); + /** + * + * + *
+   * The `JobRun` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + int getJobRunsCount(); + /** + * + * + *
+   * The `JobRun` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + java.util.List getJobRunsOrBuilderList(); + /** + * + * + *
+   * The `JobRun` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.JobRun job_runs = 1; + */ + com.google.cloud.deploy.v1.JobRunOrBuilder getJobRunsOrBuilder(int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page. If
+   * this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page. If
+   * this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached
+   * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + /** + * + * + *
+   * Locations that could not be reached
+   * 
+ * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + /** + * + * + *
+   * Locations that could not be reached
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + /** + * + * + *
+   * Locations that could not be reached
+   * 
+ * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesRequest.java index 34f23b4..82f0a4b 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesRequest.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListReleasesRequest( - 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; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_ListReleasesRequest_descriptor; @@ -399,7 +327,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -423,7 +351,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -444,7 +372,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -465,7 +393,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -594,17 +522,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.ListReleasesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -720,7 +641,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.ListReleasesRequest other) { orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -735,17 +656,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.ListReleasesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.ListReleasesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1293,7 +1258,18 @@ public ListReleasesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListReleasesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesResponse.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesResponse.java index c6ea9bd..a20dd16 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesResponse.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListReleasesResponse.java @@ -54,80 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListReleasesResponse( - 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)) { - releases_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - releases_.add( - input.readMessage( - com.google.cloud.deploy.v1.Release.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - releases_ = java.util.Collections.unmodifiableList(releases_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_ListReleasesResponse_descriptor; @@ -347,7 +273,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < unreachable_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -370,7 +296,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnreachableList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -389,7 +315,7 @@ public boolean equals(final java.lang.Object obj) { if (!getReleasesList().equals(other.getReleasesList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -410,7 +336,7 @@ public int hashCode() { hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; hash = (53 * hash) + getUnreachableList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -539,19 +465,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.ListReleasesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getReleasesFieldBuilder(); - } } @java.lang.Override @@ -559,10 +476,11 @@ public Builder clear() { super.clear(); if (releasesBuilder_ == null) { releases_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + releases_ = null; releasesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -701,7 +619,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.ListReleasesResponse other) } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -716,17 +634,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.ListReleasesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.deploy.v1.Release m = + input.readMessage( + com.google.cloud.deploy.v1.Release.parser(), extensionRegistry); + if (releasesBuilder_ == null) { + ensureReleasesIsMutable(); + releases_.add(m); + } else { + releasesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.ListReleasesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1391,7 +1349,18 @@ public ListReleasesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListReleasesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsRequest.java index f2fd5dd..363478b 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsRequest.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRolloutsRequest( - 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; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_ListRolloutsRequest_descriptor; @@ -399,7 +327,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -423,7 +351,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -444,7 +372,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -465,7 +393,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -594,17 +522,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.ListRolloutsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -720,7 +641,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.ListRolloutsRequest other) { orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -735,17 +656,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.ListRolloutsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.ListRolloutsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1293,7 +1258,18 @@ public ListRolloutsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRolloutsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsResponse.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsResponse.java index 262f54d..6a34df4 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsResponse.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListRolloutsResponse.java @@ -54,80 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRolloutsResponse( - 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)) { - rollouts_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - rollouts_.add( - input.readMessage( - com.google.cloud.deploy.v1.Rollout.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - rollouts_ = java.util.Collections.unmodifiableList(rollouts_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_ListRolloutsResponse_descriptor; @@ -347,7 +273,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < unreachable_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -370,7 +296,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnreachableList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -389,7 +315,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRolloutsList().equals(other.getRolloutsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -410,7 +336,7 @@ public int hashCode() { hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; hash = (53 * hash) + getUnreachableList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -539,19 +465,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.ListRolloutsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRolloutsFieldBuilder(); - } } @java.lang.Override @@ -559,10 +476,11 @@ public Builder clear() { super.clear(); if (rolloutsBuilder_ == null) { rollouts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + rollouts_ = null; rolloutsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -701,7 +619,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.ListRolloutsResponse other) } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -716,17 +634,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.ListRolloutsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.deploy.v1.Rollout m = + input.readMessage( + com.google.cloud.deploy.v1.Rollout.parser(), extensionRegistry); + if (rolloutsBuilder_ == null) { + ensureRolloutsIsMutable(); + rollouts_.add(m); + } else { + rolloutsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.ListRolloutsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1391,7 +1349,18 @@ public ListRolloutsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRolloutsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequest.java index 088d98d..f24a62e 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequest.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListTargetsRequest( - 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; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_ListTargetsRequest_descriptor; @@ -401,7 +329,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -425,7 +353,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -446,7 +374,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -467,7 +395,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -596,17 +524,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.ListTargetsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -722,7 +643,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.ListTargetsRequest other) { orderBy_ = other.orderBy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -737,17 +658,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.ListTargetsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.ListTargetsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1300,7 +1265,18 @@ public ListTargetsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListTargetsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsResponse.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsResponse.java index ae09239..bc0e9b1 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsResponse.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsResponse.java @@ -54,79 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListTargetsResponse( - 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)) { - targets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - targets_.add( - input.readMessage(com.google.cloud.deploy.v1.Target.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - unreachable_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - targets_ = java.util.Collections.unmodifiableList(targets_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_ListTargetsResponse_descriptor; @@ -346,7 +273,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < unreachable_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -369,7 +296,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getUnreachableList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -388,7 +315,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTargetsList().equals(other.getTargetsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -409,7 +336,7 @@ public int hashCode() { hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; hash = (53 * hash) + getUnreachableList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -538,19 +465,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.ListTargetsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTargetsFieldBuilder(); - } } @java.lang.Override @@ -558,10 +476,11 @@ public Builder clear() { super.clear(); if (targetsBuilder_ == null) { targets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + targets_ = null; targetsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -699,7 +618,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.ListTargetsResponse other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -714,17 +633,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.ListTargetsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.deploy.v1.Target m = + input.readMessage( + com.google.cloud.deploy.v1.Target.parser(), extensionRegistry); + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + targets_.add(m); + } else { + targetsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.ListTargetsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1389,7 +1348,18 @@ public ListTargetsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListTargetsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Metadata.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Metadata.java new file mode 100644 index 0000000..8a807c2 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Metadata.java @@ -0,0 +1,724 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Metadata includes information associated with a `Rollout`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Metadata} + */ +public final class Metadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.Metadata) + MetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use Metadata.newBuilder() to construct. + private Metadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Metadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Metadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Metadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Metadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Metadata.class, + com.google.cloud.deploy.v1.Metadata.Builder.class); + } + + public static final int CLOUD_RUN_FIELD_NUMBER = 1; + private com.google.cloud.deploy.v1.CloudRunMetadata cloudRun_; + /** + * + * + *
+   * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudRun field is set. + */ + @java.lang.Override + public boolean hasCloudRun() { + return cloudRun_ != null; + } + /** + * + * + *
+   * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudRun. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.CloudRunMetadata getCloudRun() { + return cloudRun_ == null + ? com.google.cloud.deploy.v1.CloudRunMetadata.getDefaultInstance() + : cloudRun_; + } + /** + * + * + *
+   * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.CloudRunMetadataOrBuilder getCloudRunOrBuilder() { + return getCloudRun(); + } + + 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 (cloudRun_ != null) { + output.writeMessage(1, getCloudRun()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cloudRun_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCloudRun()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.Metadata)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.Metadata other = (com.google.cloud.deploy.v1.Metadata) obj; + + if (hasCloudRun() != other.hasCloudRun()) return false; + if (hasCloudRun()) { + if (!getCloudRun().equals(other.getCloudRun())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCloudRun()) { + hash = (37 * hash) + CLOUD_RUN_FIELD_NUMBER; + hash = (53 * hash) + getCloudRun().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.Metadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Metadata 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.deploy.v1.Metadata parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Metadata 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.deploy.v1.Metadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Metadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.Metadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Metadata 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.deploy.v1.Metadata parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Metadata 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.deploy.v1.Metadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Metadata 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.deploy.v1.Metadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata includes information associated with a `Rollout`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Metadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.Metadata) + com.google.cloud.deploy.v1.MetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Metadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Metadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Metadata.class, + com.google.cloud.deploy.v1.Metadata.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.Metadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (cloudRunBuilder_ == null) { + cloudRun_ = null; + } else { + cloudRun_ = null; + cloudRunBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Metadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Metadata getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.Metadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Metadata build() { + com.google.cloud.deploy.v1.Metadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Metadata buildPartial() { + com.google.cloud.deploy.v1.Metadata result = new com.google.cloud.deploy.v1.Metadata(this); + if (cloudRunBuilder_ == null) { + result.cloudRun_ = cloudRun_; + } else { + result.cloudRun_ = cloudRunBuilder_.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.deploy.v1.Metadata) { + return mergeFrom((com.google.cloud.deploy.v1.Metadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.Metadata other) { + if (other == com.google.cloud.deploy.v1.Metadata.getDefaultInstance()) return this; + if (other.hasCloudRun()) { + mergeCloudRun(other.getCloudRun()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCloudRunFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private com.google.cloud.deploy.v1.CloudRunMetadata cloudRun_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.CloudRunMetadata, + com.google.cloud.deploy.v1.CloudRunMetadata.Builder, + com.google.cloud.deploy.v1.CloudRunMetadataOrBuilder> + cloudRunBuilder_; + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudRun field is set. + */ + public boolean hasCloudRun() { + return cloudRunBuilder_ != null || cloudRun_ != null; + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudRun. + */ + public com.google.cloud.deploy.v1.CloudRunMetadata getCloudRun() { + if (cloudRunBuilder_ == null) { + return cloudRun_ == null + ? com.google.cloud.deploy.v1.CloudRunMetadata.getDefaultInstance() + : cloudRun_; + } else { + return cloudRunBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCloudRun(com.google.cloud.deploy.v1.CloudRunMetadata value) { + if (cloudRunBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cloudRun_ = value; + onChanged(); + } else { + cloudRunBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCloudRun( + com.google.cloud.deploy.v1.CloudRunMetadata.Builder builderForValue) { + if (cloudRunBuilder_ == null) { + cloudRun_ = builderForValue.build(); + onChanged(); + } else { + cloudRunBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCloudRun(com.google.cloud.deploy.v1.CloudRunMetadata value) { + if (cloudRunBuilder_ == null) { + if (cloudRun_ != null) { + cloudRun_ = + com.google.cloud.deploy.v1.CloudRunMetadata.newBuilder(cloudRun_) + .mergeFrom(value) + .buildPartial(); + } else { + cloudRun_ = value; + } + onChanged(); + } else { + cloudRunBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCloudRun() { + if (cloudRunBuilder_ == null) { + cloudRun_ = null; + onChanged(); + } else { + cloudRun_ = null; + cloudRunBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.CloudRunMetadata.Builder getCloudRunBuilder() { + + onChanged(); + return getCloudRunFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.CloudRunMetadataOrBuilder getCloudRunOrBuilder() { + if (cloudRunBuilder_ != null) { + return cloudRunBuilder_.getMessageOrBuilder(); + } else { + return cloudRun_ == null + ? com.google.cloud.deploy.v1.CloudRunMetadata.getDefaultInstance() + : cloudRun_; + } + } + /** + * + * + *
+     * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.CloudRunMetadata, + com.google.cloud.deploy.v1.CloudRunMetadata.Builder, + com.google.cloud.deploy.v1.CloudRunMetadataOrBuilder> + getCloudRunFieldBuilder() { + if (cloudRunBuilder_ == null) { + cloudRunBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.CloudRunMetadata, + com.google.cloud.deploy.v1.CloudRunMetadata.Builder, + com.google.cloud.deploy.v1.CloudRunMetadataOrBuilder>( + getCloudRun(), getParentForChildren(), isClean()); + cloudRun_ = null; + } + return cloudRunBuilder_; + } + + @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.deploy.v1.Metadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.Metadata) + private static final com.google.cloud.deploy.v1.Metadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.Metadata(); + } + + public static com.google.cloud.deploy.v1.Metadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Metadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Metadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/MetadataOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/MetadataOrBuilder.java new file mode 100644 index 0000000..f9cd70c --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/MetadataOrBuilder.java @@ -0,0 +1,66 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface MetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.Metadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudRun field is set. + */ + boolean hasCloudRun(); + /** + * + * + *
+   * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudRun. + */ + com.google.cloud.deploy.v1.CloudRunMetadata getCloudRun(); + /** + * + * + *
+   * Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.CloudRunMetadata cloud_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.CloudRunMetadataOrBuilder getCloudRunOrBuilder(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/OperationMetadata.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/OperationMetadata.java index 2ea6b0e..d50dff3 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/OperationMetadata.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/OperationMetadata.java @@ -55,108 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OperationMetadata( - 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.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - target_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - verb_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - statusMessage_ = s; - break; - } - case 48: - { - requestedCancellation_ = input.readBool(); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - apiVersion_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_OperationMetadata_descriptor; @@ -522,7 +420,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, apiVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -552,7 +450,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, apiVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -581,7 +479,7 @@ public boolean equals(final java.lang.Object obj) { if (!getStatusMessage().equals(other.getStatusMessage())) return false; if (getRequestedCancellation() != other.getRequestedCancellation()) return false; if (!getApiVersion().equals(other.getApiVersion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -610,7 +508,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequestedCancellation()); hash = (37 * hash) + API_VERSION_FIELD_NUMBER; hash = (53 * hash) + getApiVersion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -739,17 +637,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.OperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -893,7 +784,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.OperationMetadata other) { apiVersion_ = other.apiVersion_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -908,17 +799,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.OperationMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + verb_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + statusMessage_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 48: + { + requestedCancellation_ = input.readBool(); + + break; + } // case 48 + case 58: + { + apiVersion_ = input.readStringRequireUtf8(); + + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.OperationMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1828,7 +1775,18 @@ public OperationMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Phase.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Phase.java new file mode 100644 index 0000000..29d7480 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Phase.java @@ -0,0 +1,1395 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Phase represents a collection of jobs that are logically grouped together
+ * for a `Rollout`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Phase} + */ +public final class Phase extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.Phase) + PhaseOrBuilder { + private static final long serialVersionUID = 0L; + // Use Phase.newBuilder() to construct. + private Phase(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Phase() { + id_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Phase(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Phase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Phase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Phase.class, com.google.cloud.deploy.v1.Phase.Builder.class); + } + + /** + * + * + *
+   * Valid states of a Phase.
+   * 
+ * + * Protobuf enum {@code google.cloud.deploy.v1.Phase.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The Phase has an unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The Phase is waiting for an earlier Phase(s) to complete.
+     * 
+ * + * PENDING = 1; + */ + PENDING(1), + /** + * + * + *
+     * The Phase is in progress.
+     * 
+ * + * IN_PROGRESS = 2; + */ + IN_PROGRESS(2), + /** + * + * + *
+     * The Phase has succeeded.
+     * 
+ * + * SUCCEEDED = 3; + */ + SUCCEEDED(3), + /** + * + * + *
+     * The Phase has failed.
+     * 
+ * + * FAILED = 4; + */ + FAILED(4), + /** + * + * + *
+     * The Phase was aborted.
+     * 
+ * + * ABORTED = 5; + */ + ABORTED(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The Phase has an unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The Phase is waiting for an earlier Phase(s) to complete.
+     * 
+ * + * PENDING = 1; + */ + public static final int PENDING_VALUE = 1; + /** + * + * + *
+     * The Phase is in progress.
+     * 
+ * + * IN_PROGRESS = 2; + */ + public static final int IN_PROGRESS_VALUE = 2; + /** + * + * + *
+     * The Phase has succeeded.
+     * 
+ * + * SUCCEEDED = 3; + */ + public static final int SUCCEEDED_VALUE = 3; + /** + * + * + *
+     * The Phase has failed.
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + /** + * + * + *
+     * The Phase was aborted.
+     * 
+ * + * ABORTED = 5; + */ + public static final int ABORTED_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return PENDING; + case 2: + return IN_PROGRESS; + case 3: + return SUCCEEDED; + case 4: + return FAILED; + case 5: + return ABORTED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.deploy.v1.Phase.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.deploy.v1.Phase.State) + } + + private int jobsCase_ = 0; + private java.lang.Object jobs_; + + public enum JobsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DEPLOYMENT_JOBS(4), + JOBS_NOT_SET(0); + private final int value; + + private JobsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static JobsCase valueOf(int value) { + return forNumber(value); + } + + public static JobsCase forNumber(int value) { + switch (value) { + case 4: + return DEPLOYMENT_JOBS; + case 0: + return JOBS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public JobsCase getJobsCase() { + return JobsCase.forNumber(jobsCase_); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + * + * + *
+   * Output only. The ID of the Phase.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The ID of the Phase.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_; + /** + * + * + *
+   * Output only. Current state of the Phase.
+   * 
+ * + * + * .google.cloud.deploy.v1.Phase.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. Current state of the Phase.
+   * 
+ * + * + * .google.cloud.deploy.v1.Phase.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Phase.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.Phase.State result = + com.google.cloud.deploy.v1.Phase.State.valueOf(state_); + return result == null ? com.google.cloud.deploy.v1.Phase.State.UNRECOGNIZED : result; + } + + public static final int DEPLOYMENT_JOBS_FIELD_NUMBER = 4; + /** + * + * + *
+   * Output only. Deployment job composition.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeploymentJobs deployment_jobs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deploymentJobs field is set. + */ + @java.lang.Override + public boolean hasDeploymentJobs() { + return jobsCase_ == 4; + } + /** + * + * + *
+   * Output only. Deployment job composition.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeploymentJobs deployment_jobs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deploymentJobs. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeploymentJobs getDeploymentJobs() { + if (jobsCase_ == 4) { + return (com.google.cloud.deploy.v1.DeploymentJobs) jobs_; + } + return com.google.cloud.deploy.v1.DeploymentJobs.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. Deployment job composition.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeploymentJobs deployment_jobs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeploymentJobsOrBuilder getDeploymentJobsOrBuilder() { + if (jobsCase_ == 4) { + return (com.google.cloud.deploy.v1.DeploymentJobs) jobs_; + } + return com.google.cloud.deploy.v1.DeploymentJobs.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (state_ != com.google.cloud.deploy.v1.Phase.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, state_); + } + if (jobsCase_ == 4) { + output.writeMessage(4, (com.google.cloud.deploy.v1.DeploymentJobs) jobs_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (state_ != com.google.cloud.deploy.v1.Phase.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); + } + if (jobsCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.deploy.v1.DeploymentJobs) jobs_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.Phase)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.Phase other = (com.google.cloud.deploy.v1.Phase) obj; + + if (!getId().equals(other.getId())) return false; + if (state_ != other.state_) return false; + if (!getJobsCase().equals(other.getJobsCase())) return false; + switch (jobsCase_) { + case 4: + if (!getDeploymentJobs().equals(other.getDeploymentJobs())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + switch (jobsCase_) { + case 4: + hash = (37 * hash) + DEPLOYMENT_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getDeploymentJobs().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.Phase parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Phase 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.deploy.v1.Phase parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Phase 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.deploy.v1.Phase parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Phase parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.Phase parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Phase 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.deploy.v1.Phase parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Phase 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.deploy.v1.Phase parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Phase 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.deploy.v1.Phase 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; + } + /** + * + * + *
+   * Phase represents a collection of jobs that are logically grouped together
+   * for a `Rollout`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Phase} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.Phase) + com.google.cloud.deploy.v1.PhaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Phase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Phase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Phase.class, + com.google.cloud.deploy.v1.Phase.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.Phase.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + id_ = ""; + + state_ = 0; + + if (deploymentJobsBuilder_ != null) { + deploymentJobsBuilder_.clear(); + } + jobsCase_ = 0; + jobs_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Phase_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Phase getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.Phase.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Phase build() { + com.google.cloud.deploy.v1.Phase result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Phase buildPartial() { + com.google.cloud.deploy.v1.Phase result = new com.google.cloud.deploy.v1.Phase(this); + result.id_ = id_; + result.state_ = state_; + if (jobsCase_ == 4) { + if (deploymentJobsBuilder_ == null) { + result.jobs_ = jobs_; + } else { + result.jobs_ = deploymentJobsBuilder_.build(); + } + } + result.jobsCase_ = jobsCase_; + 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.deploy.v1.Phase) { + return mergeFrom((com.google.cloud.deploy.v1.Phase) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.Phase other) { + if (other == com.google.cloud.deploy.v1.Phase.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + switch (other.getJobsCase()) { + case DEPLOYMENT_JOBS: + { + mergeDeploymentJobs(other.getDeploymentJobs()); + break; + } + case JOBS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 24: + { + state_ = input.readEnum(); + + break; + } // case 24 + case 34: + { + input.readMessage(getDeploymentJobsFieldBuilder().getBuilder(), extensionRegistry); + jobsCase_ = 4; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int jobsCase_ = 0; + private java.lang.Object jobs_; + + public JobsCase getJobsCase() { + return JobsCase.forNumber(jobsCase_); + } + + public Builder clearJobs() { + jobsCase_ = 0; + jobs_ = null; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * Output only. The ID of the Phase.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The ID of the Phase.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The ID of the Phase.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ID of the Phase.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ID of the Phase.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. Current state of the Phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.Phase.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. Current state of the Phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.Phase.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current state of the Phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.Phase.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Phase.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.Phase.State result = + com.google.cloud.deploy.v1.Phase.State.valueOf(state_); + return result == null ? com.google.cloud.deploy.v1.Phase.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Current state of the Phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.Phase.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.deploy.v1.Phase.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current state of the Phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.Phase.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeploymentJobs, + com.google.cloud.deploy.v1.DeploymentJobs.Builder, + com.google.cloud.deploy.v1.DeploymentJobsOrBuilder> + deploymentJobsBuilder_; + /** + * + * + *
+     * Output only. Deployment job composition.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeploymentJobs deployment_jobs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deploymentJobs field is set. + */ + @java.lang.Override + public boolean hasDeploymentJobs() { + return jobsCase_ == 4; + } + /** + * + * + *
+     * Output only. Deployment job composition.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeploymentJobs deployment_jobs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deploymentJobs. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeploymentJobs getDeploymentJobs() { + if (deploymentJobsBuilder_ == null) { + if (jobsCase_ == 4) { + return (com.google.cloud.deploy.v1.DeploymentJobs) jobs_; + } + return com.google.cloud.deploy.v1.DeploymentJobs.getDefaultInstance(); + } else { + if (jobsCase_ == 4) { + return deploymentJobsBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.DeploymentJobs.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Deployment job composition.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeploymentJobs deployment_jobs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeploymentJobs(com.google.cloud.deploy.v1.DeploymentJobs value) { + if (deploymentJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jobs_ = value; + onChanged(); + } else { + deploymentJobsBuilder_.setMessage(value); + } + jobsCase_ = 4; + return this; + } + /** + * + * + *
+     * Output only. Deployment job composition.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeploymentJobs deployment_jobs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeploymentJobs( + com.google.cloud.deploy.v1.DeploymentJobs.Builder builderForValue) { + if (deploymentJobsBuilder_ == null) { + jobs_ = builderForValue.build(); + onChanged(); + } else { + deploymentJobsBuilder_.setMessage(builderForValue.build()); + } + jobsCase_ = 4; + return this; + } + /** + * + * + *
+     * Output only. Deployment job composition.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeploymentJobs deployment_jobs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeploymentJobs(com.google.cloud.deploy.v1.DeploymentJobs value) { + if (deploymentJobsBuilder_ == null) { + if (jobsCase_ == 4 + && jobs_ != com.google.cloud.deploy.v1.DeploymentJobs.getDefaultInstance()) { + jobs_ = + com.google.cloud.deploy.v1.DeploymentJobs.newBuilder( + (com.google.cloud.deploy.v1.DeploymentJobs) jobs_) + .mergeFrom(value) + .buildPartial(); + } else { + jobs_ = value; + } + onChanged(); + } else { + if (jobsCase_ == 4) { + deploymentJobsBuilder_.mergeFrom(value); + } else { + deploymentJobsBuilder_.setMessage(value); + } + } + jobsCase_ = 4; + return this; + } + /** + * + * + *
+     * Output only. Deployment job composition.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeploymentJobs deployment_jobs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeploymentJobs() { + if (deploymentJobsBuilder_ == null) { + if (jobsCase_ == 4) { + jobsCase_ = 0; + jobs_ = null; + onChanged(); + } + } else { + if (jobsCase_ == 4) { + jobsCase_ = 0; + jobs_ = null; + } + deploymentJobsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Deployment job composition.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeploymentJobs deployment_jobs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.DeploymentJobs.Builder getDeploymentJobsBuilder() { + return getDeploymentJobsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Deployment job composition.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeploymentJobs deployment_jobs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.DeploymentJobsOrBuilder getDeploymentJobsOrBuilder() { + if ((jobsCase_ == 4) && (deploymentJobsBuilder_ != null)) { + return deploymentJobsBuilder_.getMessageOrBuilder(); + } else { + if (jobsCase_ == 4) { + return (com.google.cloud.deploy.v1.DeploymentJobs) jobs_; + } + return com.google.cloud.deploy.v1.DeploymentJobs.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Deployment job composition.
+     * 
+ * + * + * .google.cloud.deploy.v1.DeploymentJobs deployment_jobs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeploymentJobs, + com.google.cloud.deploy.v1.DeploymentJobs.Builder, + com.google.cloud.deploy.v1.DeploymentJobsOrBuilder> + getDeploymentJobsFieldBuilder() { + if (deploymentJobsBuilder_ == null) { + if (!(jobsCase_ == 4)) { + jobs_ = com.google.cloud.deploy.v1.DeploymentJobs.getDefaultInstance(); + } + deploymentJobsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.DeploymentJobs, + com.google.cloud.deploy.v1.DeploymentJobs.Builder, + com.google.cloud.deploy.v1.DeploymentJobsOrBuilder>( + (com.google.cloud.deploy.v1.DeploymentJobs) jobs_, + getParentForChildren(), + isClean()); + jobs_ = null; + } + jobsCase_ = 4; + onChanged(); + ; + return deploymentJobsBuilder_; + } + + @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.deploy.v1.Phase) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.Phase) + private static final com.google.cloud.deploy.v1.Phase DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.Phase(); + } + + public static com.google.cloud.deploy.v1.Phase getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Phase parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Phase getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PhaseOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PhaseOrBuilder.java new file mode 100644 index 0000000..80f03e3 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PhaseOrBuilder.java @@ -0,0 +1,122 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface PhaseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.Phase) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The ID of the Phase.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Output only. The ID of the Phase.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Output only. Current state of the Phase.
+   * 
+ * + * + * .google.cloud.deploy.v1.Phase.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. Current state of the Phase.
+   * 
+ * + * + * .google.cloud.deploy.v1.Phase.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.deploy.v1.Phase.State getState(); + + /** + * + * + *
+   * Output only. Deployment job composition.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeploymentJobs deployment_jobs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deploymentJobs field is set. + */ + boolean hasDeploymentJobs(); + /** + * + * + *
+   * Output only. Deployment job composition.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeploymentJobs deployment_jobs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deploymentJobs. + */ + com.google.cloud.deploy.v1.DeploymentJobs getDeploymentJobs(); + /** + * + * + *
+   * Output only. Deployment job composition.
+   * 
+ * + * + * .google.cloud.deploy.v1.DeploymentJobs deployment_jobs = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.DeploymentJobsOrBuilder getDeploymentJobsOrBuilder(); + + public com.google.cloud.deploy.v1.Phase.JobsCase getJobsCase(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineCondition.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineCondition.java index d78ccb0..ea672ae 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineCondition.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineCondition.java @@ -50,79 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PipelineCondition( - 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.deploy.v1.PipelineReadyCondition.Builder subBuilder = null; - if (pipelineReadyCondition_ != null) { - subBuilder = pipelineReadyCondition_.toBuilder(); - } - pipelineReadyCondition_ = - input.readMessage( - com.google.cloud.deploy.v1.PipelineReadyCondition.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(pipelineReadyCondition_); - pipelineReadyCondition_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.deploy.v1.TargetsPresentCondition.Builder subBuilder = null; - if (targetsPresentCondition_ != null) { - subBuilder = targetsPresentCondition_.toBuilder(); - } - targetsPresentCondition_ = - input.readMessage( - com.google.cloud.deploy.v1.TargetsPresentCondition.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetsPresentCondition_); - targetsPresentCondition_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_PipelineCondition_descriptor; @@ -256,7 +183,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetsPresentCondition_ != null) { output.writeMessage(3, getTargetsPresentCondition()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -273,7 +200,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTargetsPresentCondition()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -297,7 +224,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetsPresentCondition()) { if (!getTargetsPresentCondition().equals(other.getTargetsPresentCondition())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -316,7 +243,7 @@ public int hashCode() { hash = (37 * hash) + TARGETS_PRESENT_CONDITION_FIELD_NUMBER; hash = (53 * hash) + getTargetsPresentCondition().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -445,17 +372,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.PipelineCondition.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -565,7 +485,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.PipelineCondition other) { if (other.hasTargetsPresentCondition()) { mergeTargetsPresentCondition(other.getTargetsPresentCondition()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -580,17 +500,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.PipelineCondition parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getPipelineReadyConditionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 26: + { + input.readMessage( + getTargetsPresentConditionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.PipelineCondition) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1007,7 +955,18 @@ public PipelineCondition parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PipelineCondition(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineReadyCondition.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineReadyCondition.java index e3dc957..f1e8ddc 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineReadyCondition.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PipelineReadyCondition.java @@ -51,65 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PipelineReadyCondition( - 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 24: - { - status_ = input.readBool(); - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_PipelineReadyCondition_descriptor; @@ -212,7 +153,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateTime_ != null) { output.writeMessage(4, getUpdateTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -227,7 +168,7 @@ public int getSerializedSize() { if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -248,7 +189,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateTime()) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -265,7 +206,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getUpdateTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -395,17 +336,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.PipelineReadyCondition.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -508,7 +442,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.PipelineReadyCondition other if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -523,18 +457,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.PipelineReadyCondition parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 24: + { + status_ = input.readBool(); + + break; + } // case 24 + case 34: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.deploy.v1.PipelineReadyCondition) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -814,7 +773,18 @@ public PipelineReadyCondition parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PipelineReadyCondition(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PrivatePool.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PrivatePool.java index 71dd13a..a713628 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PrivatePool.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PrivatePool.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PrivatePool( - 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(); - - workerPool_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - serviceAccount_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - artifactStorage_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_PrivatePool_descriptor; @@ -315,7 +255,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactStorage_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, artifactStorage_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -333,7 +273,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactStorage_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, artifactStorage_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -351,7 +291,7 @@ public boolean equals(final java.lang.Object obj) { if (!getWorkerPool().equals(other.getWorkerPool())) return false; if (!getServiceAccount().equals(other.getServiceAccount())) return false; if (!getArtifactStorage().equals(other.getArtifactStorage())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -368,7 +308,7 @@ public int hashCode() { hash = (53 * hash) + getServiceAccount().hashCode(); hash = (37 * hash) + ARTIFACT_STORAGE_FIELD_NUMBER; hash = (53 * hash) + getArtifactStorage().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -497,17 +437,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.PrivatePool.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -610,7 +543,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.PrivatePool other) { artifactStorage_ = other.artifactStorage_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -625,17 +558,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.PrivatePool parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + workerPool_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + serviceAccount_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + artifactStorage_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.PrivatePool) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1029,7 +994,18 @@ public PrivatePool parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PrivatePool(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Release.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Release.java index 872d6a4..206aaa6 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Release.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Release.java @@ -63,257 +63,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Release( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - uid_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - annotations_ = - com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry annotations__ = - input.readMessage( - AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 50: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (renderStartTime_ != null) { - subBuilder = renderStartTime_.toBuilder(); - } - renderStartTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(renderStartTime_); - renderStartTime_ = subBuilder.buildPartial(); - } - - break; - } - case 66: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (renderEndTime_ != null) { - subBuilder = renderEndTime_.toBuilder(); - } - renderEndTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(renderEndTime_); - renderEndTime_ = subBuilder.buildPartial(); - } - - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - - skaffoldConfigPath_ = s; - break; - } - case 82: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - buildArtifacts_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - buildArtifacts_.add( - input.readMessage( - com.google.cloud.deploy.v1.BuildArtifact.parser(), extensionRegistry)); - break; - } - case 90: - { - com.google.cloud.deploy.v1.DeliveryPipeline.Builder subBuilder = null; - if (deliveryPipelineSnapshot_ != null) { - subBuilder = deliveryPipelineSnapshot_.toBuilder(); - } - deliveryPipelineSnapshot_ = - input.readMessage( - com.google.cloud.deploy.v1.DeliveryPipeline.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deliveryPipelineSnapshot_); - deliveryPipelineSnapshot_ = subBuilder.buildPartial(); - } - - break; - } - case 98: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - targetSnapshots_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - targetSnapshots_.add( - input.readMessage(com.google.cloud.deploy.v1.Target.parser(), extensionRegistry)); - break; - } - case 104: - { - int rawValue = input.readEnum(); - - renderState_ = rawValue; - break; - } - case 130: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 138: - { - java.lang.String s = input.readStringRequireUtf8(); - - skaffoldConfigUri_ = s; - break; - } - case 154: - { - java.lang.String s = input.readStringRequireUtf8(); - - skaffoldVersion_ = s; - break; - } - case 162: - { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - targetArtifacts_ = - com.google.protobuf.MapField.newMapField( - TargetArtifactsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000010; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.deploy.v1.TargetArtifact> - targetArtifacts__ = - input.readMessage( - TargetArtifactsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - targetArtifacts_ - .getMutableMap() - .put(targetArtifacts__.getKey(), targetArtifacts__.getValue()); - break; - } - case 178: - { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - targetRenders_ = - com.google.protobuf.MapField.newMapField( - TargetRendersDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000020; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.deploy.v1.Release.TargetRender> - targetRenders__ = - input.readMessage( - TargetRendersDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - targetRenders_ - .getMutableMap() - .put(targetRenders__.getKey(), targetRenders__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) != 0)) { - buildArtifacts_ = java.util.Collections.unmodifiableList(buildArtifacts_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - targetSnapshots_ = java.util.Collections.unmodifiableList(targetSnapshots_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_Release_descriptor; @@ -622,6 +371,31 @@ public interface TargetRenderOrBuilder * @return The failureCause. */ com.google.cloud.deploy.v1.Release.TargetRender.FailureCause getFailureCause(); + + /** + * + * + *
+     * Output only. Additional information about the render failure, if available.
+     * 
+ * + * string failure_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failureMessage. + */ + java.lang.String getFailureMessage(); + /** + * + * + *
+     * Output only. Additional information about the render failure, if available.
+     * 
+ * + * string failure_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for failureMessage. + */ + com.google.protobuf.ByteString getFailureMessageBytes(); } /** * @@ -646,6 +420,7 @@ private TargetRender() { renderingBuild_ = ""; renderingState_ = 0; failureCause_ = 0; + failureMessage_ = ""; } @java.lang.Override @@ -659,66 +434,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetRender( - 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(); - - renderingBuild_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - renderingState_ = rawValue; - break; - } - case 32: - { - int rawValue = input.readEnum(); - - failureCause_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_Release_TargetRender_descriptor; @@ -943,7 +658,7 @@ public enum FailureCause implements com.google.protobuf.ProtocolMessageEnum { * *
        * Cloud Build is not available, either because it is not enabled or
-       * because Cloud Deploy has insufficient permissions. See [required
+       * because Google Cloud Deploy has insufficient permissions. See [required
        * permission](/deploy/docs/cloud-deploy-service-account#required_permissions).
        * 
* @@ -979,7 +694,7 @@ public enum FailureCause implements com.google.protobuf.ProtocolMessageEnum { * *
        * Cloud Build is not available, either because it is not enabled or
-       * because Cloud Deploy has insufficient permissions. See [required
+       * because Google Cloud Deploy has insufficient permissions. See [required
        * permission](/deploy/docs/cloud-deploy-service-account#required_permissions).
        * 
* @@ -1227,6 +942,55 @@ public com.google.cloud.deploy.v1.Release.TargetRender.FailureCause getFailureCa : result; } + public static final int FAILURE_MESSAGE_FIELD_NUMBER = 5; + private volatile java.lang.Object failureMessage_; + /** + * + * + *
+     * Output only. Additional information about the render failure, if available.
+     * 
+ * + * string failure_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failureMessage. + */ + @java.lang.Override + public java.lang.String getFailureMessage() { + java.lang.Object ref = failureMessage_; + 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(); + failureMessage_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. Additional information about the render failure, if available.
+     * 
+ * + * string failure_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for failureMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFailureMessageBytes() { + java.lang.Object ref = failureMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + failureMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1255,7 +1019,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(4, failureCause_); } - unknownFields.writeTo(output); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(failureMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, failureMessage_); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1278,7 +1045,10 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, failureCause_); } - size += unknownFields.getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(failureMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, failureMessage_); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1297,7 +1067,8 @@ public boolean equals(final java.lang.Object obj) { if (!getRenderingBuild().equals(other.getRenderingBuild())) return false; if (renderingState_ != other.renderingState_) return false; if (failureCause_ != other.failureCause_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getFailureMessage().equals(other.getFailureMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1314,7 +1085,9 @@ public int hashCode() { hash = (53 * hash) + renderingState_; hash = (37 * hash) + FAILURE_CAUSE_FIELD_NUMBER; hash = (53 * hash) + failureCause_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (37 * hash) + FAILURE_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getFailureMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1445,17 +1218,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.Release.TargetRender.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1467,6 +1233,8 @@ public Builder clear() { failureCause_ = 0; + failureMessage_ = ""; + return this; } @@ -1497,6 +1265,7 @@ public com.google.cloud.deploy.v1.Release.TargetRender buildPartial() { result.renderingBuild_ = renderingBuild_; result.renderingState_ = renderingState_; result.failureCause_ = failureCause_; + result.failureMessage_ = failureMessage_; onBuilt(); return result; } @@ -1559,7 +1328,11 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.Release.TargetRender other) if (other.failureCause_ != 0) { setFailureCauseValue(other.getFailureCauseValue()); } - this.mergeUnknownFields(other.unknownFields); + if (!other.getFailureMessage().isEmpty()) { + failureMessage_ = other.failureMessage_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1574,18 +1347,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.Release.TargetRender parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + renderingBuild_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + renderingState_ = input.readEnum(); + + break; + } // case 16 + case 32: + { + failureCause_ = input.readEnum(); + + break; + } // case 32 + case 42: + { + failureMessage_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.deploy.v1.Release.TargetRender) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1929,6 +1739,112 @@ public Builder clearFailureCause() { return this; } + private java.lang.Object failureMessage_ = ""; + /** + * + * + *
+       * Output only. Additional information about the render failure, if available.
+       * 
+ * + * string failure_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failureMessage. + */ + public java.lang.String getFailureMessage() { + java.lang.Object ref = failureMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + failureMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. Additional information about the render failure, if available.
+       * 
+ * + * string failure_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for failureMessage. + */ + public com.google.protobuf.ByteString getFailureMessageBytes() { + java.lang.Object ref = failureMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + failureMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. Additional information about the render failure, if available.
+       * 
+ * + * string failure_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The failureMessage to set. + * @return This builder for chaining. + */ + public Builder setFailureMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + failureMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Additional information about the render failure, if available.
+       * 
+ * + * string failure_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearFailureMessage() { + + failureMessage_ = getDefaultInstance().getFailureMessage(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Additional information about the render failure, if available.
+       * 
+ * + * string failure_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for failureMessage to set. + * @return This builder for chaining. + */ + public Builder setFailureMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + failureMessage_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -1962,7 +1878,19 @@ public TargetRender parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetRender(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2378,6 +2306,24 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { return map.get(key); } + public static final int ABANDONED_FIELD_NUMBER = 23; + private boolean abandoned_; + /** + * + * + *
+   * Output only. Indicates whether this is an abandoned release.
+   * 
+ * + * bool abandoned = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The abandoned. + */ + @java.lang.Override + public boolean getAbandoned() { + return abandoned_; + } + public static final int CREATE_TIME_FIELD_NUMBER = 6; private com.google.protobuf.Timestamp createTime_; /** @@ -3291,7 +3237,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output, internalGetTargetArtifacts(), TargetArtifactsDefaultEntryHolder.defaultEntry, 20); com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetTargetRenders(), TargetRendersDefaultEntryHolder.defaultEntry, 22); - unknownFields.writeTo(output); + if (abandoned_ != false) { + output.writeBool(23, abandoned_); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3388,7 +3337,10 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, targetRenders__); } - size += unknownFields.getSerializedSize(); + if (abandoned_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(23, abandoned_); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3408,6 +3360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDescription().equals(other.getDescription())) return false; if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (getAbandoned() != other.getAbandoned()) return false; if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { if (!getCreateTime().equals(other.getCreateTime())) return false; @@ -3433,7 +3386,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSkaffoldVersion().equals(other.getSkaffoldVersion())) return false; if (!internalGetTargetArtifacts().equals(other.internalGetTargetArtifacts())) return false; if (!internalGetTargetRenders().equals(other.internalGetTargetRenders())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3458,6 +3411,8 @@ public int hashCode() { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } + hash = (37 * hash) + ABANDONED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAbandoned()); if (hasCreateTime()) { hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreateTime().hashCode(); @@ -3500,7 +3455,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_RENDERS_FIELD_NUMBER; hash = (53 * hash) + internalGetTargetRenders().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3662,20 +3617,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.deploy.v1.Release.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getBuildArtifactsFieldBuilder(); - getTargetSnapshotsFieldBuilder(); - } } @java.lang.Override @@ -3689,6 +3634,8 @@ public Builder clear() { internalGetMutableAnnotations().clear(); internalGetMutableLabels().clear(); + abandoned_ = false; + if (createTimeBuilder_ == null) { createTime_ = null; } else { @@ -3713,10 +3660,11 @@ public Builder clear() { if (buildArtifactsBuilder_ == null) { buildArtifacts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + buildArtifacts_ = null; buildArtifactsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); if (deliveryPipelineSnapshotBuilder_ == null) { deliveryPipelineSnapshot_ = null; } else { @@ -3725,10 +3673,11 @@ public Builder clear() { } if (targetSnapshotsBuilder_ == null) { targetSnapshots_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + targetSnapshots_ = null; targetSnapshotsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); renderState_ = 0; etag_ = ""; @@ -3771,6 +3720,7 @@ public com.google.cloud.deploy.v1.Release buildPartial() { result.annotations_.makeImmutable(); result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); + result.abandoned_ = abandoned_; if (createTimeBuilder_ == null) { result.createTime_ = createTime_; } else { @@ -3881,6 +3831,9 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.Release other) { } internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + if (other.getAbandoned() != false) { + setAbandoned(other.getAbandoned()); + } if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } @@ -3968,7 +3921,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.Release other) { } internalGetMutableTargetArtifacts().mergeFrom(other.internalGetTargetArtifacts()); internalGetMutableTargetRenders().mergeFrom(other.internalGetTargetRenders()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3983,17 +3936,184 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.Release parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 42 + case 50: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + input.readMessage(getRenderStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 66: + { + input.readMessage(getRenderEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 + case 74: + { + skaffoldConfigPath_ = input.readStringRequireUtf8(); + + break; + } // case 74 + case 82: + { + com.google.cloud.deploy.v1.BuildArtifact m = + input.readMessage( + com.google.cloud.deploy.v1.BuildArtifact.parser(), extensionRegistry); + if (buildArtifactsBuilder_ == null) { + ensureBuildArtifactsIsMutable(); + buildArtifacts_.add(m); + } else { + buildArtifactsBuilder_.addMessage(m); + } + break; + } // case 82 + case 90: + { + input.readMessage( + getDeliveryPipelineSnapshotFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 90 + case 98: + { + com.google.cloud.deploy.v1.Target m = + input.readMessage( + com.google.cloud.deploy.v1.Target.parser(), extensionRegistry); + if (targetSnapshotsBuilder_ == null) { + ensureTargetSnapshotsIsMutable(); + targetSnapshots_.add(m); + } else { + targetSnapshotsBuilder_.addMessage(m); + } + break; + } // case 98 + case 104: + { + renderState_ = input.readEnum(); + + break; + } // case 104 + case 130: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 130 + case 138: + { + skaffoldConfigUri_ = input.readStringRequireUtf8(); + + break; + } // case 138 + case 154: + { + skaffoldVersion_ = input.readStringRequireUtf8(); + + break; + } // case 154 + case 162: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.deploy.v1.TargetArtifact> + targetArtifacts__ = + input.readMessage( + TargetArtifactsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableTargetArtifacts() + .getMutableMap() + .put(targetArtifacts__.getKey(), targetArtifacts__.getValue()); + break; + } // case 162 + case 178: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.deploy.v1.Release.TargetRender> + targetRenders__ = + input.readMessage( + TargetRendersDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableTargetRenders() + .getMutableMap() + .put(targetRenders__.getKey(), targetRenders__.getValue()); + break; + } // case 178 + case 184: + { + abandoned_ = input.readBool(); + + break; + } // case 184 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.Release) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4730,6 +4850,58 @@ public Builder putAllLabels(java.util.Map va return this; } + private boolean abandoned_; + /** + * + * + *
+     * Output only. Indicates whether this is an abandoned release.
+     * 
+ * + * bool abandoned = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The abandoned. + */ + @java.lang.Override + public boolean getAbandoned() { + return abandoned_; + } + /** + * + * + *
+     * Output only. Indicates whether this is an abandoned release.
+     * 
+ * + * bool abandoned = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The abandoned to set. + * @return This builder for chaining. + */ + public Builder setAbandoned(boolean value) { + + abandoned_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Indicates whether this is an abandoned release.
+     * 
+ * + * bool abandoned = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAbandoned() { + + abandoned_ = false; + onChanged(); + return this; + } + private com.google.protobuf.Timestamp createTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, @@ -7251,7 +7423,18 @@ public Release parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Release(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseNotificationEvent.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseNotificationEvent.java index 83256d6..f976fa1 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseNotificationEvent.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseNotificationEvent.java @@ -56,66 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReleaseNotificationEvent( - 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(); - - message_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - release_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.ReleaseNotificationPayloadProto .internal_static_google_cloud_deploy_v1_ReleaseNotificationEvent_descriptor; @@ -287,7 +227,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (type_ != com.google.cloud.deploy.v1.Type.TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(3, type_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -305,7 +245,7 @@ public int getSerializedSize() { if (type_ != com.google.cloud.deploy.v1.Type.TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -324,7 +264,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMessage().equals(other.getMessage())) return false; if (!getRelease().equals(other.getRelease())) return false; if (type_ != other.type_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -341,7 +281,7 @@ public int hashCode() { hash = (53 * hash) + getRelease().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -472,17 +412,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.ReleaseNotificationEvent.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -585,7 +518,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.ReleaseNotificationEvent oth if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -600,18 +533,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.ReleaseNotificationEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + message_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + release_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + type_ = input.readEnum(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.deploy.v1.ReleaseNotificationEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -949,7 +913,18 @@ public ReleaseNotificationEvent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReleaseNotificationEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseOrBuilder.java index f351bf0..188e80b 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseOrBuilder.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseOrBuilder.java @@ -280,6 +280,19 @@ java.lang.String getLabelsOrDefault( */ java.lang.String getLabelsOrThrow(java.lang.String key); + /** + * + * + *
+   * Output only. Indicates whether this is an abandoned release.
+   * 
+ * + * bool abandoned = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The abandoned. + */ + boolean getAbandoned(); + /** * * diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseRenderEvent.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseRenderEvent.java index 4d6a314..18126f5 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseRenderEvent.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseRenderEvent.java @@ -54,59 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReleaseRenderEvent( - 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(); - - message_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - release_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.ReleaseRenderPayloadProto .internal_static_google_cloud_deploy_v1_ReleaseRenderEvent_descriptor; @@ -242,7 +189,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(release_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, release_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -257,7 +204,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(release_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, release_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -275,7 +222,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMessage().equals(other.getMessage())) return false; if (!getRelease().equals(other.getRelease())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -290,7 +237,7 @@ public int hashCode() { hash = (53 * hash) + getMessage().hashCode(); hash = (37 * hash) + RELEASE_FIELD_NUMBER; hash = (53 * hash) + getRelease().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -420,17 +367,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.ReleaseRenderEvent.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -526,7 +466,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.ReleaseRenderEvent other) { release_ = other.release_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -541,17 +481,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.ReleaseRenderEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + message_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + release_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.ReleaseRenderEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -804,7 +770,18 @@ public ReleaseRenderEvent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReleaseRenderEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobRequest.java new file mode 100644 index 0000000..4943b46 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobRequest.java @@ -0,0 +1,998 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * RetryJobRequest is the request object used by `RetryJob`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RetryJobRequest} + */ +public final class RetryJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.RetryJobRequest) + RetryJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RetryJobRequest.newBuilder() to construct. + private RetryJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RetryJobRequest() { + rollout_ = ""; + phaseId_ = ""; + jobId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RetryJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RetryJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RetryJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RetryJobRequest.class, + com.google.cloud.deploy.v1.RetryJobRequest.Builder.class); + } + + public static final int ROLLOUT_FIELD_NUMBER = 1; + private volatile java.lang.Object rollout_; + /** + * + * + *
+   * Required. Name of the Rollout. Format is
+   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/{release}/rollouts/{rollout}.
+   * 
+ * + * + * string rollout = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The rollout. + */ + @java.lang.Override + public java.lang.String getRollout() { + java.lang.Object ref = rollout_; + 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(); + rollout_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the Rollout. Format is
+   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/{release}/rollouts/{rollout}.
+   * 
+ * + * + * string rollout = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for rollout. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRolloutBytes() { + java.lang.Object ref = rollout_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rollout_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PHASE_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object phaseId_; + /** + * + * + *
+   * Required. The phase ID the Job to retry belongs to.
+   * 
+ * + * string phase_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The phaseId. + */ + @java.lang.Override + public java.lang.String getPhaseId() { + java.lang.Object ref = phaseId_; + 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(); + phaseId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The phase ID the Job to retry belongs to.
+   * 
+ * + * string phase_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for phaseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPhaseIdBytes() { + java.lang.Object ref = phaseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + phaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOB_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object jobId_; + /** + * + * + *
+   * Required. The job ID for the Job to retry.
+   * 
+ * + * string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The jobId. + */ + @java.lang.Override + public java.lang.String getJobId() { + java.lang.Object ref = jobId_; + 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(); + jobId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The job ID for the Job to retry.
+   * 
+ * + * string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for jobId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJobIdBytes() { + java.lang.Object ref = jobId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rollout_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, rollout_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(phaseId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, phaseId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, jobId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rollout_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, rollout_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(phaseId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, phaseId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, jobId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.RetryJobRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.RetryJobRequest other = + (com.google.cloud.deploy.v1.RetryJobRequest) obj; + + if (!getRollout().equals(other.getRollout())) return false; + if (!getPhaseId().equals(other.getPhaseId())) return false; + if (!getJobId().equals(other.getJobId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ROLLOUT_FIELD_NUMBER; + hash = (53 * hash) + getRollout().hashCode(); + hash = (37 * hash) + PHASE_ID_FIELD_NUMBER; + hash = (53 * hash) + getPhaseId().hashCode(); + hash = (37 * hash) + JOB_ID_FIELD_NUMBER; + hash = (53 * hash) + getJobId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.RetryJobRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RetryJobRequest 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.deploy.v1.RetryJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RetryJobRequest 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.deploy.v1.RetryJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RetryJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.RetryJobRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RetryJobRequest 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.deploy.v1.RetryJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RetryJobRequest 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.deploy.v1.RetryJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RetryJobRequest 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.deploy.v1.RetryJobRequest 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; + } + /** + * + * + *
+   * RetryJobRequest is the request object used by `RetryJob`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RetryJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.RetryJobRequest) + com.google.cloud.deploy.v1.RetryJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RetryJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RetryJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RetryJobRequest.class, + com.google.cloud.deploy.v1.RetryJobRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.RetryJobRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + rollout_ = ""; + + phaseId_ = ""; + + jobId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RetryJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RetryJobRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.RetryJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RetryJobRequest build() { + com.google.cloud.deploy.v1.RetryJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RetryJobRequest buildPartial() { + com.google.cloud.deploy.v1.RetryJobRequest result = + new com.google.cloud.deploy.v1.RetryJobRequest(this); + result.rollout_ = rollout_; + result.phaseId_ = phaseId_; + result.jobId_ = jobId_; + 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.deploy.v1.RetryJobRequest) { + return mergeFrom((com.google.cloud.deploy.v1.RetryJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.RetryJobRequest other) { + if (other == com.google.cloud.deploy.v1.RetryJobRequest.getDefaultInstance()) return this; + if (!other.getRollout().isEmpty()) { + rollout_ = other.rollout_; + onChanged(); + } + if (!other.getPhaseId().isEmpty()) { + phaseId_ = other.phaseId_; + onChanged(); + } + if (!other.getJobId().isEmpty()) { + jobId_ = other.jobId_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + rollout_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + phaseId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + jobId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object rollout_ = ""; + /** + * + * + *
+     * Required. Name of the Rollout. Format is
+     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}/rollouts/{rollout}.
+     * 
+ * + * + * string rollout = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The rollout. + */ + public java.lang.String getRollout() { + java.lang.Object ref = rollout_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rollout_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the Rollout. Format is
+     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}/rollouts/{rollout}.
+     * 
+ * + * + * string rollout = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for rollout. + */ + public com.google.protobuf.ByteString getRolloutBytes() { + java.lang.Object ref = rollout_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rollout_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the Rollout. Format is
+     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}/rollouts/{rollout}.
+     * 
+ * + * + * string rollout = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The rollout to set. + * @return This builder for chaining. + */ + public Builder setRollout(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + rollout_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the Rollout. Format is
+     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}/rollouts/{rollout}.
+     * 
+ * + * + * string rollout = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRollout() { + + rollout_ = getDefaultInstance().getRollout(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the Rollout. Format is
+     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+     * releases/{release}/rollouts/{rollout}.
+     * 
+ * + * + * string rollout = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for rollout to set. + * @return This builder for chaining. + */ + public Builder setRolloutBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + rollout_ = value; + onChanged(); + return this; + } + + private java.lang.Object phaseId_ = ""; + /** + * + * + *
+     * Required. The phase ID the Job to retry belongs to.
+     * 
+ * + * string phase_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The phaseId. + */ + public java.lang.String getPhaseId() { + java.lang.Object ref = phaseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phaseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The phase ID the Job to retry belongs to.
+     * 
+ * + * string phase_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for phaseId. + */ + public com.google.protobuf.ByteString getPhaseIdBytes() { + java.lang.Object ref = phaseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + phaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The phase ID the Job to retry belongs to.
+     * 
+ * + * string phase_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The phaseId to set. + * @return This builder for chaining. + */ + public Builder setPhaseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + phaseId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The phase ID the Job to retry belongs to.
+     * 
+ * + * string phase_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPhaseId() { + + phaseId_ = getDefaultInstance().getPhaseId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The phase ID the Job to retry belongs to.
+     * 
+ * + * string phase_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for phaseId to set. + * @return This builder for chaining. + */ + public Builder setPhaseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + phaseId_ = value; + onChanged(); + return this; + } + + private java.lang.Object jobId_ = ""; + /** + * + * + *
+     * Required. The job ID for the Job to retry.
+     * 
+ * + * string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The jobId. + */ + public java.lang.String getJobId() { + java.lang.Object ref = jobId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The job ID for the Job to retry.
+     * 
+ * + * string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for jobId. + */ + public com.google.protobuf.ByteString getJobIdBytes() { + java.lang.Object ref = jobId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The job ID for the Job to retry.
+     * 
+ * + * string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The jobId to set. + * @return This builder for chaining. + */ + public Builder setJobId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jobId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The job ID for the Job to retry.
+     * 
+ * + * string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearJobId() { + + jobId_ = getDefaultInstance().getJobId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The job ID for the Job to retry.
+     * 
+ * + * string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for jobId to set. + * @return This builder for chaining. + */ + public Builder setJobIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jobId_ = 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.deploy.v1.RetryJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.RetryJobRequest) + private static final com.google.cloud.deploy.v1.RetryJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.RetryJobRequest(); + } + + public static com.google.cloud.deploy.v1.RetryJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RetryJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RetryJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobRequestOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobRequestOrBuilder.java new file mode 100644 index 0000000..9782672 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface RetryJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.RetryJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the Rollout. Format is
+   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/{release}/rollouts/{rollout}.
+   * 
+ * + * + * string rollout = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The rollout. + */ + java.lang.String getRollout(); + /** + * + * + *
+   * Required. Name of the Rollout. Format is
+   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+   * releases/{release}/rollouts/{rollout}.
+   * 
+ * + * + * string rollout = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for rollout. + */ + com.google.protobuf.ByteString getRolloutBytes(); + + /** + * + * + *
+   * Required. The phase ID the Job to retry belongs to.
+   * 
+ * + * string phase_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The phaseId. + */ + java.lang.String getPhaseId(); + /** + * + * + *
+   * Required. The phase ID the Job to retry belongs to.
+   * 
+ * + * string phase_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for phaseId. + */ + com.google.protobuf.ByteString getPhaseIdBytes(); + + /** + * + * + *
+   * Required. The job ID for the Job to retry.
+   * 
+ * + * string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The jobId. + */ + java.lang.String getJobId(); + /** + * + * + *
+   * Required. The job ID for the Job to retry.
+   * 
+ * + * string job_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for jobId. + */ + com.google.protobuf.ByteString getJobIdBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobResponse.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobResponse.java new file mode 100644 index 0000000..fd1301a --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobResponse.java @@ -0,0 +1,435 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * The response object from 'RetryJob'.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RetryJobResponse} + */ +public final class RetryJobResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.RetryJobResponse) + RetryJobResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RetryJobResponse.newBuilder() to construct. + private RetryJobResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RetryJobResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RetryJobResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RetryJobResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RetryJobResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RetryJobResponse.class, + com.google.cloud.deploy.v1.RetryJobResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.RetryJobResponse)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.RetryJobResponse other = + (com.google.cloud.deploy.v1.RetryJobResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.RetryJobResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RetryJobResponse 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.deploy.v1.RetryJobResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RetryJobResponse 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.deploy.v1.RetryJobResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RetryJobResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.RetryJobResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RetryJobResponse 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.deploy.v1.RetryJobResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RetryJobResponse 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.deploy.v1.RetryJobResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RetryJobResponse 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.deploy.v1.RetryJobResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response object from 'RetryJob'.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RetryJobResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.RetryJobResponse) + com.google.cloud.deploy.v1.RetryJobResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RetryJobResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RetryJobResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RetryJobResponse.class, + com.google.cloud.deploy.v1.RetryJobResponse.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.RetryJobResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RetryJobResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RetryJobResponse getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.RetryJobResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RetryJobResponse build() { + com.google.cloud.deploy.v1.RetryJobResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RetryJobResponse buildPartial() { + com.google.cloud.deploy.v1.RetryJobResponse result = + new com.google.cloud.deploy.v1.RetryJobResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.RetryJobResponse) { + return mergeFrom((com.google.cloud.deploy.v1.RetryJobResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.RetryJobResponse other) { + if (other == com.google.cloud.deploy.v1.RetryJobResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.RetryJobResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.RetryJobResponse) + private static final com.google.cloud.deploy.v1.RetryJobResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.RetryJobResponse(); + } + + public static com.google.cloud.deploy.v1.RetryJobResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RetryJobResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RetryJobResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobResponseOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobResponseOrBuilder.java new file mode 100644 index 0000000..030b150 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface RetryJobResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.RetryJobResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Rollout.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Rollout.java index 2450bd8..57fbb46 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Rollout.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Rollout.java @@ -49,6 +49,7 @@ private Rollout() { deployingBuild_ = ""; etag_ = ""; deployFailureCause_ = 0; + phases_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -62,219 +63,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Rollout( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - uid_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - annotations_ = - com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry annotations__ = - input.readMessage( - AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 50: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (approveTime_ != null) { - subBuilder = approveTime_.toBuilder(); - } - approveTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(approveTime_); - approveTime_ = subBuilder.buildPartial(); - } - - break; - } - case 66: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (enqueueTime_ != null) { - subBuilder = enqueueTime_.toBuilder(); - } - enqueueTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(enqueueTime_); - enqueueTime_ = subBuilder.buildPartial(); - } - - break; - } - case 74: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (deployStartTime_ != null) { - subBuilder = deployStartTime_.toBuilder(); - } - deployStartTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deployStartTime_); - deployStartTime_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (deployEndTime_ != null) { - subBuilder = deployEndTime_.toBuilder(); - } - deployEndTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deployEndTime_); - deployEndTime_ = subBuilder.buildPartial(); - } - - break; - } - case 96: - { - int rawValue = input.readEnum(); - - approvalState_ = rawValue; - break; - } - case 104: - { - int rawValue = input.readEnum(); - - state_ = rawValue; - break; - } - case 114: - { - java.lang.String s = input.readStringRequireUtf8(); - - failureReason_ = s; - break; - } - case 130: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 138: - { - java.lang.String s = input.readStringRequireUtf8(); - - deployingBuild_ = s; - break; - } - case 146: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetId_ = s; - break; - } - case 152: - { - int rawValue = input.readEnum(); - - deployFailureCause_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_Rollout_descriptor; @@ -777,7 +565,7 @@ private State(int value) { * * *
-   * Well-known deployment failures.
+   * Well-known rollout failures.
    * 
* * Protobuf enum {@code google.cloud.deploy.v1.Rollout.FailureCause} @@ -836,6 +624,26 @@ public enum FailureCause implements com.google.protobuf.ProtocolMessageEnum { * RELEASE_FAILED = 4; */ RELEASE_FAILED(4), + /** + * + * + *
+     * Release is abandoned.
+     * 
+ * + * RELEASE_ABANDONED = 5; + */ + RELEASE_ABANDONED(5), + /** + * + * + *
+     * No skaffold verify configuration was found.
+     * 
+ * + * VERIFICATION_CONFIG_NOT_FOUND = 6; + */ + VERIFICATION_CONFIG_NOT_FOUND(6), UNRECOGNIZED(-1), ; @@ -892,6 +700,26 @@ public enum FailureCause implements com.google.protobuf.ProtocolMessageEnum { * RELEASE_FAILED = 4; */ public static final int RELEASE_FAILED_VALUE = 4; + /** + * + * + *
+     * Release is abandoned.
+     * 
+ * + * RELEASE_ABANDONED = 5; + */ + public static final int RELEASE_ABANDONED_VALUE = 5; + /** + * + * + *
+     * No skaffold verify configuration was found.
+     * 
+ * + * VERIFICATION_CONFIG_NOT_FOUND = 6; + */ + public static final int VERIFICATION_CONFIG_NOT_FOUND_VALUE = 6; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -927,6 +755,10 @@ public static FailureCause forNumber(int value) { return DEADLINE_EXCEEDED; case 4: return RELEASE_FAILED; + case 5: + return RELEASE_ABANDONED; + case 6: + return VERIFICATION_CONFIG_NOT_FOUND; default: return null; } @@ -1769,7 +1601,7 @@ public com.google.cloud.deploy.v1.Rollout.State getState() { * * *
-   * Output only. Reason the build failed. Empty if the build succeeded.
+   * Output only. Additional information about the rollout failure, if available.
    * 
* * string failure_reason = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1792,7 +1624,7 @@ public java.lang.String getFailureReason() { * * *
-   * Output only. Reason the build failed. Empty if the build succeeded.
+   * Output only. Additional information about the rollout failure, if available.
    * 
* * string failure_reason = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1928,8 +1760,8 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *
-   * Output only. The reason this deploy failed. This will always be unspecified while the
-   * deploy in progress.
+   * Output only. The reason this rollout failed. This will always be unspecified while the
+   * rollout is in progress.
    * 
* * @@ -1946,8 +1778,8 @@ public int getDeployFailureCauseValue() { * * *
-   * Output only. The reason this deploy failed. This will always be unspecified while the
-   * deploy in progress.
+   * Output only. The reason this rollout failed. This will always be unspecified while the
+   * rollout is in progress.
    * 
* * @@ -1964,6 +1796,137 @@ public com.google.cloud.deploy.v1.Rollout.FailureCause getDeployFailureCause() { return result == null ? com.google.cloud.deploy.v1.Rollout.FailureCause.UNRECOGNIZED : result; } + public static final int PHASES_FIELD_NUMBER = 23; + private java.util.List phases_; + /** + * + * + *
+   * Output only. The phases that represent the workflows of this `Rollout`.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getPhasesList() { + return phases_; + } + /** + * + * + *
+   * Output only. The phases that represent the workflows of this `Rollout`.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getPhasesOrBuilderList() { + return phases_; + } + /** + * + * + *
+   * Output only. The phases that represent the workflows of this `Rollout`.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getPhasesCount() { + return phases_.size(); + } + /** + * + * + *
+   * Output only. The phases that represent the workflows of this `Rollout`.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Phase getPhases(int index) { + return phases_.get(index); + } + /** + * + * + *
+   * Output only. The phases that represent the workflows of this `Rollout`.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.PhaseOrBuilder getPhasesOrBuilder(int index) { + return phases_.get(index); + } + + public static final int METADATA_FIELD_NUMBER = 24; + private com.google.cloud.deploy.v1.Metadata metadata_; + /** + * + * + *
+   * Output only. Metadata contains information about the rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.Metadata metadata = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * + * + *
+   * Output only. Metadata contains information about the rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.Metadata metadata = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The metadata. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Metadata getMetadata() { + return metadata_ == null ? com.google.cloud.deploy.v1.Metadata.getDefaultInstance() : metadata_; + } + /** + * + * + *
+   * Output only. Metadata contains information about the rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.Metadata metadata = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.MetadataOrBuilder getMetadataOrBuilder() { + return getMetadata(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2030,7 +1993,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io != com.google.cloud.deploy.v1.Rollout.FailureCause.FAILURE_CAUSE_UNSPECIFIED.getNumber()) { output.writeEnum(19, deployFailureCause_); } - unknownFields.writeTo(output); + for (int i = 0; i < phases_.size(); i++) { + output.writeMessage(23, phases_.get(i)); + } + if (metadata_ != null) { + output.writeMessage(24, getMetadata()); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2107,7 +2076,13 @@ public int getSerializedSize() { != com.google.cloud.deploy.v1.Rollout.FailureCause.FAILURE_CAUSE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(19, deployFailureCause_); } - size += unknownFields.getSerializedSize(); + for (int i = 0; i < phases_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, phases_.get(i)); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getMetadata()); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2154,7 +2129,12 @@ public boolean equals(final java.lang.Object obj) { if (!getDeployingBuild().equals(other.getDeployingBuild())) return false; if (!getEtag().equals(other.getEtag())) return false; if (deployFailureCause_ != other.deployFailureCause_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getPhasesList().equals(other.getPhasesList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2213,7 +2193,15 @@ public int hashCode() { hash = (53 * hash) + getEtag().hashCode(); hash = (37 * hash) + DEPLOY_FAILURE_CAUSE_FIELD_NUMBER; hash = (53 * hash) + deployFailureCause_; - hash = (29 * hash) + unknownFields.hashCode(); + if (getPhasesCount() > 0) { + hash = (37 * hash) + PHASES_FIELD_NUMBER; + hash = (53 * hash) + getPhasesList().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2366,17 +2354,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.deploy.v1.Rollout.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2434,6 +2415,19 @@ public Builder clear() { deployFailureCause_ = 0; + if (phasesBuilder_ == null) { + phases_ = java.util.Collections.emptyList(); + } else { + phases_ = null; + phasesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } return this; } @@ -2500,6 +2494,20 @@ public com.google.cloud.deploy.v1.Rollout buildPartial() { result.deployingBuild_ = deployingBuild_; result.etag_ = etag_; result.deployFailureCause_ = deployFailureCause_; + if (phasesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + phases_ = java.util.Collections.unmodifiableList(phases_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.phases_ = phases_; + } else { + result.phases_ = phasesBuilder_.build(); + } + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } onBuilt(); return result; } @@ -2603,7 +2611,37 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.Rollout other) { if (other.deployFailureCause_ != 0) { setDeployFailureCauseValue(other.getDeployFailureCauseValue()); } - this.mergeUnknownFields(other.unknownFields); + if (phasesBuilder_ == null) { + if (!other.phases_.isEmpty()) { + if (phases_.isEmpty()) { + phases_ = other.phases_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensurePhasesIsMutable(); + phases_.addAll(other.phases_); + } + onChanged(); + } + } else { + if (!other.phases_.isEmpty()) { + if (phasesBuilder_.isEmpty()) { + phasesBuilder_.dispose(); + phasesBuilder_ = null; + phases_ = other.phases_; + bitField0_ = (bitField0_ & ~0x00000004); + phasesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPhasesFieldBuilder() + : null; + } else { + phasesBuilder_.addAllMessages(other.phases_); + } + } + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2618,17 +2656,161 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.Rollout parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 42 + case 50: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + input.readMessage(getApproveTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 66: + { + input.readMessage(getEnqueueTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 + case 74: + { + input.readMessage(getDeployStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 74 + case 82: + { + input.readMessage(getDeployEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 82 + case 96: + { + approvalState_ = input.readEnum(); + + break; + } // case 96 + case 104: + { + state_ = input.readEnum(); + + break; + } // case 104 + case 114: + { + failureReason_ = input.readStringRequireUtf8(); + + break; + } // case 114 + case 130: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 130 + case 138: + { + deployingBuild_ = input.readStringRequireUtf8(); + + break; + } // case 138 + case 146: + { + targetId_ = input.readStringRequireUtf8(); + + break; + } // case 146 + case 152: + { + deployFailureCause_ = input.readEnum(); + + break; + } // case 152 + case 186: + { + com.google.cloud.deploy.v1.Phase m = + input.readMessage(com.google.cloud.deploy.v1.Phase.parser(), extensionRegistry); + if (phasesBuilder_ == null) { + ensurePhasesIsMutable(); + phases_.add(m); + } else { + phasesBuilder_.addMessage(m); + } + break; + } // case 186 + case 194: + { + input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 194 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.Rollout) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4698,7 +4880,7 @@ public Builder clearState() { * * *
-     * Output only. Reason the build failed. Empty if the build succeeded.
+     * Output only. Additional information about the rollout failure, if available.
      * 
* * string failure_reason = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -4720,7 +4902,7 @@ public java.lang.String getFailureReason() { * * *
-     * Output only. Reason the build failed. Empty if the build succeeded.
+     * Output only. Additional information about the rollout failure, if available.
      * 
* * string failure_reason = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -4742,7 +4924,7 @@ public com.google.protobuf.ByteString getFailureReasonBytes() { * * *
-     * Output only. Reason the build failed. Empty if the build succeeded.
+     * Output only. Additional information about the rollout failure, if available.
      * 
* * string failure_reason = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -4763,7 +4945,7 @@ public Builder setFailureReason(java.lang.String value) { * * *
-     * Output only. Reason the build failed. Empty if the build succeeded.
+     * Output only. Additional information about the rollout failure, if available.
      * 
* * string failure_reason = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -4780,7 +4962,7 @@ public Builder clearFailureReason() { * * *
-     * Output only. Reason the build failed. Empty if the build succeeded.
+     * Output only. Additional information about the rollout failure, if available.
      * 
* * string failure_reason = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -5046,8 +5228,8 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { * * *
-     * Output only. The reason this deploy failed. This will always be unspecified while the
-     * deploy in progress.
+     * Output only. The reason this rollout failed. This will always be unspecified while the
+     * rollout is in progress.
      * 
* * @@ -5064,8 +5246,8 @@ public int getDeployFailureCauseValue() { * * *
-     * Output only. The reason this deploy failed. This will always be unspecified while the
-     * deploy in progress.
+     * Output only. The reason this rollout failed. This will always be unspecified while the
+     * rollout is in progress.
      * 
* * @@ -5085,8 +5267,8 @@ public Builder setDeployFailureCauseValue(int value) { * * *
-     * Output only. The reason this deploy failed. This will always be unspecified while the
-     * deploy in progress.
+     * Output only. The reason this rollout failed. This will always be unspecified while the
+     * rollout is in progress.
      * 
* * @@ -5106,8 +5288,8 @@ public com.google.cloud.deploy.v1.Rollout.FailureCause getDeployFailureCause() { * * *
-     * Output only. The reason this deploy failed. This will always be unspecified while the
-     * deploy in progress.
+     * Output only. The reason this rollout failed. This will always be unspecified while the
+     * rollout is in progress.
      * 
* * @@ -5130,8 +5312,8 @@ public Builder setDeployFailureCause(com.google.cloud.deploy.v1.Rollout.FailureC * * *
-     * Output only. The reason this deploy failed. This will always be unspecified while the
-     * deploy in progress.
+     * Output only. The reason this rollout failed. This will always be unspecified while the
+     * rollout is in progress.
      * 
* * @@ -5147,39 +5329,635 @@ public Builder clearDeployFailureCause() { return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } + private java.util.List phases_ = + java.util.Collections.emptyList(); - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + private void ensurePhasesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + phases_ = new java.util.ArrayList(phases_); + bitField0_ |= 0x00000004; + } } - // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.Rollout) - } - - // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.Rollout) - private static final com.google.cloud.deploy.v1.Rollout DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.Rollout(); - } - - public static com.google.cloud.deploy.v1.Rollout getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Phase, + com.google.cloud.deploy.v1.Phase.Builder, + com.google.cloud.deploy.v1.PhaseOrBuilder> + phasesBuilder_; - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Rollout parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Rollout(input, extensionRegistry); + /** + * + * + *
+     * Output only. The phases that represent the workflows of this `Rollout`.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getPhasesList() { + if (phasesBuilder_ == null) { + return java.util.Collections.unmodifiableList(phases_); + } else { + return phasesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. The phases that represent the workflows of this `Rollout`.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getPhasesCount() { + if (phasesBuilder_ == null) { + return phases_.size(); + } else { + return phasesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. The phases that represent the workflows of this `Rollout`.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.Phase getPhases(int index) { + if (phasesBuilder_ == null) { + return phases_.get(index); + } else { + return phasesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. The phases that represent the workflows of this `Rollout`.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPhases(int index, com.google.cloud.deploy.v1.Phase value) { + if (phasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePhasesIsMutable(); + phases_.set(index, value); + onChanged(); + } else { + phasesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The phases that represent the workflows of this `Rollout`.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPhases(int index, com.google.cloud.deploy.v1.Phase.Builder builderForValue) { + if (phasesBuilder_ == null) { + ensurePhasesIsMutable(); + phases_.set(index, builderForValue.build()); + onChanged(); + } else { + phasesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The phases that represent the workflows of this `Rollout`.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPhases(com.google.cloud.deploy.v1.Phase value) { + if (phasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePhasesIsMutable(); + phases_.add(value); + onChanged(); + } else { + phasesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. The phases that represent the workflows of this `Rollout`.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPhases(int index, com.google.cloud.deploy.v1.Phase value) { + if (phasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePhasesIsMutable(); + phases_.add(index, value); + onChanged(); + } else { + phasesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The phases that represent the workflows of this `Rollout`.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPhases(com.google.cloud.deploy.v1.Phase.Builder builderForValue) { + if (phasesBuilder_ == null) { + ensurePhasesIsMutable(); + phases_.add(builderForValue.build()); + onChanged(); + } else { + phasesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The phases that represent the workflows of this `Rollout`.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addPhases(int index, com.google.cloud.deploy.v1.Phase.Builder builderForValue) { + if (phasesBuilder_ == null) { + ensurePhasesIsMutable(); + phases_.add(index, builderForValue.build()); + onChanged(); + } else { + phasesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The phases that represent the workflows of this `Rollout`.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllPhases( + java.lang.Iterable values) { + if (phasesBuilder_ == null) { + ensurePhasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, phases_); + onChanged(); + } else { + phasesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. The phases that represent the workflows of this `Rollout`.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPhases() { + if (phasesBuilder_ == null) { + phases_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + phasesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. The phases that represent the workflows of this `Rollout`.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removePhases(int index) { + if (phasesBuilder_ == null) { + ensurePhasesIsMutable(); + phases_.remove(index); + onChanged(); + } else { + phasesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. The phases that represent the workflows of this `Rollout`.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.Phase.Builder getPhasesBuilder(int index) { + return getPhasesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. The phases that represent the workflows of this `Rollout`.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.PhaseOrBuilder getPhasesOrBuilder(int index) { + if (phasesBuilder_ == null) { + return phases_.get(index); + } else { + return phasesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. The phases that represent the workflows of this `Rollout`.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getPhasesOrBuilderList() { + if (phasesBuilder_ != null) { + return phasesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(phases_); + } + } + /** + * + * + *
+     * Output only. The phases that represent the workflows of this `Rollout`.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.Phase.Builder addPhasesBuilder() { + return getPhasesFieldBuilder() + .addBuilder(com.google.cloud.deploy.v1.Phase.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The phases that represent the workflows of this `Rollout`.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.Phase.Builder addPhasesBuilder(int index) { + return getPhasesFieldBuilder() + .addBuilder(index, com.google.cloud.deploy.v1.Phase.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The phases that represent the workflows of this `Rollout`.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getPhasesBuilderList() { + return getPhasesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Phase, + com.google.cloud.deploy.v1.Phase.Builder, + com.google.cloud.deploy.v1.PhaseOrBuilder> + getPhasesFieldBuilder() { + if (phasesBuilder_ == null) { + phasesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Phase, + com.google.cloud.deploy.v1.Phase.Builder, + com.google.cloud.deploy.v1.PhaseOrBuilder>( + phases_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + phases_ = null; + } + return phasesBuilder_; + } + + private com.google.cloud.deploy.v1.Metadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Metadata, + com.google.cloud.deploy.v1.Metadata.Builder, + com.google.cloud.deploy.v1.MetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * Output only. Metadata contains information about the rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.Metadata metadata = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * + * + *
+     * Output only. Metadata contains information about the rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.Metadata metadata = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The metadata. + */ + public com.google.cloud.deploy.v1.Metadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.deploy.v1.Metadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Metadata contains information about the rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.Metadata metadata = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMetadata(com.google.cloud.deploy.v1.Metadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Metadata contains information about the rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.Metadata metadata = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMetadata(com.google.cloud.deploy.v1.Metadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Metadata contains information about the rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.Metadata metadata = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeMetadata(com.google.cloud.deploy.v1.Metadata value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.cloud.deploy.v1.Metadata.newBuilder(metadata_) + .mergeFrom(value) + .buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Metadata contains information about the rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.Metadata metadata = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Metadata contains information about the rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.Metadata metadata = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.Metadata.Builder getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Metadata contains information about the rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.Metadata metadata = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.MetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.deploy.v1.Metadata.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * Output only. Metadata contains information about the rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.Metadata metadata = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Metadata, + com.google.cloud.deploy.v1.Metadata.Builder, + com.google.cloud.deploy.v1.MetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Metadata, + com.google.cloud.deploy.v1.Metadata.Builder, + com.google.cloud.deploy.v1.MetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.Rollout) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.Rollout) + private static final com.google.cloud.deploy.v1.Rollout DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.Rollout(); + } + + public static com.google.cloud.deploy.v1.Rollout getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Rollout parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutNotificationEvent.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutNotificationEvent.java index 689ecae..09623f3 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutNotificationEvent.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutNotificationEvent.java @@ -59,87 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RolloutNotificationEvent( - 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(); - - message_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - pipelineUid_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - releaseUid_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - rollout_ = s; - break; - } - case 40: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.RolloutNotificationPayloadProto .internal_static_google_cloud_deploy_v1_RolloutNotificationEvent_descriptor; @@ -467,7 +386,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, targetId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -494,7 +413,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, targetId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -516,7 +435,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRollout().equals(other.getRollout())) return false; if (type_ != other.type_) return false; if (!getTargetId().equals(other.getTargetId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -539,7 +458,7 @@ public int hashCode() { hash = (53 * hash) + type_; hash = (37 * hash) + TARGET_ID_FIELD_NUMBER; hash = (53 * hash) + getTargetId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -670,17 +589,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.RolloutNotificationEvent.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -804,7 +716,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.RolloutNotificationEvent oth targetId_ = other.targetId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -819,18 +731,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.RolloutNotificationEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + message_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + pipelineUid_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + releaseUid_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + rollout_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 40: + { + type_ = input.readEnum(); + + break; + } // case 40 + case 50: + { + targetId_ = input.readStringRequireUtf8(); + + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.deploy.v1.RolloutNotificationEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1486,7 +1447,18 @@ public RolloutNotificationEvent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RolloutNotificationEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutOrBuilder.java index 86c1236..49be699 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutOrBuilder.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutOrBuilder.java @@ -565,7 +565,7 @@ java.lang.String getLabelsOrDefault( * * *
-   * Output only. Reason the build failed. Empty if the build succeeded.
+   * Output only. Additional information about the rollout failure, if available.
    * 
* * string failure_reason = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -577,7 +577,7 @@ java.lang.String getLabelsOrDefault( * * *
-   * Output only. Reason the build failed. Empty if the build succeeded.
+   * Output only. Additional information about the rollout failure, if available.
    * 
* * string failure_reason = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -652,8 +652,8 @@ java.lang.String getLabelsOrDefault( * * *
-   * Output only. The reason this deploy failed. This will always be unspecified while the
-   * deploy in progress.
+   * Output only. The reason this rollout failed. This will always be unspecified while the
+   * rollout is in progress.
    * 
* * @@ -667,8 +667,8 @@ java.lang.String getLabelsOrDefault( * * *
-   * Output only. The reason this deploy failed. This will always be unspecified while the
-   * deploy in progress.
+   * Output only. The reason this rollout failed. This will always be unspecified while the
+   * rollout is in progress.
    * 
* * @@ -678,4 +678,106 @@ java.lang.String getLabelsOrDefault( * @return The deployFailureCause. */ com.google.cloud.deploy.v1.Rollout.FailureCause getDeployFailureCause(); + + /** + * + * + *
+   * Output only. The phases that represent the workflows of this `Rollout`.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getPhasesList(); + /** + * + * + *
+   * Output only. The phases that represent the workflows of this `Rollout`.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.Phase getPhases(int index); + /** + * + * + *
+   * Output only. The phases that represent the workflows of this `Rollout`.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getPhasesCount(); + /** + * + * + *
+   * Output only. The phases that represent the workflows of this `Rollout`.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getPhasesOrBuilderList(); + /** + * + * + *
+   * Output only. The phases that represent the workflows of this `Rollout`.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.Phase phases = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.PhaseOrBuilder getPhasesOrBuilder(int index); + + /** + * + * + *
+   * Output only. Metadata contains information about the rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.Metadata metadata = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * + * + *
+   * Output only. Metadata contains information about the rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.Metadata metadata = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The metadata. + */ + com.google.cloud.deploy.v1.Metadata getMetadata(); + /** + * + * + *
+   * Output only. Metadata contains information about the rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.Metadata metadata = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.MetadataOrBuilder getMetadataOrBuilder(); } diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SerialPipeline.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SerialPipeline.java index 5d1ef0f..553d90b 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SerialPipeline.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SerialPipeline.java @@ -52,59 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SerialPipeline( - 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)) { - stages_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - stages_.add( - input.readMessage(com.google.cloud.deploy.v1.Stage.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - stages_ = java.util.Collections.unmodifiableList(stages_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_SerialPipeline_descriptor; @@ -211,7 +158,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < stages_.size(); i++) { output.writeMessage(1, stages_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -223,7 +170,7 @@ public int getSerializedSize() { for (int i = 0; i < stages_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, stages_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -240,7 +187,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.deploy.v1.SerialPipeline) obj; if (!getStagesList().equals(other.getStagesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -255,7 +202,7 @@ public int hashCode() { hash = (37 * hash) + STAGES_FIELD_NUMBER; hash = (53 * hash) + getStagesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -384,19 +331,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.SerialPipeline.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getStagesFieldBuilder(); - } } @java.lang.Override @@ -404,10 +342,11 @@ public Builder clear() { super.clear(); if (stagesBuilder_ == null) { stages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + stages_ = null; stagesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -521,7 +460,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.SerialPipeline other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -536,17 +475,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.SerialPipeline parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.deploy.v1.Stage m = + input.readMessage(com.google.cloud.deploy.v1.Stage.parser(), extensionRegistry); + if (stagesBuilder_ == null) { + ensureStagesIsMutable(); + stages_.add(m); + } else { + stagesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.SerialPipeline) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -948,7 +913,18 @@ public SerialPipeline parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SerialPipeline(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SkaffoldVersion.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SkaffoldVersion.java index b22c002..271136f 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SkaffoldVersion.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/SkaffoldVersion.java @@ -52,66 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SkaffoldVersion( - 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(); - - version_ = s; - break; - } - case 18: - { - com.google.type.Date.Builder subBuilder = null; - if (supportEndDate_ != null) { - subBuilder = supportEndDate_.toBuilder(); - } - supportEndDate_ = input.readMessage(com.google.type.Date.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(supportEndDate_); - supportEndDate_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_SkaffoldVersion_descriptor; @@ -242,7 +182,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (supportEndDate_ != null) { output.writeMessage(2, getSupportEndDate()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -257,7 +197,7 @@ public int getSerializedSize() { if (supportEndDate_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSupportEndDate()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -278,7 +218,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSupportEndDate()) { if (!getSupportEndDate().equals(other.getSupportEndDate())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -295,7 +235,7 @@ public int hashCode() { hash = (37 * hash) + SUPPORT_END_DATE_FIELD_NUMBER; hash = (53 * hash) + getSupportEndDate().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -424,17 +364,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.SkaffoldVersion.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -537,7 +470,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.SkaffoldVersion other) { if (other.hasSupportEndDate()) { mergeSupportEndDate(other.getSupportEndDate()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -552,17 +485,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.SkaffoldVersion parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + version_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getSupportEndDateFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.SkaffoldVersion) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -881,7 +840,18 @@ public SkaffoldVersion parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SkaffoldVersion(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Stage.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Stage.java index a5292a0..0018130 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Stage.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Stage.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Stage( - 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(); - - targetId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - profiles_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - profiles_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - profiles_ = profiles_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_Stage_descriptor; @@ -251,6 +191,55 @@ public com.google.protobuf.ByteString getProfilesBytes(int index) { return profiles_.getByteString(index); } + public static final int STRATEGY_FIELD_NUMBER = 5; + private com.google.cloud.deploy.v1.Strategy strategy_; + /** + * + * + *
+   * Optional. The strategy to use for a `Rollout` to this stage.
+   * 
+ * + * .google.cloud.deploy.v1.Strategy strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the strategy field is set. + */ + @java.lang.Override + public boolean hasStrategy() { + return strategy_ != null; + } + /** + * + * + *
+   * Optional. The strategy to use for a `Rollout` to this stage.
+   * 
+ * + * .google.cloud.deploy.v1.Strategy strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The strategy. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Strategy getStrategy() { + return strategy_ == null ? com.google.cloud.deploy.v1.Strategy.getDefaultInstance() : strategy_; + } + /** + * + * + *
+   * Optional. The strategy to use for a `Rollout` to this stage.
+   * 
+ * + * .google.cloud.deploy.v1.Strategy strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.StrategyOrBuilder getStrategyOrBuilder() { + return getStrategy(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -271,7 +260,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < profiles_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, profiles_.getRaw(i)); } - unknownFields.writeTo(output); + if (strategy_ != null) { + output.writeMessage(5, getStrategy()); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -291,7 +283,10 @@ public int getSerializedSize() { size += dataSize; size += 1 * getProfilesList().size(); } - size += unknownFields.getSerializedSize(); + if (strategy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getStrategy()); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -308,7 +303,11 @@ public boolean equals(final java.lang.Object obj) { if (!getTargetId().equals(other.getTargetId())) return false; if (!getProfilesList().equals(other.getProfilesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (hasStrategy() != other.hasStrategy()) return false; + if (hasStrategy()) { + if (!getStrategy().equals(other.getStrategy())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -325,7 +324,11 @@ public int hashCode() { hash = (37 * hash) + PROFILES_FIELD_NUMBER; hash = (53 * hash) + getProfilesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + if (hasStrategy()) { + hash = (37 * hash) + STRATEGY_FIELD_NUMBER; + hash = (53 * hash) + getStrategy().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -453,17 +456,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.Stage.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -473,6 +469,12 @@ public Builder clear() { profiles_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); + if (strategyBuilder_ == null) { + strategy_ = null; + } else { + strategy_ = null; + strategyBuilder_ = null; + } return this; } @@ -506,6 +508,11 @@ public com.google.cloud.deploy.v1.Stage buildPartial() { bitField0_ = (bitField0_ & ~0x00000001); } result.profiles_ = profiles_; + if (strategyBuilder_ == null) { + result.strategy_ = strategy_; + } else { + result.strategy_ = strategyBuilder_.build(); + } onBuilt(); return result; } @@ -569,7 +576,10 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.Stage other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + if (other.hasStrategy()) { + mergeStrategy(other.getStrategy()); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -584,17 +594,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.Stage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + targetId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureProfilesIsMutable(); + profiles_.add(s); + break; + } // case 18 + case 42: + { + input.readMessage(getStrategyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.Stage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -908,6 +951,209 @@ public Builder addProfilesBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.cloud.deploy.v1.Strategy strategy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Strategy, + com.google.cloud.deploy.v1.Strategy.Builder, + com.google.cloud.deploy.v1.StrategyOrBuilder> + strategyBuilder_; + /** + * + * + *
+     * Optional. The strategy to use for a `Rollout` to this stage.
+     * 
+ * + * + * .google.cloud.deploy.v1.Strategy strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the strategy field is set. + */ + public boolean hasStrategy() { + return strategyBuilder_ != null || strategy_ != null; + } + /** + * + * + *
+     * Optional. The strategy to use for a `Rollout` to this stage.
+     * 
+ * + * + * .google.cloud.deploy.v1.Strategy strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The strategy. + */ + public com.google.cloud.deploy.v1.Strategy getStrategy() { + if (strategyBuilder_ == null) { + return strategy_ == null + ? com.google.cloud.deploy.v1.Strategy.getDefaultInstance() + : strategy_; + } else { + return strategyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The strategy to use for a `Rollout` to this stage.
+     * 
+ * + * + * .google.cloud.deploy.v1.Strategy strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setStrategy(com.google.cloud.deploy.v1.Strategy value) { + if (strategyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + strategy_ = value; + onChanged(); + } else { + strategyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The strategy to use for a `Rollout` to this stage.
+     * 
+ * + * + * .google.cloud.deploy.v1.Strategy strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setStrategy(com.google.cloud.deploy.v1.Strategy.Builder builderForValue) { + if (strategyBuilder_ == null) { + strategy_ = builderForValue.build(); + onChanged(); + } else { + strategyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The strategy to use for a `Rollout` to this stage.
+     * 
+ * + * + * .google.cloud.deploy.v1.Strategy strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeStrategy(com.google.cloud.deploy.v1.Strategy value) { + if (strategyBuilder_ == null) { + if (strategy_ != null) { + strategy_ = + com.google.cloud.deploy.v1.Strategy.newBuilder(strategy_) + .mergeFrom(value) + .buildPartial(); + } else { + strategy_ = value; + } + onChanged(); + } else { + strategyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The strategy to use for a `Rollout` to this stage.
+     * 
+ * + * + * .google.cloud.deploy.v1.Strategy strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearStrategy() { + if (strategyBuilder_ == null) { + strategy_ = null; + onChanged(); + } else { + strategy_ = null; + strategyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The strategy to use for a `Rollout` to this stage.
+     * 
+ * + * + * .google.cloud.deploy.v1.Strategy strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.deploy.v1.Strategy.Builder getStrategyBuilder() { + + onChanged(); + return getStrategyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The strategy to use for a `Rollout` to this stage.
+     * 
+ * + * + * .google.cloud.deploy.v1.Strategy strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.deploy.v1.StrategyOrBuilder getStrategyOrBuilder() { + if (strategyBuilder_ != null) { + return strategyBuilder_.getMessageOrBuilder(); + } else { + return strategy_ == null + ? com.google.cloud.deploy.v1.Strategy.getDefaultInstance() + : strategy_; + } + } + /** + * + * + *
+     * Optional. The strategy to use for a `Rollout` to this stage.
+     * 
+ * + * + * .google.cloud.deploy.v1.Strategy strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Strategy, + com.google.cloud.deploy.v1.Strategy.Builder, + com.google.cloud.deploy.v1.StrategyOrBuilder> + getStrategyFieldBuilder() { + if (strategyBuilder_ == null) { + strategyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Strategy, + com.google.cloud.deploy.v1.Strategy.Builder, + com.google.cloud.deploy.v1.StrategyOrBuilder>( + getStrategy(), getParentForChildren(), isClean()); + strategy_ = null; + } + return strategyBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -940,7 +1186,18 @@ public Stage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Stage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/StageOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/StageOrBuilder.java index 790cca1..07e1f69 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/StageOrBuilder.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/StageOrBuilder.java @@ -112,4 +112,42 @@ public interface StageOrBuilder * @return The bytes of the profiles at the given index. */ com.google.protobuf.ByteString getProfilesBytes(int index); + + /** + * + * + *
+   * Optional. The strategy to use for a `Rollout` to this stage.
+   * 
+ * + * .google.cloud.deploy.v1.Strategy strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the strategy field is set. + */ + boolean hasStrategy(); + /** + * + * + *
+   * Optional. The strategy to use for a `Rollout` to this stage.
+   * 
+ * + * .google.cloud.deploy.v1.Strategy strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The strategy. + */ + com.google.cloud.deploy.v1.Strategy getStrategy(); + /** + * + * + *
+   * Optional. The strategy to use for a `Rollout` to this stage.
+   * 
+ * + * .google.cloud.deploy.v1.Strategy strategy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.deploy.v1.StrategyOrBuilder getStrategyOrBuilder(); } diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Standard.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Standard.java new file mode 100644 index 0000000..6ee13a8 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Standard.java @@ -0,0 +1,523 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Standard represents the standard deployment strategy.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Standard} + */ +public final class Standard extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.Standard) + StandardOrBuilder { + private static final long serialVersionUID = 0L; + // Use Standard.newBuilder() to construct. + private Standard(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Standard() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Standard(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Standard_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Standard_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Standard.class, + com.google.cloud.deploy.v1.Standard.Builder.class); + } + + public static final int VERIFY_FIELD_NUMBER = 1; + private boolean verify_; + /** + * + * + *
+   * Whether to verify a deployment.
+   * 
+ * + * bool verify = 1; + * + * @return The verify. + */ + @java.lang.Override + public boolean getVerify() { + return verify_; + } + + 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 (verify_ != false) { + output.writeBool(1, verify_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (verify_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, verify_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.Standard)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.Standard other = (com.google.cloud.deploy.v1.Standard) obj; + + if (getVerify() != other.getVerify()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERIFY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getVerify()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.Standard parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Standard 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.deploy.v1.Standard parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Standard 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.deploy.v1.Standard parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Standard parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.Standard parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Standard 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.deploy.v1.Standard parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Standard 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.deploy.v1.Standard parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Standard 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.deploy.v1.Standard 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; + } + /** + * + * + *
+   * Standard represents the standard deployment strategy.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Standard} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.Standard) + com.google.cloud.deploy.v1.StandardOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Standard_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Standard_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Standard.class, + com.google.cloud.deploy.v1.Standard.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.Standard.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + verify_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Standard_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Standard getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.Standard.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Standard build() { + com.google.cloud.deploy.v1.Standard result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Standard buildPartial() { + com.google.cloud.deploy.v1.Standard result = new com.google.cloud.deploy.v1.Standard(this); + result.verify_ = verify_; + 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.deploy.v1.Standard) { + return mergeFrom((com.google.cloud.deploy.v1.Standard) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.Standard other) { + if (other == com.google.cloud.deploy.v1.Standard.getDefaultInstance()) return this; + if (other.getVerify() != false) { + setVerify(other.getVerify()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + verify_ = input.readBool(); + + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private boolean verify_; + /** + * + * + *
+     * Whether to verify a deployment.
+     * 
+ * + * bool verify = 1; + * + * @return The verify. + */ + @java.lang.Override + public boolean getVerify() { + return verify_; + } + /** + * + * + *
+     * Whether to verify a deployment.
+     * 
+ * + * bool verify = 1; + * + * @param value The verify to set. + * @return This builder for chaining. + */ + public Builder setVerify(boolean value) { + + verify_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether to verify a deployment.
+     * 
+ * + * bool verify = 1; + * + * @return This builder for chaining. + */ + public Builder clearVerify() { + + verify_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.Standard) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.Standard) + private static final com.google.cloud.deploy.v1.Standard DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.Standard(); + } + + public static com.google.cloud.deploy.v1.Standard getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Standard parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Standard getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/StandardOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/StandardOrBuilder.java new file mode 100644 index 0000000..fb7be79 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/StandardOrBuilder.java @@ -0,0 +1,38 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface StandardOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.Standard) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Whether to verify a deployment.
+   * 
+ * + * bool verify = 1; + * + * @return The verify. + */ + boolean getVerify(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Strategy.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Strategy.java new file mode 100644 index 0000000..b2fdbfd --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Strategy.java @@ -0,0 +1,816 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Strategy contains deployment strategy information.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Strategy} + */ +public final class Strategy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.Strategy) + StrategyOrBuilder { + private static final long serialVersionUID = 0L; + // Use Strategy.newBuilder() to construct. + private Strategy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Strategy() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Strategy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Strategy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Strategy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Strategy.class, + com.google.cloud.deploy.v1.Strategy.Builder.class); + } + + private int deploymentStrategyCase_ = 0; + private java.lang.Object deploymentStrategy_; + + public enum DeploymentStrategyCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + STANDARD(1), + DEPLOYMENTSTRATEGY_NOT_SET(0); + private final int value; + + private DeploymentStrategyCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DeploymentStrategyCase valueOf(int value) { + return forNumber(value); + } + + public static DeploymentStrategyCase forNumber(int value) { + switch (value) { + case 1: + return STANDARD; + case 0: + return DEPLOYMENTSTRATEGY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DeploymentStrategyCase getDeploymentStrategyCase() { + return DeploymentStrategyCase.forNumber(deploymentStrategyCase_); + } + + public static final int STANDARD_FIELD_NUMBER = 1; + /** + * + * + *
+   * Standard deployment strategy executes a single deploy and allows
+   * verifying the deployment.
+   * 
+ * + * .google.cloud.deploy.v1.Standard standard = 1; + * + * @return Whether the standard field is set. + */ + @java.lang.Override + public boolean hasStandard() { + return deploymentStrategyCase_ == 1; + } + /** + * + * + *
+   * Standard deployment strategy executes a single deploy and allows
+   * verifying the deployment.
+   * 
+ * + * .google.cloud.deploy.v1.Standard standard = 1; + * + * @return The standard. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Standard getStandard() { + if (deploymentStrategyCase_ == 1) { + return (com.google.cloud.deploy.v1.Standard) deploymentStrategy_; + } + return com.google.cloud.deploy.v1.Standard.getDefaultInstance(); + } + /** + * + * + *
+   * Standard deployment strategy executes a single deploy and allows
+   * verifying the deployment.
+   * 
+ * + * .google.cloud.deploy.v1.Standard standard = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.StandardOrBuilder getStandardOrBuilder() { + if (deploymentStrategyCase_ == 1) { + return (com.google.cloud.deploy.v1.Standard) deploymentStrategy_; + } + return com.google.cloud.deploy.v1.Standard.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (deploymentStrategyCase_ == 1) { + output.writeMessage(1, (com.google.cloud.deploy.v1.Standard) deploymentStrategy_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (deploymentStrategyCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.deploy.v1.Standard) deploymentStrategy_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.Strategy)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.Strategy other = (com.google.cloud.deploy.v1.Strategy) obj; + + if (!getDeploymentStrategyCase().equals(other.getDeploymentStrategyCase())) return false; + switch (deploymentStrategyCase_) { + case 1: + if (!getStandard().equals(other.getStandard())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (deploymentStrategyCase_) { + case 1: + hash = (37 * hash) + STANDARD_FIELD_NUMBER; + hash = (53 * hash) + getStandard().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.Strategy parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Strategy 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.deploy.v1.Strategy parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Strategy 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.deploy.v1.Strategy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Strategy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.Strategy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Strategy 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.deploy.v1.Strategy parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Strategy 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.deploy.v1.Strategy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Strategy 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.deploy.v1.Strategy 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; + } + /** + * + * + *
+   * Strategy contains deployment strategy information.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Strategy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.Strategy) + com.google.cloud.deploy.v1.StrategyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Strategy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Strategy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Strategy.class, + com.google.cloud.deploy.v1.Strategy.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.Strategy.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (standardBuilder_ != null) { + standardBuilder_.clear(); + } + deploymentStrategyCase_ = 0; + deploymentStrategy_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Strategy_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Strategy getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.Strategy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Strategy build() { + com.google.cloud.deploy.v1.Strategy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Strategy buildPartial() { + com.google.cloud.deploy.v1.Strategy result = new com.google.cloud.deploy.v1.Strategy(this); + if (deploymentStrategyCase_ == 1) { + if (standardBuilder_ == null) { + result.deploymentStrategy_ = deploymentStrategy_; + } else { + result.deploymentStrategy_ = standardBuilder_.build(); + } + } + result.deploymentStrategyCase_ = deploymentStrategyCase_; + 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.deploy.v1.Strategy) { + return mergeFrom((com.google.cloud.deploy.v1.Strategy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.Strategy other) { + if (other == com.google.cloud.deploy.v1.Strategy.getDefaultInstance()) return this; + switch (other.getDeploymentStrategyCase()) { + case STANDARD: + { + mergeStandard(other.getStandard()); + break; + } + case DEPLOYMENTSTRATEGY_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getStandardFieldBuilder().getBuilder(), extensionRegistry); + deploymentStrategyCase_ = 1; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int deploymentStrategyCase_ = 0; + private java.lang.Object deploymentStrategy_; + + public DeploymentStrategyCase getDeploymentStrategyCase() { + return DeploymentStrategyCase.forNumber(deploymentStrategyCase_); + } + + public Builder clearDeploymentStrategy() { + deploymentStrategyCase_ = 0; + deploymentStrategy_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Standard, + com.google.cloud.deploy.v1.Standard.Builder, + com.google.cloud.deploy.v1.StandardOrBuilder> + standardBuilder_; + /** + * + * + *
+     * Standard deployment strategy executes a single deploy and allows
+     * verifying the deployment.
+     * 
+ * + * .google.cloud.deploy.v1.Standard standard = 1; + * + * @return Whether the standard field is set. + */ + @java.lang.Override + public boolean hasStandard() { + return deploymentStrategyCase_ == 1; + } + /** + * + * + *
+     * Standard deployment strategy executes a single deploy and allows
+     * verifying the deployment.
+     * 
+ * + * .google.cloud.deploy.v1.Standard standard = 1; + * + * @return The standard. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Standard getStandard() { + if (standardBuilder_ == null) { + if (deploymentStrategyCase_ == 1) { + return (com.google.cloud.deploy.v1.Standard) deploymentStrategy_; + } + return com.google.cloud.deploy.v1.Standard.getDefaultInstance(); + } else { + if (deploymentStrategyCase_ == 1) { + return standardBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.Standard.getDefaultInstance(); + } + } + /** + * + * + *
+     * Standard deployment strategy executes a single deploy and allows
+     * verifying the deployment.
+     * 
+ * + * .google.cloud.deploy.v1.Standard standard = 1; + */ + public Builder setStandard(com.google.cloud.deploy.v1.Standard value) { + if (standardBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deploymentStrategy_ = value; + onChanged(); + } else { + standardBuilder_.setMessage(value); + } + deploymentStrategyCase_ = 1; + return this; + } + /** + * + * + *
+     * Standard deployment strategy executes a single deploy and allows
+     * verifying the deployment.
+     * 
+ * + * .google.cloud.deploy.v1.Standard standard = 1; + */ + public Builder setStandard(com.google.cloud.deploy.v1.Standard.Builder builderForValue) { + if (standardBuilder_ == null) { + deploymentStrategy_ = builderForValue.build(); + onChanged(); + } else { + standardBuilder_.setMessage(builderForValue.build()); + } + deploymentStrategyCase_ = 1; + return this; + } + /** + * + * + *
+     * Standard deployment strategy executes a single deploy and allows
+     * verifying the deployment.
+     * 
+ * + * .google.cloud.deploy.v1.Standard standard = 1; + */ + public Builder mergeStandard(com.google.cloud.deploy.v1.Standard value) { + if (standardBuilder_ == null) { + if (deploymentStrategyCase_ == 1 + && deploymentStrategy_ != com.google.cloud.deploy.v1.Standard.getDefaultInstance()) { + deploymentStrategy_ = + com.google.cloud.deploy.v1.Standard.newBuilder( + (com.google.cloud.deploy.v1.Standard) deploymentStrategy_) + .mergeFrom(value) + .buildPartial(); + } else { + deploymentStrategy_ = value; + } + onChanged(); + } else { + if (deploymentStrategyCase_ == 1) { + standardBuilder_.mergeFrom(value); + } else { + standardBuilder_.setMessage(value); + } + } + deploymentStrategyCase_ = 1; + return this; + } + /** + * + * + *
+     * Standard deployment strategy executes a single deploy and allows
+     * verifying the deployment.
+     * 
+ * + * .google.cloud.deploy.v1.Standard standard = 1; + */ + public Builder clearStandard() { + if (standardBuilder_ == null) { + if (deploymentStrategyCase_ == 1) { + deploymentStrategyCase_ = 0; + deploymentStrategy_ = null; + onChanged(); + } + } else { + if (deploymentStrategyCase_ == 1) { + deploymentStrategyCase_ = 0; + deploymentStrategy_ = null; + } + standardBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Standard deployment strategy executes a single deploy and allows
+     * verifying the deployment.
+     * 
+ * + * .google.cloud.deploy.v1.Standard standard = 1; + */ + public com.google.cloud.deploy.v1.Standard.Builder getStandardBuilder() { + return getStandardFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Standard deployment strategy executes a single deploy and allows
+     * verifying the deployment.
+     * 
+ * + * .google.cloud.deploy.v1.Standard standard = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.StandardOrBuilder getStandardOrBuilder() { + if ((deploymentStrategyCase_ == 1) && (standardBuilder_ != null)) { + return standardBuilder_.getMessageOrBuilder(); + } else { + if (deploymentStrategyCase_ == 1) { + return (com.google.cloud.deploy.v1.Standard) deploymentStrategy_; + } + return com.google.cloud.deploy.v1.Standard.getDefaultInstance(); + } + } + /** + * + * + *
+     * Standard deployment strategy executes a single deploy and allows
+     * verifying the deployment.
+     * 
+ * + * .google.cloud.deploy.v1.Standard standard = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Standard, + com.google.cloud.deploy.v1.Standard.Builder, + com.google.cloud.deploy.v1.StandardOrBuilder> + getStandardFieldBuilder() { + if (standardBuilder_ == null) { + if (!(deploymentStrategyCase_ == 1)) { + deploymentStrategy_ = com.google.cloud.deploy.v1.Standard.getDefaultInstance(); + } + standardBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Standard, + com.google.cloud.deploy.v1.Standard.Builder, + com.google.cloud.deploy.v1.StandardOrBuilder>( + (com.google.cloud.deploy.v1.Standard) deploymentStrategy_, + getParentForChildren(), + isClean()); + deploymentStrategy_ = null; + } + deploymentStrategyCase_ = 1; + onChanged(); + ; + return standardBuilder_; + } + + @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.deploy.v1.Strategy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.Strategy) + private static final com.google.cloud.deploy.v1.Strategy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.Strategy(); + } + + public static com.google.cloud.deploy.v1.Strategy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Strategy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Strategy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/StrategyOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/StrategyOrBuilder.java new file mode 100644 index 0000000..caaaf91 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/StrategyOrBuilder.java @@ -0,0 +1,65 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface StrategyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.Strategy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Standard deployment strategy executes a single deploy and allows
+   * verifying the deployment.
+   * 
+ * + * .google.cloud.deploy.v1.Standard standard = 1; + * + * @return Whether the standard field is set. + */ + boolean hasStandard(); + /** + * + * + *
+   * Standard deployment strategy executes a single deploy and allows
+   * verifying the deployment.
+   * 
+ * + * .google.cloud.deploy.v1.Standard standard = 1; + * + * @return The standard. + */ + com.google.cloud.deploy.v1.Standard getStandard(); + /** + * + * + *
+   * Standard deployment strategy executes a single deploy and allows
+   * verifying the deployment.
+   * 
+ * + * .google.cloud.deploy.v1.Standard standard = 1; + */ + com.google.cloud.deploy.v1.StandardOrBuilder getStandardOrBuilder(); + + public com.google.cloud.deploy.v1.Strategy.DeploymentStrategyCase getDeploymentStrategyCase(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Target.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Target.java index 773b848..0469dac 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Target.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Target.java @@ -59,193 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Target( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - uid_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - annotations_ = - com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry annotations__ = - input.readMessage( - AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 66: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 74: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 98: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 104: - { - requireApproval_ = input.readBool(); - break; - } - case 122: - { - com.google.cloud.deploy.v1.GkeCluster.Builder subBuilder = null; - if (deploymentTargetCase_ == 15) { - subBuilder = - ((com.google.cloud.deploy.v1.GkeCluster) deploymentTarget_).toBuilder(); - } - deploymentTarget_ = - input.readMessage( - com.google.cloud.deploy.v1.GkeCluster.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.deploy.v1.GkeCluster) deploymentTarget_); - deploymentTarget_ = subBuilder.buildPartial(); - } - deploymentTargetCase_ = 15; - break; - } - case 130: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - executionConfigs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - executionConfigs_.add( - input.readMessage( - com.google.cloud.deploy.v1.ExecutionConfig.parser(), extensionRegistry)); - break; - } - case 138: - { - com.google.cloud.deploy.v1.AnthosCluster.Builder subBuilder = null; - if (deploymentTargetCase_ == 17) { - subBuilder = - ((com.google.cloud.deploy.v1.AnthosCluster) deploymentTarget_).toBuilder(); - } - deploymentTarget_ = - input.readMessage( - com.google.cloud.deploy.v1.AnthosCluster.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.deploy.v1.AnthosCluster) deploymentTarget_); - deploymentTarget_ = subBuilder.buildPartial(); - } - deploymentTargetCase_ = 17; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) != 0)) { - executionConfigs_ = java.util.Collections.unmodifiableList(executionConfigs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_Target_descriptor; @@ -283,6 +96,7 @@ public enum DeploymentTargetCase com.google.protobuf.AbstractMessage.InternalOneOfEnum { GKE(15), ANTHOS_CLUSTER(17), + RUN(18), DEPLOYMENTTARGET_NOT_SET(0); private final int value; @@ -305,6 +119,8 @@ public static DeploymentTargetCase forNumber(int value) { return GKE; case 17: return ANTHOS_CLUSTER; + case 18: + return RUN; case 0: return DEPLOYMENTTARGET_NOT_SET; default: @@ -987,6 +803,57 @@ public com.google.cloud.deploy.v1.AnthosClusterOrBuilder getAnthosClusterOrBuild return com.google.cloud.deploy.v1.AnthosCluster.getDefaultInstance(); } + public static final int RUN_FIELD_NUMBER = 18; + /** + * + * + *
+   * Information specifying a Cloud Run deployment target.
+   * 
+ * + * .google.cloud.deploy.v1.CloudRunLocation run = 18; + * + * @return Whether the run field is set. + */ + @java.lang.Override + public boolean hasRun() { + return deploymentTargetCase_ == 18; + } + /** + * + * + *
+   * Information specifying a Cloud Run deployment target.
+   * 
+ * + * .google.cloud.deploy.v1.CloudRunLocation run = 18; + * + * @return The run. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.CloudRunLocation getRun() { + if (deploymentTargetCase_ == 18) { + return (com.google.cloud.deploy.v1.CloudRunLocation) deploymentTarget_; + } + return com.google.cloud.deploy.v1.CloudRunLocation.getDefaultInstance(); + } + /** + * + * + *
+   * Information specifying a Cloud Run deployment target.
+   * 
+ * + * .google.cloud.deploy.v1.CloudRunLocation run = 18; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.CloudRunLocationOrBuilder getRunOrBuilder() { + if (deploymentTargetCase_ == 18) { + return (com.google.cloud.deploy.v1.CloudRunLocation) deploymentTarget_; + } + return com.google.cloud.deploy.v1.CloudRunLocation.getDefaultInstance(); + } + public static final int ETAG_FIELD_NUMBER = 12; private volatile java.lang.Object etag_; /** @@ -1191,7 +1058,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (deploymentTargetCase_ == 17) { output.writeMessage(17, (com.google.cloud.deploy.v1.AnthosCluster) deploymentTarget_); } - unknownFields.writeTo(output); + if (deploymentTargetCase_ == 18) { + output.writeMessage(18, (com.google.cloud.deploy.v1.CloudRunLocation) deploymentTarget_); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1258,7 +1128,12 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 17, (com.google.cloud.deploy.v1.AnthosCluster) deploymentTarget_); } - size += unknownFields.getSerializedSize(); + if (deploymentTargetCase_ == 18) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 18, (com.google.cloud.deploy.v1.CloudRunLocation) deploymentTarget_); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1298,10 +1173,13 @@ public boolean equals(final java.lang.Object obj) { case 17: if (!getAnthosCluster().equals(other.getAnthosCluster())) return false; break; + case 18: + if (!getRun().equals(other.getRun())) return false; + break; case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1353,10 +1231,14 @@ public int hashCode() { hash = (37 * hash) + ANTHOS_CLUSTER_FIELD_NUMBER; hash = (53 * hash) + getAnthosCluster().hashCode(); break; + case 18: + hash = (37 * hash) + RUN_FIELD_NUMBER; + hash = (53 * hash) + getRun().hashCode(); + break; case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1510,19 +1392,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.deploy.v1.Target.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getExecutionConfigsFieldBuilder(); - } } @java.lang.Override @@ -1552,14 +1425,24 @@ public Builder clear() { updateTime_ = null; updateTimeBuilder_ = null; } + if (gkeBuilder_ != null) { + gkeBuilder_.clear(); + } + if (anthosClusterBuilder_ != null) { + anthosClusterBuilder_.clear(); + } + if (runBuilder_ != null) { + runBuilder_.clear(); + } etag_ = ""; if (executionConfigsBuilder_ == null) { executionConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + executionConfigs_ = null; executionConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); deploymentTargetCase_ = 0; deploymentTarget_ = null; return this; @@ -1622,6 +1505,13 @@ public com.google.cloud.deploy.v1.Target buildPartial() { result.deploymentTarget_ = anthosClusterBuilder_.build(); } } + if (deploymentTargetCase_ == 18) { + if (runBuilder_ == null) { + result.deploymentTarget_ = deploymentTarget_; + } else { + result.deploymentTarget_ = runBuilder_.build(); + } + } result.etag_ = etag_; if (executionConfigsBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { @@ -1751,12 +1641,17 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.Target other) { mergeAnthosCluster(other.getAnthosCluster()); break; } + case RUN: + { + mergeRun(other.getRun()); + break; + } case DEPLOYMENTTARGET_NOT_SET: { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1771,17 +1666,132 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.Target parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + targetId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + uid_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + break; + } // case 42 + case 50: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 50 + case 66: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 + case 74: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 74 + case 98: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 98 + case 104: + { + requireApproval_ = input.readBool(); + + break; + } // case 104 + case 122: + { + input.readMessage(getGkeFieldBuilder().getBuilder(), extensionRegistry); + deploymentTargetCase_ = 15; + break; + } // case 122 + case 130: + { + com.google.cloud.deploy.v1.ExecutionConfig m = + input.readMessage( + com.google.cloud.deploy.v1.ExecutionConfig.parser(), extensionRegistry); + if (executionConfigsBuilder_ == null) { + ensureExecutionConfigsIsMutable(); + executionConfigs_.add(m); + } else { + executionConfigsBuilder_.addMessage(m); + } + break; + } // case 130 + case 138: + { + input.readMessage(getAnthosClusterFieldBuilder().getBuilder(), extensionRegistry); + deploymentTargetCase_ = 17; + break; + } // case 138 + case 146: + { + input.readMessage(getRunFieldBuilder().getBuilder(), extensionRegistry); + deploymentTargetCase_ = 18; + break; + } // case 146 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.Target) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3513,6 +3523,216 @@ public com.google.cloud.deploy.v1.AnthosClusterOrBuilder getAnthosClusterOrBuild return anthosClusterBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.CloudRunLocation, + com.google.cloud.deploy.v1.CloudRunLocation.Builder, + com.google.cloud.deploy.v1.CloudRunLocationOrBuilder> + runBuilder_; + /** + * + * + *
+     * Information specifying a Cloud Run deployment target.
+     * 
+ * + * .google.cloud.deploy.v1.CloudRunLocation run = 18; + * + * @return Whether the run field is set. + */ + @java.lang.Override + public boolean hasRun() { + return deploymentTargetCase_ == 18; + } + /** + * + * + *
+     * Information specifying a Cloud Run deployment target.
+     * 
+ * + * .google.cloud.deploy.v1.CloudRunLocation run = 18; + * + * @return The run. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.CloudRunLocation getRun() { + if (runBuilder_ == null) { + if (deploymentTargetCase_ == 18) { + return (com.google.cloud.deploy.v1.CloudRunLocation) deploymentTarget_; + } + return com.google.cloud.deploy.v1.CloudRunLocation.getDefaultInstance(); + } else { + if (deploymentTargetCase_ == 18) { + return runBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.CloudRunLocation.getDefaultInstance(); + } + } + /** + * + * + *
+     * Information specifying a Cloud Run deployment target.
+     * 
+ * + * .google.cloud.deploy.v1.CloudRunLocation run = 18; + */ + public Builder setRun(com.google.cloud.deploy.v1.CloudRunLocation value) { + if (runBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deploymentTarget_ = value; + onChanged(); + } else { + runBuilder_.setMessage(value); + } + deploymentTargetCase_ = 18; + return this; + } + /** + * + * + *
+     * Information specifying a Cloud Run deployment target.
+     * 
+ * + * .google.cloud.deploy.v1.CloudRunLocation run = 18; + */ + public Builder setRun(com.google.cloud.deploy.v1.CloudRunLocation.Builder builderForValue) { + if (runBuilder_ == null) { + deploymentTarget_ = builderForValue.build(); + onChanged(); + } else { + runBuilder_.setMessage(builderForValue.build()); + } + deploymentTargetCase_ = 18; + return this; + } + /** + * + * + *
+     * Information specifying a Cloud Run deployment target.
+     * 
+ * + * .google.cloud.deploy.v1.CloudRunLocation run = 18; + */ + public Builder mergeRun(com.google.cloud.deploy.v1.CloudRunLocation value) { + if (runBuilder_ == null) { + if (deploymentTargetCase_ == 18 + && deploymentTarget_ + != com.google.cloud.deploy.v1.CloudRunLocation.getDefaultInstance()) { + deploymentTarget_ = + com.google.cloud.deploy.v1.CloudRunLocation.newBuilder( + (com.google.cloud.deploy.v1.CloudRunLocation) deploymentTarget_) + .mergeFrom(value) + .buildPartial(); + } else { + deploymentTarget_ = value; + } + onChanged(); + } else { + if (deploymentTargetCase_ == 18) { + runBuilder_.mergeFrom(value); + } else { + runBuilder_.setMessage(value); + } + } + deploymentTargetCase_ = 18; + return this; + } + /** + * + * + *
+     * Information specifying a Cloud Run deployment target.
+     * 
+ * + * .google.cloud.deploy.v1.CloudRunLocation run = 18; + */ + public Builder clearRun() { + if (runBuilder_ == null) { + if (deploymentTargetCase_ == 18) { + deploymentTargetCase_ = 0; + deploymentTarget_ = null; + onChanged(); + } + } else { + if (deploymentTargetCase_ == 18) { + deploymentTargetCase_ = 0; + deploymentTarget_ = null; + } + runBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Information specifying a Cloud Run deployment target.
+     * 
+ * + * .google.cloud.deploy.v1.CloudRunLocation run = 18; + */ + public com.google.cloud.deploy.v1.CloudRunLocation.Builder getRunBuilder() { + return getRunFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Information specifying a Cloud Run deployment target.
+     * 
+ * + * .google.cloud.deploy.v1.CloudRunLocation run = 18; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.CloudRunLocationOrBuilder getRunOrBuilder() { + if ((deploymentTargetCase_ == 18) && (runBuilder_ != null)) { + return runBuilder_.getMessageOrBuilder(); + } else { + if (deploymentTargetCase_ == 18) { + return (com.google.cloud.deploy.v1.CloudRunLocation) deploymentTarget_; + } + return com.google.cloud.deploy.v1.CloudRunLocation.getDefaultInstance(); + } + } + /** + * + * + *
+     * Information specifying a Cloud Run deployment target.
+     * 
+ * + * .google.cloud.deploy.v1.CloudRunLocation run = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.CloudRunLocation, + com.google.cloud.deploy.v1.CloudRunLocation.Builder, + com.google.cloud.deploy.v1.CloudRunLocationOrBuilder> + getRunFieldBuilder() { + if (runBuilder_ == null) { + if (!(deploymentTargetCase_ == 18)) { + deploymentTarget_ = com.google.cloud.deploy.v1.CloudRunLocation.getDefaultInstance(); + } + runBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.CloudRunLocation, + com.google.cloud.deploy.v1.CloudRunLocation.Builder, + com.google.cloud.deploy.v1.CloudRunLocationOrBuilder>( + (com.google.cloud.deploy.v1.CloudRunLocation) deploymentTarget_, + getParentForChildren(), + isClean()); + deploymentTarget_ = null; + } + deploymentTargetCase_ = 18; + onChanged(); + ; + return runBuilder_; + } + private java.lang.Object etag_ = ""; /** * @@ -4128,7 +4348,18 @@ public Target parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Target(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetArtifact.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetArtifact.java index 329c747..017b6f4 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetArtifact.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetArtifact.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetArtifact( - 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 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - skaffoldConfigPath_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - manifestPath_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - uriCase_ = 4; - uri_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_TargetArtifact_descriptor; @@ -369,7 +309,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (uriCase_ == 4) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, uri_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -387,7 +327,7 @@ public int getSerializedSize() { if (uriCase_ == 4) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, uri_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -413,7 +353,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -436,7 +376,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -565,17 +505,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.TargetArtifact.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -690,7 +623,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.TargetArtifact other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -705,17 +638,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.TargetArtifact parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + skaffoldConfigPath_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + manifestPath_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + uriCase_ = 4; + uri_ = s; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.TargetArtifact) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1123,7 +1089,18 @@ public TargetArtifact parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetArtifact(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetNotificationEvent.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetNotificationEvent.java index cc5e81d..59447bf 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetNotificationEvent.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetNotificationEvent.java @@ -56,66 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetNotificationEvent( - 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(); - - message_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - target_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.TargetNotificationPayloadProto .internal_static_google_cloud_deploy_v1_TargetNotificationEvent_descriptor; @@ -287,7 +227,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (type_ != com.google.cloud.deploy.v1.Type.TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(3, type_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -305,7 +245,7 @@ public int getSerializedSize() { if (type_ != com.google.cloud.deploy.v1.Type.TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -324,7 +264,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMessage().equals(other.getMessage())) return false; if (!getTarget().equals(other.getTarget())) return false; if (type_ != other.type_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -341,7 +281,7 @@ public int hashCode() { hash = (53 * hash) + getTarget().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -472,17 +412,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.TargetNotificationEvent.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -585,7 +518,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.TargetNotificationEvent othe if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -600,18 +533,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.TargetNotificationEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + message_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + target_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + type_ = input.readEnum(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.deploy.v1.TargetNotificationEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -949,7 +913,18 @@ public TargetNotificationEvent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetNotificationEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetOrBuilder.java index b19fd16..3e0b87e 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetOrBuilder.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetOrBuilder.java @@ -467,6 +467,41 @@ java.lang.String getLabelsOrDefault( */ com.google.cloud.deploy.v1.AnthosClusterOrBuilder getAnthosClusterOrBuilder(); + /** + * + * + *
+   * Information specifying a Cloud Run deployment target.
+   * 
+ * + * .google.cloud.deploy.v1.CloudRunLocation run = 18; + * + * @return Whether the run field is set. + */ + boolean hasRun(); + /** + * + * + *
+   * Information specifying a Cloud Run deployment target.
+   * 
+ * + * .google.cloud.deploy.v1.CloudRunLocation run = 18; + * + * @return The run. + */ + com.google.cloud.deploy.v1.CloudRunLocation getRun(); + /** + * + * + *
+   * Information specifying a Cloud Run deployment target.
+   * 
+ * + * .google.cloud.deploy.v1.CloudRunLocation run = 18; + */ + com.google.cloud.deploy.v1.CloudRunLocationOrBuilder getRunOrBuilder(); + /** * * diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentCondition.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentCondition.java index d0807b5..a1a71f6 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentCondition.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentCondition.java @@ -53,79 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetsPresentCondition( - 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 8: - { - status_ = input.readBool(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - missingTargets_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - missingTargets_.add(s); - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - missingTargets_ = missingTargets_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_TargetsPresentCondition_descriptor; @@ -293,7 +220,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateTime_ != null) { output.writeMessage(4, getUpdateTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -316,7 +243,7 @@ public int getSerializedSize() { if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -338,7 +265,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateTime()) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -359,7 +286,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getUpdateTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -489,17 +416,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.TargetsPresentCondition.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -620,7 +540,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.TargetsPresentCondition othe if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -635,18 +555,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.TargetsPresentCondition parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + status_ = input.readBool(); + + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureMissingTargetsIsMutable(); + missingTargets_.add(s); + break; + } // case 18 + case 34: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.deploy.v1.TargetsPresentCondition) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1096,7 +1048,18 @@ public TargetsPresentCondition parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetsPresentCondition(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateDeliveryPipelineRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateDeliveryPipelineRequest.java index 6bf7eb0..356cc3b 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateDeliveryPipelineRequest.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateDeliveryPipelineRequest.java @@ -52,93 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateDeliveryPipelineRequest( - 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.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.deploy.v1.DeliveryPipeline.Builder subBuilder = null; - if (deliveryPipeline_ != null) { - subBuilder = deliveryPipeline_.toBuilder(); - } - deliveryPipeline_ = - input.readMessage( - com.google.cloud.deploy.v1.DeliveryPipeline.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deliveryPipeline_); - deliveryPipeline_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = s; - break; - } - case 32: - { - allowMissing_ = input.readBool(); - break; - } - case 40: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_UpdateDeliveryPipelineRequest_descriptor; @@ -405,7 +318,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(5, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -429,7 +342,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -456,7 +369,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; if (getAllowMissing() != other.getAllowMissing()) return false; if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -481,7 +394,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -611,17 +524,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -751,7 +657,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.UpdateDeliveryPipelineReques if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -766,18 +672,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage( + getDeliveryPipelineFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: + { + allowMissing_ = input.readBool(); + + break; + } // case 32 + case 40: + { + validateOnly_ = input.readBool(); + + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1511,7 +1461,18 @@ public UpdateDeliveryPipelineRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateDeliveryPipelineRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateTargetRequest.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateTargetRequest.java index 266828b..0a9450c 100644 --- a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateTargetRequest.java +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateTargetRequest.java @@ -52,92 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateTargetRequest( - 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.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.deploy.v1.Target.Builder subBuilder = null; - if (target_ != null) { - subBuilder = target_.toBuilder(); - } - target_ = - input.readMessage(com.google.cloud.deploy.v1.Target.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(target_); - target_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = s; - break; - } - case 32: - { - allowMissing_ = input.readBool(); - break; - } - case 40: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.deploy.v1.CloudDeployProto .internal_static_google_cloud_deploy_v1_UpdateTargetRequest_descriptor; @@ -399,7 +313,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(5, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -423,7 +337,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -450,7 +364,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; if (getAllowMissing() != other.getAllowMissing()) return false; if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -475,7 +389,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -604,17 +518,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.deploy.v1.UpdateTargetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -743,7 +650,7 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.UpdateTargetRequest other) { if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -758,17 +665,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.deploy.v1.UpdateTargetRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getTargetFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: + { + allowMissing_ = input.readBool(); + + break; + } // case 32 + case 40: + { + validateOnly_ = input.readBool(); + + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.deploy.v1.UpdateTargetRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1486,7 +1437,18 @@ public UpdateTargetRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateTargetRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJob.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJob.java new file mode 100644 index 0000000..0426b85 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJob.java @@ -0,0 +1,432 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * A verify Job.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.VerifyJob} + */ +public final class VerifyJob extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.VerifyJob) + VerifyJobOrBuilder { + private static final long serialVersionUID = 0L; + // Use VerifyJob.newBuilder() to construct. + private VerifyJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VerifyJob() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VerifyJob(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_VerifyJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_VerifyJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.VerifyJob.class, + com.google.cloud.deploy.v1.VerifyJob.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.VerifyJob)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.VerifyJob other = (com.google.cloud.deploy.v1.VerifyJob) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.VerifyJob parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.VerifyJob 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.deploy.v1.VerifyJob parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.VerifyJob 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.deploy.v1.VerifyJob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.VerifyJob parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.VerifyJob parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.VerifyJob 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.deploy.v1.VerifyJob parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.VerifyJob 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.deploy.v1.VerifyJob parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.VerifyJob 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.deploy.v1.VerifyJob prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A verify Job.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.VerifyJob} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.VerifyJob) + com.google.cloud.deploy.v1.VerifyJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_VerifyJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_VerifyJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.VerifyJob.class, + com.google.cloud.deploy.v1.VerifyJob.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.VerifyJob.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_VerifyJob_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.VerifyJob getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.VerifyJob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.VerifyJob build() { + com.google.cloud.deploy.v1.VerifyJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.VerifyJob buildPartial() { + com.google.cloud.deploy.v1.VerifyJob result = new com.google.cloud.deploy.v1.VerifyJob(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.VerifyJob) { + return mergeFrom((com.google.cloud.deploy.v1.VerifyJob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.VerifyJob other) { + if (other == com.google.cloud.deploy.v1.VerifyJob.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.VerifyJob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.VerifyJob) + private static final com.google.cloud.deploy.v1.VerifyJob DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.VerifyJob(); + } + + public static com.google.cloud.deploy.v1.VerifyJob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VerifyJob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.VerifyJob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJobOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJobOrBuilder.java new file mode 100644 index 0000000..85c9b9d --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJobOrBuilder.java @@ -0,0 +1,24 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface VerifyJobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.VerifyJob) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJobRun.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJobRun.java new file mode 100644 index 0000000..c53490f --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJobRun.java @@ -0,0 +1,1560 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * VerifyJobRun contains information specific to a verify `JobRun`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.VerifyJobRun} + */ +public final class VerifyJobRun extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.VerifyJobRun) + VerifyJobRunOrBuilder { + private static final long serialVersionUID = 0L; + // Use VerifyJobRun.newBuilder() to construct. + private VerifyJobRun(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VerifyJobRun() { + build_ = ""; + artifactUri_ = ""; + eventLogPath_ = ""; + failureCause_ = 0; + failureMessage_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VerifyJobRun(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_VerifyJobRun_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_VerifyJobRun_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.VerifyJobRun.class, + com.google.cloud.deploy.v1.VerifyJobRun.Builder.class); + } + + /** + * + * + *
+   * Well-known verify failures.
+   * 
+ * + * Protobuf enum {@code google.cloud.deploy.v1.VerifyJobRun.FailureCause} + */ + public enum FailureCause implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No reason for failure is specified.
+     * 
+ * + * FAILURE_CAUSE_UNSPECIFIED = 0; + */ + FAILURE_CAUSE_UNSPECIFIED(0), + /** + * + * + *
+     * Cloud Build is not available, either because it is not enabled or because
+     * Google Cloud Deploy has insufficient permissions. See [required
+     * permission](/deploy/docs/cloud-deploy-service-account#required_permissions).
+     * 
+ * + * CLOUD_BUILD_UNAVAILABLE = 1; + */ + CLOUD_BUILD_UNAVAILABLE(1), + /** + * + * + *
+     * The verify operation did not complete successfully; check Cloud Build
+     * logs.
+     * 
+ * + * EXECUTION_FAILED = 2; + */ + EXECUTION_FAILED(2), + /** + * + * + *
+     * The verify build did not complete within the alloted time.
+     * 
+ * + * DEADLINE_EXCEEDED = 3; + */ + DEADLINE_EXCEEDED(3), + /** + * + * + *
+     * No Skaffold verify configuration was found.
+     * 
+ * + * VERIFICATION_CONFIG_NOT_FOUND = 4; + */ + VERIFICATION_CONFIG_NOT_FOUND(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No reason for failure is specified.
+     * 
+ * + * FAILURE_CAUSE_UNSPECIFIED = 0; + */ + public static final int FAILURE_CAUSE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Cloud Build is not available, either because it is not enabled or because
+     * Google Cloud Deploy has insufficient permissions. See [required
+     * permission](/deploy/docs/cloud-deploy-service-account#required_permissions).
+     * 
+ * + * CLOUD_BUILD_UNAVAILABLE = 1; + */ + public static final int CLOUD_BUILD_UNAVAILABLE_VALUE = 1; + /** + * + * + *
+     * The verify operation did not complete successfully; check Cloud Build
+     * logs.
+     * 
+ * + * EXECUTION_FAILED = 2; + */ + public static final int EXECUTION_FAILED_VALUE = 2; + /** + * + * + *
+     * The verify build did not complete within the alloted time.
+     * 
+ * + * DEADLINE_EXCEEDED = 3; + */ + public static final int DEADLINE_EXCEEDED_VALUE = 3; + /** + * + * + *
+     * No Skaffold verify configuration was found.
+     * 
+ * + * VERIFICATION_CONFIG_NOT_FOUND = 4; + */ + public static final int VERIFICATION_CONFIG_NOT_FOUND_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FailureCause 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 FailureCause forNumber(int value) { + switch (value) { + case 0: + return FAILURE_CAUSE_UNSPECIFIED; + case 1: + return CLOUD_BUILD_UNAVAILABLE; + case 2: + return EXECUTION_FAILED; + case 3: + return DEADLINE_EXCEEDED; + case 4: + return VERIFICATION_CONFIG_NOT_FOUND; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FailureCause findValueByNumber(int number) { + return FailureCause.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.deploy.v1.VerifyJobRun.getDescriptor().getEnumTypes().get(0); + } + + private static final FailureCause[] VALUES = values(); + + public static FailureCause 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 FailureCause(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.deploy.v1.VerifyJobRun.FailureCause) + } + + public static final int BUILD_FIELD_NUMBER = 1; + private volatile java.lang.Object build_; + /** + * + * + *
+   * Output only. The resource name of the Cloud Build `Build` object that is used to verify.
+   * Format is projects/{project}/locations/{location}/builds/{build}.
+   * 
+ * + * + * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The build. + */ + @java.lang.Override + public java.lang.String getBuild() { + java.lang.Object ref = build_; + 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(); + build_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the Cloud Build `Build` object that is used to verify.
+   * Format is projects/{project}/locations/{location}/builds/{build}.
+   * 
+ * + * + * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for build. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBuildBytes() { + java.lang.Object ref = build_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + build_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARTIFACT_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object artifactUri_; + /** + * + * + *
+   * Output only. URI of a directory containing the verify artifacts. This contains the
+   * Skaffold event log.
+   * 
+ * + * string artifact_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The artifactUri. + */ + @java.lang.Override + public java.lang.String getArtifactUri() { + java.lang.Object ref = artifactUri_; + 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(); + artifactUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. URI of a directory containing the verify artifacts. This contains the
+   * Skaffold event log.
+   * 
+ * + * string artifact_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for artifactUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getArtifactUriBytes() { + java.lang.Object ref = artifactUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVENT_LOG_PATH_FIELD_NUMBER = 3; + private volatile java.lang.Object eventLogPath_; + /** + * + * + *
+   * Output only. File path of the Skaffold event log relative to the artifact URI.
+   * 
+ * + * string event_log_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The eventLogPath. + */ + @java.lang.Override + public java.lang.String getEventLogPath() { + java.lang.Object ref = eventLogPath_; + 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(); + eventLogPath_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. File path of the Skaffold event log relative to the artifact URI.
+   * 
+ * + * string event_log_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for eventLogPath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEventLogPathBytes() { + java.lang.Object ref = eventLogPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventLogPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FAILURE_CAUSE_FIELD_NUMBER = 4; + private int failureCause_; + /** + * + * + *
+   * Output only. The reason the verify failed. This will always be unspecified while the
+   * verify is in progress or if it succeeded.
+   * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun.FailureCause failure_cause = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for failureCause. + */ + @java.lang.Override + public int getFailureCauseValue() { + return failureCause_; + } + /** + * + * + *
+   * Output only. The reason the verify failed. This will always be unspecified while the
+   * verify is in progress or if it succeeded.
+   * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun.FailureCause failure_cause = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The failureCause. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.VerifyJobRun.FailureCause getFailureCause() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.VerifyJobRun.FailureCause result = + com.google.cloud.deploy.v1.VerifyJobRun.FailureCause.valueOf(failureCause_); + return result == null + ? com.google.cloud.deploy.v1.VerifyJobRun.FailureCause.UNRECOGNIZED + : result; + } + + public static final int FAILURE_MESSAGE_FIELD_NUMBER = 5; + private volatile java.lang.Object failureMessage_; + /** + * + * + *
+   * Output only. Additional information about the verify failure, if available.
+   * 
+ * + * string failure_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failureMessage. + */ + @java.lang.Override + public java.lang.String getFailureMessage() { + java.lang.Object ref = failureMessage_; + 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(); + failureMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Additional information about the verify failure, if available.
+   * 
+ * + * string failure_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for failureMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFailureMessageBytes() { + java.lang.Object ref = failureMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + failureMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(build_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, build_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, artifactUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventLogPath_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, eventLogPath_); + } + if (failureCause_ + != com.google.cloud.deploy.v1.VerifyJobRun.FailureCause.FAILURE_CAUSE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, failureCause_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(failureMessage_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, failureMessage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(build_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, build_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, artifactUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventLogPath_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, eventLogPath_); + } + if (failureCause_ + != com.google.cloud.deploy.v1.VerifyJobRun.FailureCause.FAILURE_CAUSE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, failureCause_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(failureMessage_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, failureMessage_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.VerifyJobRun)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.VerifyJobRun other = (com.google.cloud.deploy.v1.VerifyJobRun) obj; + + if (!getBuild().equals(other.getBuild())) return false; + if (!getArtifactUri().equals(other.getArtifactUri())) return false; + if (!getEventLogPath().equals(other.getEventLogPath())) return false; + if (failureCause_ != other.failureCause_) return false; + if (!getFailureMessage().equals(other.getFailureMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BUILD_FIELD_NUMBER; + hash = (53 * hash) + getBuild().hashCode(); + hash = (37 * hash) + ARTIFACT_URI_FIELD_NUMBER; + hash = (53 * hash) + getArtifactUri().hashCode(); + hash = (37 * hash) + EVENT_LOG_PATH_FIELD_NUMBER; + hash = (53 * hash) + getEventLogPath().hashCode(); + hash = (37 * hash) + FAILURE_CAUSE_FIELD_NUMBER; + hash = (53 * hash) + failureCause_; + hash = (37 * hash) + FAILURE_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getFailureMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.VerifyJobRun parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.VerifyJobRun 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.deploy.v1.VerifyJobRun parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.VerifyJobRun 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.deploy.v1.VerifyJobRun parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.VerifyJobRun parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.deploy.v1.VerifyJobRun parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.VerifyJobRun 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.deploy.v1.VerifyJobRun parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.VerifyJobRun 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.deploy.v1.VerifyJobRun parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.VerifyJobRun 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.deploy.v1.VerifyJobRun 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; + } + /** + * + * + *
+   * VerifyJobRun contains information specific to a verify `JobRun`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.VerifyJobRun} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.VerifyJobRun) + com.google.cloud.deploy.v1.VerifyJobRunOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_VerifyJobRun_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_VerifyJobRun_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.VerifyJobRun.class, + com.google.cloud.deploy.v1.VerifyJobRun.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.VerifyJobRun.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + build_ = ""; + + artifactUri_ = ""; + + eventLogPath_ = ""; + + failureCause_ = 0; + + failureMessage_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_VerifyJobRun_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.VerifyJobRun getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.VerifyJobRun.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.VerifyJobRun build() { + com.google.cloud.deploy.v1.VerifyJobRun result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.VerifyJobRun buildPartial() { + com.google.cloud.deploy.v1.VerifyJobRun result = + new com.google.cloud.deploy.v1.VerifyJobRun(this); + result.build_ = build_; + result.artifactUri_ = artifactUri_; + result.eventLogPath_ = eventLogPath_; + result.failureCause_ = failureCause_; + result.failureMessage_ = failureMessage_; + 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.deploy.v1.VerifyJobRun) { + return mergeFrom((com.google.cloud.deploy.v1.VerifyJobRun) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.VerifyJobRun other) { + if (other == com.google.cloud.deploy.v1.VerifyJobRun.getDefaultInstance()) return this; + if (!other.getBuild().isEmpty()) { + build_ = other.build_; + onChanged(); + } + if (!other.getArtifactUri().isEmpty()) { + artifactUri_ = other.artifactUri_; + onChanged(); + } + if (!other.getEventLogPath().isEmpty()) { + eventLogPath_ = other.eventLogPath_; + onChanged(); + } + if (other.failureCause_ != 0) { + setFailureCauseValue(other.getFailureCauseValue()); + } + if (!other.getFailureMessage().isEmpty()) { + failureMessage_ = other.failureMessage_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + build_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + artifactUri_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + eventLogPath_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: + { + failureCause_ = input.readEnum(); + + break; + } // case 32 + case 42: + { + failureMessage_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object build_ = ""; + /** + * + * + *
+     * Output only. The resource name of the Cloud Build `Build` object that is used to verify.
+     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * 
+ * + * + * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The build. + */ + public java.lang.String getBuild() { + java.lang.Object ref = build_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + build_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the Cloud Build `Build` object that is used to verify.
+     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * 
+ * + * + * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for build. + */ + public com.google.protobuf.ByteString getBuildBytes() { + java.lang.Object ref = build_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + build_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the Cloud Build `Build` object that is used to verify.
+     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * 
+ * + * + * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The build to set. + * @return This builder for chaining. + */ + public Builder setBuild(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + build_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the Cloud Build `Build` object that is used to verify.
+     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * 
+ * + * + * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearBuild() { + + build_ = getDefaultInstance().getBuild(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the Cloud Build `Build` object that is used to verify.
+     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * 
+ * + * + * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for build to set. + * @return This builder for chaining. + */ + public Builder setBuildBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + build_ = value; + onChanged(); + return this; + } + + private java.lang.Object artifactUri_ = ""; + /** + * + * + *
+     * Output only. URI of a directory containing the verify artifacts. This contains the
+     * Skaffold event log.
+     * 
+ * + * string artifact_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The artifactUri. + */ + public java.lang.String getArtifactUri() { + java.lang.Object ref = artifactUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artifactUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. URI of a directory containing the verify artifacts. This contains the
+     * Skaffold event log.
+     * 
+ * + * string artifact_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for artifactUri. + */ + public com.google.protobuf.ByteString getArtifactUriBytes() { + java.lang.Object ref = artifactUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + artifactUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. URI of a directory containing the verify artifacts. This contains the
+     * Skaffold event log.
+     * 
+ * + * string artifact_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The artifactUri to set. + * @return This builder for chaining. + */ + public Builder setArtifactUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + artifactUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. URI of a directory containing the verify artifacts. This contains the
+     * Skaffold event log.
+     * 
+ * + * string artifact_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearArtifactUri() { + + artifactUri_ = getDefaultInstance().getArtifactUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. URI of a directory containing the verify artifacts. This contains the
+     * Skaffold event log.
+     * 
+ * + * string artifact_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for artifactUri to set. + * @return This builder for chaining. + */ + public Builder setArtifactUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + artifactUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object eventLogPath_ = ""; + /** + * + * + *
+     * Output only. File path of the Skaffold event log relative to the artifact URI.
+     * 
+ * + * string event_log_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The eventLogPath. + */ + public java.lang.String getEventLogPath() { + java.lang.Object ref = eventLogPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventLogPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. File path of the Skaffold event log relative to the artifact URI.
+     * 
+ * + * string event_log_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for eventLogPath. + */ + public com.google.protobuf.ByteString getEventLogPathBytes() { + java.lang.Object ref = eventLogPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventLogPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. File path of the Skaffold event log relative to the artifact URI.
+     * 
+ * + * string event_log_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The eventLogPath to set. + * @return This builder for chaining. + */ + public Builder setEventLogPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + eventLogPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. File path of the Skaffold event log relative to the artifact URI.
+     * 
+ * + * string event_log_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearEventLogPath() { + + eventLogPath_ = getDefaultInstance().getEventLogPath(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. File path of the Skaffold event log relative to the artifact URI.
+     * 
+ * + * string event_log_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for eventLogPath to set. + * @return This builder for chaining. + */ + public Builder setEventLogPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + eventLogPath_ = value; + onChanged(); + return this; + } + + private int failureCause_ = 0; + /** + * + * + *
+     * Output only. The reason the verify failed. This will always be unspecified while the
+     * verify is in progress or if it succeeded.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun.FailureCause failure_cause = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for failureCause. + */ + @java.lang.Override + public int getFailureCauseValue() { + return failureCause_; + } + /** + * + * + *
+     * Output only. The reason the verify failed. This will always be unspecified while the
+     * verify is in progress or if it succeeded.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun.FailureCause failure_cause = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for failureCause to set. + * @return This builder for chaining. + */ + public Builder setFailureCauseValue(int value) { + + failureCause_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The reason the verify failed. This will always be unspecified while the
+     * verify is in progress or if it succeeded.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun.FailureCause failure_cause = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The failureCause. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.VerifyJobRun.FailureCause getFailureCause() { + @SuppressWarnings("deprecation") + com.google.cloud.deploy.v1.VerifyJobRun.FailureCause result = + com.google.cloud.deploy.v1.VerifyJobRun.FailureCause.valueOf(failureCause_); + return result == null + ? com.google.cloud.deploy.v1.VerifyJobRun.FailureCause.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The reason the verify failed. This will always be unspecified while the
+     * verify is in progress or if it succeeded.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun.FailureCause failure_cause = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The failureCause to set. + * @return This builder for chaining. + */ + public Builder setFailureCause(com.google.cloud.deploy.v1.VerifyJobRun.FailureCause value) { + if (value == null) { + throw new NullPointerException(); + } + + failureCause_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The reason the verify failed. This will always be unspecified while the
+     * verify is in progress or if it succeeded.
+     * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun.FailureCause failure_cause = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearFailureCause() { + + failureCause_ = 0; + onChanged(); + return this; + } + + private java.lang.Object failureMessage_ = ""; + /** + * + * + *
+     * Output only. Additional information about the verify failure, if available.
+     * 
+ * + * string failure_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failureMessage. + */ + public java.lang.String getFailureMessage() { + java.lang.Object ref = failureMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + failureMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Additional information about the verify failure, if available.
+     * 
+ * + * string failure_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for failureMessage. + */ + public com.google.protobuf.ByteString getFailureMessageBytes() { + java.lang.Object ref = failureMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + failureMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Additional information about the verify failure, if available.
+     * 
+ * + * string failure_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The failureMessage to set. + * @return This builder for chaining. + */ + public Builder setFailureMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + failureMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional information about the verify failure, if available.
+     * 
+ * + * string failure_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearFailureMessage() { + + failureMessage_ = getDefaultInstance().getFailureMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Additional information about the verify failure, if available.
+     * 
+ * + * string failure_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for failureMessage to set. + * @return This builder for chaining. + */ + public Builder setFailureMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + failureMessage_ = 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.deploy.v1.VerifyJobRun) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.VerifyJobRun) + private static final com.google.cloud.deploy.v1.VerifyJobRun DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.VerifyJobRun(); + } + + public static com.google.cloud.deploy.v1.VerifyJobRun getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VerifyJobRun parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.VerifyJobRun getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJobRunOrBuilder.java b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJobRunOrBuilder.java new file mode 100644 index 0000000..dbeb1bd --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJobRunOrBuilder.java @@ -0,0 +1,164 @@ +/* + * 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/deploy/v1/cloud_deploy.proto + +package com.google.cloud.deploy.v1; + +public interface VerifyJobRunOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.VerifyJobRun) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the Cloud Build `Build` object that is used to verify.
+   * Format is projects/{project}/locations/{location}/builds/{build}.
+   * 
+ * + * + * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The build. + */ + java.lang.String getBuild(); + /** + * + * + *
+   * Output only. The resource name of the Cloud Build `Build` object that is used to verify.
+   * Format is projects/{project}/locations/{location}/builds/{build}.
+   * 
+ * + * + * string build = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for build. + */ + com.google.protobuf.ByteString getBuildBytes(); + + /** + * + * + *
+   * Output only. URI of a directory containing the verify artifacts. This contains the
+   * Skaffold event log.
+   * 
+ * + * string artifact_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The artifactUri. + */ + java.lang.String getArtifactUri(); + /** + * + * + *
+   * Output only. URI of a directory containing the verify artifacts. This contains the
+   * Skaffold event log.
+   * 
+ * + * string artifact_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for artifactUri. + */ + com.google.protobuf.ByteString getArtifactUriBytes(); + + /** + * + * + *
+   * Output only. File path of the Skaffold event log relative to the artifact URI.
+   * 
+ * + * string event_log_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The eventLogPath. + */ + java.lang.String getEventLogPath(); + /** + * + * + *
+   * Output only. File path of the Skaffold event log relative to the artifact URI.
+   * 
+ * + * string event_log_path = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for eventLogPath. + */ + com.google.protobuf.ByteString getEventLogPathBytes(); + + /** + * + * + *
+   * Output only. The reason the verify failed. This will always be unspecified while the
+   * verify is in progress or if it succeeded.
+   * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun.FailureCause failure_cause = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for failureCause. + */ + int getFailureCauseValue(); + /** + * + * + *
+   * Output only. The reason the verify failed. This will always be unspecified while the
+   * verify is in progress or if it succeeded.
+   * 
+ * + * + * .google.cloud.deploy.v1.VerifyJobRun.FailureCause failure_cause = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The failureCause. + */ + com.google.cloud.deploy.v1.VerifyJobRun.FailureCause getFailureCause(); + + /** + * + * + *
+   * Output only. Additional information about the verify failure, if available.
+   * 
+ * + * string failure_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The failureMessage. + */ + java.lang.String getFailureMessage(); + /** + * + * + *
+   * Output only. Additional information about the verify failure, if available.
+   * 
+ * + * string failure_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for failureMessage. + */ + com.google.protobuf.ByteString getFailureMessageBytes(); +} diff --git a/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/cloud_deploy.proto b/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/cloud_deploy.proto index cf3ebcb..69f8d52 100644 --- a/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/cloud_deploy.proto +++ b/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/cloud_deploy.proto @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; import "google/type/date.proto"; @@ -193,6 +194,15 @@ service CloudDeploy { }; } + // Abandons a Release in the Delivery Pipeline. + rpc AbandonRelease(AbandonReleaseRequest) returns (AbandonReleaseResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}:abandon" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + // Approves a Rollout. rpc ApproveRollout(ApproveRolloutRequest) returns (ApproveRolloutResponse) { option (google.api.http) = { @@ -231,6 +241,31 @@ service CloudDeploy { }; } + // Retries the specified Job in a Rollout. + rpc RetryJob(RetryJobRequest) returns (RetryJobResponse) { + option (google.api.http) = { + post: "/v1/{rollout=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:retryJob" + body: "*" + }; + option (google.api.method_signature) = "rollout,phase_id,job_id"; + } + + // Lists JobRuns in a given project and location. + rpc ListJobRuns(ListJobRunsRequest) returns (ListJobRunsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}/jobRuns" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single JobRun. + rpc GetJobRun(GetJobRunRequest) returns (JobRun) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*/jobRuns/*}" + }; + option (google.api.method_signature) = "name"; + } + // Gets the configuration for a location. rpc GetConfig(GetConfigRequest) returns (Config) { option (google.api.http) = { @@ -261,9 +296,7 @@ message DeliveryPipeline { string description = 3; // User annotations. These attributes can only be set and used by the - // user, and not by Google Cloud Deploy. See - // https://google.aip.dev/128#annotations for more details such as format and - // size limitations. + // user, and not by Google Cloud Deploy. map annotations = 4; // Labels are attributes that can be set and used by both the @@ -300,6 +333,10 @@ message DeliveryPipeline { // fields, and may be sent on update and delete requests to ensure the // client has an up-to-date value before proceeding. string etag = 10; + + // When suspended, no new releases or rollouts can be created, + // but in-progress ones will complete. + bool suspended = 12; } // SerialPipeline defines a sequential set of stages for a `DeliveryPipeline`. @@ -322,6 +359,25 @@ message Stage { // Skaffold profiles to use when rendering the manifest for this stage's // `Target`. repeated string profiles = 2; + + // Optional. The strategy to use for a `Rollout` to this stage. + Strategy strategy = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Strategy contains deployment strategy information. +message Strategy { + // Deployment strategy details. + oneof deployment_strategy { + // Standard deployment strategy executes a single deploy and allows + // verifying the deployment. + Standard standard = 1; + } +} + +// Standard represents the standard deployment strategy. +message Standard { + // Whether to verify a deployment. + bool verify = 1; } // PipelineReadyCondition contains information around the status of the @@ -597,6 +653,9 @@ message Target { // Information specifying an Anthos Cluster. AnthosCluster anthos_cluster = 17; + + // Information specifying a Cloud Run deployment target. + CloudRunLocation run = 18; } // Optional. This checksum is computed by the server based on the value of other @@ -626,6 +685,9 @@ message ExecutionConfig { // Use for deploying and deployment hooks. DEPLOY = 2; + + // Use for deployment verification. + VERIFY = 3; } // Required. Usages when this configuration should be applied. @@ -661,6 +723,11 @@ message ExecutionConfig { // ("gs://my-bucket/my-dir"). // If unspecified, a default bucket located in the same region will be used. string artifact_storage = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and + // 24h in seconds format. + // If unspecified, a default timeout of 1h is used. + google.protobuf.Duration execution_timeout = 7 [(google.api.field_behavior) = OPTIONAL]; } // Execution using the default Cloud Build pool. @@ -729,6 +796,18 @@ message AnthosCluster { }]; } +// Information specifying where to deploy a Cloud Run Service. +message CloudRunLocation { + // Required. The location for the Cloud Run Service. Format must be + // `projects/{project}/locations/{location}`. + string location = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; +} + // The request object for `ListTargets`. message ListTargetsRequest { // Required. The parent, which owns this collection of targets. Format must be @@ -947,7 +1026,7 @@ message Release { FAILURE_CAUSE_UNSPECIFIED = 0; // Cloud Build is not available, either because it is not enabled or - // because Cloud Deploy has insufficient permissions. See [required + // because Google Cloud Deploy has insufficient permissions. See [required // permission](/deploy/docs/cloud-deploy-service-account#required_permissions). CLOUD_BUILD_UNAVAILABLE = 1; @@ -972,6 +1051,9 @@ message Release { // Output only. Reason this render failed. This will always be unspecified while the // render in progress. FailureCause failure_cause = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the render failure, if available. + string failure_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Optional. Name of the `Release`. Format is projects/{project}/ @@ -1005,6 +1087,9 @@ message Release { // Both keys and values are additionally constrained to be <= 128 bytes. map labels = 5; + // Output only. Indicates whether this is an abandoned release. + bool abandoned = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Time at which the `Release` was created. google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -1227,7 +1312,7 @@ message Rollout { PENDING_RELEASE = 7; } - // Well-known deployment failures. + // Well-known rollout failures. enum FailureCause { // No reason for failure is specified. FAILURE_CAUSE_UNSPECIFIED = 0; @@ -1246,6 +1331,12 @@ message Rollout { // Release is in a failed state. RELEASE_FAILED = 4; + + // Release is abandoned. + RELEASE_ABANDONED = 5; + + // No skaffold verify configuration was found. + VERIFICATION_CONFIG_NOT_FOUND = 6; } // Optional. Name of the `Rollout`. Format is projects/{project}/ @@ -1304,7 +1395,7 @@ message Rollout { // Output only. Current state of the `Rollout`. State state = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Reason the build failed. Empty if the build succeeded. + // Output only. Additional information about the rollout failure, if available. string failure_reason = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The resource name of the Cloud Build `Build` object that is used to deploy @@ -1322,9 +1413,148 @@ message Rollout { // client has an up-to-date value before proceeding. string etag = 16; - // Output only. The reason this deploy failed. This will always be unspecified while the - // deploy in progress. + // Output only. The reason this rollout failed. This will always be unspecified while the + // rollout is in progress. FailureCause deploy_failure_cause = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The phases that represent the workflows of this `Rollout`. + repeated Phase phases = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metadata contains information about the rollout. + Metadata metadata = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Metadata includes information associated with a `Rollout`. +message Metadata { + // Output only. The name of the Cloud Run Service that is associated with a `Rollout`. + CloudRunMetadata cloud_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// DeployJobRunMetadata surfaces information associated with a `DeployJobRun` to +// the user. +message DeployJobRunMetadata { + // Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`. + CloudRunMetadata cloud_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// CloudRunMetadata contains information from a Cloud Run deployment. +message CloudRunMetadata { + // Output only. The name of the Cloud Run Service that is associated with a `Rollout`. + // Format is projects/{project}/locations/{location}/services/{service}. + string service = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Cloud Run Service urls that are associated with a `Rollout`. + repeated string service_urls = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Cloud Run Revision id associated with a `Rollout`. + string revision = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Phase represents a collection of jobs that are logically grouped together +// for a `Rollout`. +message Phase { + // Valid states of a Phase. + enum State { + // The Phase has an unspecified state. + STATE_UNSPECIFIED = 0; + + // The Phase is waiting for an earlier Phase(s) to complete. + PENDING = 1; + + // The Phase is in progress. + IN_PROGRESS = 2; + + // The Phase has succeeded. + SUCCEEDED = 3; + + // The Phase has failed. + FAILED = 4; + + // The Phase was aborted. + ABORTED = 5; + } + + // Output only. The ID of the Phase. + string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the Phase. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The job composition of this Phase. + oneof jobs { + // Output only. Deployment job composition. + DeploymentJobs deployment_jobs = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// Deployment job composition. +message DeploymentJobs { + // Output only. The deploy Job. This is the first job run in the phase. + Job deploy_job = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The verify Job. Runs after a deploy if the deploy succeeds. + Job verify_job = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Job represents an operation for a `Rollout`. +message Job { + // Valid states of a Job. + enum State { + // The Job has an unspecified state. + STATE_UNSPECIFIED = 0; + + // The Job is waiting for an earlier Phase(s) or Job(s) to complete. + PENDING = 1; + + // The Job is disabled. + DISABLED = 2; + + // The Job is in progress. + IN_PROGRESS = 3; + + // The Job succeeded. + SUCCEEDED = 4; + + // The Job failed. + FAILED = 5; + + // The Job was aborted. + ABORTED = 6; + } + + // Output only. The ID of the Job. + string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the Job. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the `JobRun` responsible for the most recent invocation of this + // Job. + string job_run = 3 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/JobRun" + } + ]; + + // The type of Job. + oneof job_type { + // Output only. A deploy Job. + DeployJob deploy_job = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A verify Job. + VerifyJob verify_job = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// A deploy Job. +message DeployJob { + +} + +// A verify Job. +message VerifyJob { + } // ListRolloutsRequest is the request object used by `ListRollouts`. @@ -1468,6 +1698,255 @@ message ApproveRolloutResponse { } +// RetryJobRequest is the request object used by `RetryJob`. +message RetryJobRequest { + // Required. Name of the Rollout. Format is + // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ + // releases/{release}/rollouts/{rollout}. + string rollout = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Rollout" + } + ]; + + // Required. The phase ID the Job to retry belongs to. + string phase_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The job ID for the Job to retry. + string job_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The response object from 'RetryJob'. +message RetryJobResponse { + +} + +// The request object used by `AbandonRelease`. +message AbandonReleaseRequest { + // Required. Name of the Release. Format is + // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ + // releases/{release}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Release" + } + ]; +} + +// The response object for `AbandonRelease`. +message AbandonReleaseResponse { + +} + +// A `JobRun` resource in the Google Cloud Deploy API. +// +// A `JobRun` contains information of a single `Rollout` job evaluation. +message JobRun { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/JobRun" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{job_run}" + }; + + // Valid states of a `JobRun`. + enum State { + // The `JobRun` has an unspecified state. + STATE_UNSPECIFIED = 0; + + // The `JobRun` is in progress. + IN_PROGRESS = 1; + + // The `JobRun` has succeeded. + SUCCEEDED = 2; + + // The `JobRun` has failed. + FAILED = 3; + } + + // Optional. Name of the `JobRun`. Format is projects/{project}/locations/{location}/ + // deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/ + // {rollouts}/jobRuns/{uuid}. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Unique identifier of the `JobRun`. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the `Rollout` phase this `JobRun` belongs in. + string phase_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the `Rollout` job this `JobRun` corresponds to. + string job_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `JobRun` was created. + google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `JobRun` was started. + google.protobuf.Timestamp start_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `JobRun` ended. + google.protobuf.Timestamp end_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The current state of the `JobRun`. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The `JobRun` type and the information for that type. + oneof job_run { + // Output only. Information specific to a deploy `JobRun`. + DeployJobRun deploy_job_run = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Information specific to a verify `JobRun`. + VerifyJobRun verify_job_run = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// DeployJobRun contains information specific to a deploy `JobRun`. +message DeployJobRun { + // Well-known deploy failures. + enum FailureCause { + // No reason for failure is specified. + FAILURE_CAUSE_UNSPECIFIED = 0; + + // Cloud Build is not available, either because it is not enabled or because + // Google Cloud Deploy has insufficient permissions. See [Required + // permission](/deploy/docs/cloud-deploy-service-account#required_permissions). + CLOUD_BUILD_UNAVAILABLE = 1; + + // The deploy operation did not complete successfully; check Cloud Build + // logs. + EXECUTION_FAILED = 2; + + // The deploy build did not complete within the alloted time. + DEADLINE_EXCEEDED = 3; + } + + // Output only. The resource name of the Cloud Build `Build` object that is used to deploy. + // Format is projects/{project}/locations/{location}/builds/{build}. + string build = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Build" + } + ]; + + // Output only. The reason the deploy failed. This will always be unspecified while the + // deploy is in progress or if it succeeded. + FailureCause failure_cause = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the deploy failure, if available. + string failure_message = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Metadata containing information about the deploy job run. + DeployJobRunMetadata metadata = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// VerifyJobRun contains information specific to a verify `JobRun`. +message VerifyJobRun { + // Well-known verify failures. + enum FailureCause { + // No reason for failure is specified. + FAILURE_CAUSE_UNSPECIFIED = 0; + + // Cloud Build is not available, either because it is not enabled or because + // Google Cloud Deploy has insufficient permissions. See [required + // permission](/deploy/docs/cloud-deploy-service-account#required_permissions). + CLOUD_BUILD_UNAVAILABLE = 1; + + // The verify operation did not complete successfully; check Cloud Build + // logs. + EXECUTION_FAILED = 2; + + // The verify build did not complete within the alloted time. + DEADLINE_EXCEEDED = 3; + + // No Skaffold verify configuration was found. + VERIFICATION_CONFIG_NOT_FOUND = 4; + } + + // Output only. The resource name of the Cloud Build `Build` object that is used to verify. + // Format is projects/{project}/locations/{location}/builds/{build}. + string build = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Build" + } + ]; + + // Output only. URI of a directory containing the verify artifacts. This contains the + // Skaffold event log. + string artifact_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. File path of the Skaffold event log relative to the artifact URI. + string event_log_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The reason the verify failed. This will always be unspecified while the + // verify is in progress or if it succeeded. + FailureCause failure_cause = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the verify failure, if available. + string failure_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ListJobRunsRequest is the request object used by `ListJobRuns`. +message ListJobRunsRequest { + // Required. The `Rollout` which owns this collection of `JobRun` objects. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Rollout" + } + ]; + + // Optional. The maximum number of `JobRun` objects to return. The service may return + // fewer than this value. If unspecified, at most 50 `JobRun` objects will be + // returned. The maximum value is 1000; values above 1000 will be set to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListJobRuns` call. Provide this + // to retrieve the subsequent page. + // + // When paginating, all other provided parameters match the call that provided + // the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter results to be returned. See https://google.aip.dev/160 for more + // details. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// ListJobRunsResponse is the response object returned by `ListJobRuns`. +message ListJobRunsResponse { + // The `JobRun` objects. + repeated JobRun job_runs = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. If + // this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // Locations that could not be reached + repeated string unreachable = 3; +} + +// GetJobRunRequest is the request object used by `GetJobRun`. +message GetJobRunRequest { + // Required. Name of the `JobRun`. Format must be + // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/JobRun" + } + ]; +} + // Service-wide configuration. message Config { option (google.api.resource) = { diff --git a/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/jobrun_notification_payload.proto b/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/jobrun_notification_payload.proto new file mode 100644 index 0000000..f1e80d6 --- /dev/null +++ b/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/jobrun_notification_payload.proto @@ -0,0 +1,50 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.deploy.v1; + +import "google/cloud/deploy/v1/log_enums.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/deploy/v1;deploy"; +option java_multiple_files = true; +option java_outer_classname = "JobRunNotificationPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/jobrun_notification" +// Platform Log event that describes the failure to send JobRun resource update +// Pub/Sub notification. +message JobRunNotificationEvent { + // Debug message for when a notification fails to send. + string message = 1; + + // The name of the `JobRun`. + string job_run = 2; + + // Unique identifier of the `DeliveryPipeline`. + string pipeline_uid = 3; + + // Unique identifier of the `Release`. + string release_uid = 4; + + // Unique identifier of the `Rollout`. + string rollout_uid = 5; + + // ID of the `Target`. + string target_id = 6; + + // Type of this notification, e.g. for a Pub/Sub failure. + Type type = 7; +} diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/abandonrelease/AsyncAbandonRelease.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/abandonrelease/AsyncAbandonRelease.java new file mode 100644 index 0000000..e8be593 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/abandonrelease/AsyncAbandonRelease.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_abandonrelease_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.deploy.v1.AbandonReleaseRequest; +import com.google.cloud.deploy.v1.AbandonReleaseResponse; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.ReleaseName; + +public class AsyncAbandonRelease { + + public static void main(String[] args) throws Exception { + asyncAbandonRelease(); + } + + public static void asyncAbandonRelease() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + AbandonReleaseRequest request = + AbandonReleaseRequest.newBuilder() + .setName( + ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]") + .toString()) + .build(); + ApiFuture future = + cloudDeployClient.abandonReleaseCallable().futureCall(request); + // Do something. + AbandonReleaseResponse response = future.get(); + } + } +} +// [END deploy_v1_generated_clouddeployclient_abandonrelease_async] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/abandonrelease/SyncAbandonRelease.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/abandonrelease/SyncAbandonRelease.java new file mode 100644 index 0000000..33713fe --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/abandonrelease/SyncAbandonRelease.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_abandonrelease_sync] +import com.google.cloud.deploy.v1.AbandonReleaseRequest; +import com.google.cloud.deploy.v1.AbandonReleaseResponse; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.ReleaseName; + +public class SyncAbandonRelease { + + public static void main(String[] args) throws Exception { + syncAbandonRelease(); + } + + public static void syncAbandonRelease() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + AbandonReleaseRequest request = + AbandonReleaseRequest.newBuilder() + .setName( + ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]") + .toString()) + .build(); + AbandonReleaseResponse response = cloudDeployClient.abandonRelease(request); + } + } +} +// [END deploy_v1_generated_clouddeployclient_abandonrelease_sync] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/abandonrelease/SyncAbandonReleaseReleasename.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/abandonrelease/SyncAbandonReleaseReleasename.java new file mode 100644 index 0000000..01c48a7 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/abandonrelease/SyncAbandonReleaseReleasename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_abandonrelease_releasename_sync] +import com.google.cloud.deploy.v1.AbandonReleaseResponse; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.ReleaseName; + +public class SyncAbandonReleaseReleasename { + + public static void main(String[] args) throws Exception { + syncAbandonReleaseReleasename(); + } + + public static void syncAbandonReleaseReleasename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + ReleaseName name = + ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]"); + AbandonReleaseResponse response = cloudDeployClient.abandonRelease(name); + } + } +} +// [END deploy_v1_generated_clouddeployclient_abandonrelease_releasename_sync] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/abandonrelease/SyncAbandonReleaseString.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/abandonrelease/SyncAbandonReleaseString.java new file mode 100644 index 0000000..1469d99 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/abandonrelease/SyncAbandonReleaseString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_abandonrelease_string_sync] +import com.google.cloud.deploy.v1.AbandonReleaseResponse; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.ReleaseName; + +public class SyncAbandonReleaseString { + + public static void main(String[] args) throws Exception { + syncAbandonReleaseString(); + } + + public static void syncAbandonReleaseString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + String name = + ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]").toString(); + AbandonReleaseResponse response = cloudDeployClient.abandonRelease(name); + } + } +} +// [END deploy_v1_generated_clouddeployclient_abandonrelease_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getiampolicy/AsyncGetIamPolicy.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 0000000..8a07583 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_getiampolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = cloudDeployClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END deploy_v1_generated_clouddeployclient_getiampolicy_async] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getiampolicy/SyncGetIamPolicy.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 0000000..0592b8f --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_getiampolicy_sync] +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = cloudDeployClient.getIamPolicy(request); + } + } +} +// [END deploy_v1_generated_clouddeployclient_getiampolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getjobrun/AsyncGetJobRun.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getjobrun/AsyncGetJobRun.java new file mode 100644 index 0000000..08cd51d --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getjobrun/AsyncGetJobRun.java @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_getjobrun_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.GetJobRunRequest; +import com.google.cloud.deploy.v1.JobRun; +import com.google.cloud.deploy.v1.JobRunName; + +public class AsyncGetJobRun { + + public static void main(String[] args) throws Exception { + asyncGetJobRun(); + } + + public static void asyncGetJobRun() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + GetJobRunRequest request = + GetJobRunRequest.newBuilder() + .setName( + JobRunName.of( + "[PROJECT]", + "[LOCATION]", + "[DELIVERY_PIPELINE]", + "[RELEASE]", + "[ROLLOUT]", + "[JOB_RUN]") + .toString()) + .build(); + ApiFuture future = cloudDeployClient.getJobRunCallable().futureCall(request); + // Do something. + JobRun response = future.get(); + } + } +} +// [END deploy_v1_generated_clouddeployclient_getjobrun_async] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getjobrun/SyncGetJobRun.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getjobrun/SyncGetJobRun.java new file mode 100644 index 0000000..ec3653d --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getjobrun/SyncGetJobRun.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_getjobrun_sync] +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.GetJobRunRequest; +import com.google.cloud.deploy.v1.JobRun; +import com.google.cloud.deploy.v1.JobRunName; + +public class SyncGetJobRun { + + public static void main(String[] args) throws Exception { + syncGetJobRun(); + } + + public static void syncGetJobRun() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + GetJobRunRequest request = + GetJobRunRequest.newBuilder() + .setName( + JobRunName.of( + "[PROJECT]", + "[LOCATION]", + "[DELIVERY_PIPELINE]", + "[RELEASE]", + "[ROLLOUT]", + "[JOB_RUN]") + .toString()) + .build(); + JobRun response = cloudDeployClient.getJobRun(request); + } + } +} +// [END deploy_v1_generated_clouddeployclient_getjobrun_sync] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getjobrun/SyncGetJobRunJobrunname.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getjobrun/SyncGetJobRunJobrunname.java new file mode 100644 index 0000000..df14c78 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getjobrun/SyncGetJobRunJobrunname.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_getjobrun_jobrunname_sync] +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.JobRun; +import com.google.cloud.deploy.v1.JobRunName; + +public class SyncGetJobRunJobrunname { + + public static void main(String[] args) throws Exception { + syncGetJobRunJobrunname(); + } + + public static void syncGetJobRunJobrunname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + JobRunName name = + JobRunName.of( + "[PROJECT]", + "[LOCATION]", + "[DELIVERY_PIPELINE]", + "[RELEASE]", + "[ROLLOUT]", + "[JOB_RUN]"); + JobRun response = cloudDeployClient.getJobRun(name); + } + } +} +// [END deploy_v1_generated_clouddeployclient_getjobrun_jobrunname_sync] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getjobrun/SyncGetJobRunString.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getjobrun/SyncGetJobRunString.java new file mode 100644 index 0000000..91c1eb1 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getjobrun/SyncGetJobRunString.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_getjobrun_string_sync] +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.JobRun; +import com.google.cloud.deploy.v1.JobRunName; + +public class SyncGetJobRunString { + + public static void main(String[] args) throws Exception { + syncGetJobRunString(); + } + + public static void syncGetJobRunString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + String name = + JobRunName.of( + "[PROJECT]", + "[LOCATION]", + "[DELIVERY_PIPELINE]", + "[RELEASE]", + "[ROLLOUT]", + "[JOB_RUN]") + .toString(); + JobRun response = cloudDeployClient.getJobRun(name); + } + } +} +// [END deploy_v1_generated_clouddeployclient_getjobrun_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getlocation/AsyncGetLocation.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getlocation/AsyncGetLocation.java new file mode 100644 index 0000000..c5c3cf4 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_getlocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = cloudDeployClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END deploy_v1_generated_clouddeployclient_getlocation_async] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getlocation/SyncGetLocation.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getlocation/SyncGetLocation.java new file mode 100644 index 0000000..d658015 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_getlocation_sync] +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = cloudDeployClient.getLocation(request); + } + } +} +// [END deploy_v1_generated_clouddeployclient_getlocation_sync] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listjobruns/AsyncListJobRuns.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listjobruns/AsyncListJobRuns.java new file mode 100644 index 0000000..9350003 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listjobruns/AsyncListJobRuns.java @@ -0,0 +1,62 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_listjobruns_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.JobRun; +import com.google.cloud.deploy.v1.ListJobRunsRequest; +import com.google.cloud.deploy.v1.RolloutName; + +public class AsyncListJobRuns { + + public static void main(String[] args) throws Exception { + asyncListJobRuns(); + } + + public static void asyncListJobRuns() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + ListJobRunsRequest request = + ListJobRunsRequest.newBuilder() + .setParent( + RolloutName.of( + "[PROJECT]", + "[LOCATION]", + "[DELIVERY_PIPELINE]", + "[RELEASE]", + "[ROLLOUT]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = cloudDeployClient.listJobRunsPagedCallable().futureCall(request); + // Do something. + for (JobRun element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END deploy_v1_generated_clouddeployclient_listjobruns_async] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listjobruns/AsyncListJobRunsPaged.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listjobruns/AsyncListJobRunsPaged.java new file mode 100644 index 0000000..a93af15 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listjobruns/AsyncListJobRunsPaged.java @@ -0,0 +1,70 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_listjobruns_paged_async] +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.JobRun; +import com.google.cloud.deploy.v1.ListJobRunsRequest; +import com.google.cloud.deploy.v1.ListJobRunsResponse; +import com.google.cloud.deploy.v1.RolloutName; +import com.google.common.base.Strings; + +public class AsyncListJobRunsPaged { + + public static void main(String[] args) throws Exception { + asyncListJobRunsPaged(); + } + + public static void asyncListJobRunsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + ListJobRunsRequest request = + ListJobRunsRequest.newBuilder() + .setParent( + RolloutName.of( + "[PROJECT]", + "[LOCATION]", + "[DELIVERY_PIPELINE]", + "[RELEASE]", + "[ROLLOUT]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListJobRunsResponse response = cloudDeployClient.listJobRunsCallable().call(request); + for (JobRun element : response.getJobRunsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END deploy_v1_generated_clouddeployclient_listjobruns_paged_async] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listjobruns/SyncListJobRuns.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listjobruns/SyncListJobRuns.java new file mode 100644 index 0000000..2a239d7 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listjobruns/SyncListJobRuns.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_listjobruns_sync] +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.JobRun; +import com.google.cloud.deploy.v1.ListJobRunsRequest; +import com.google.cloud.deploy.v1.RolloutName; + +public class SyncListJobRuns { + + public static void main(String[] args) throws Exception { + syncListJobRuns(); + } + + public static void syncListJobRuns() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + ListJobRunsRequest request = + ListJobRunsRequest.newBuilder() + .setParent( + RolloutName.of( + "[PROJECT]", + "[LOCATION]", + "[DELIVERY_PIPELINE]", + "[RELEASE]", + "[ROLLOUT]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (JobRun element : cloudDeployClient.listJobRuns(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END deploy_v1_generated_clouddeployclient_listjobruns_sync] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listjobruns/SyncListJobRunsRolloutname.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listjobruns/SyncListJobRunsRolloutname.java new file mode 100644 index 0000000..0e9ac0f --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listjobruns/SyncListJobRunsRolloutname.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_listjobruns_rolloutname_sync] +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.JobRun; +import com.google.cloud.deploy.v1.RolloutName; + +public class SyncListJobRunsRolloutname { + + public static void main(String[] args) throws Exception { + syncListJobRunsRolloutname(); + } + + public static void syncListJobRunsRolloutname() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + RolloutName parent = + RolloutName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]"); + for (JobRun element : cloudDeployClient.listJobRuns(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END deploy_v1_generated_clouddeployclient_listjobruns_rolloutname_sync] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listjobruns/SyncListJobRunsString.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listjobruns/SyncListJobRunsString.java new file mode 100644 index 0000000..dd6561c --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listjobruns/SyncListJobRunsString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_listjobruns_string_sync] +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.JobRun; +import com.google.cloud.deploy.v1.RolloutName; + +public class SyncListJobRunsString { + + public static void main(String[] args) throws Exception { + syncListJobRunsString(); + } + + public static void syncListJobRunsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + String parent = + RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]") + .toString(); + for (JobRun element : cloudDeployClient.listJobRuns(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END deploy_v1_generated_clouddeployclient_listjobruns_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listlocations/AsyncListLocations.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listlocations/AsyncListLocations.java new file mode 100644 index 0000000..de1dbef --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_listlocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + cloudDeployClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END deploy_v1_generated_clouddeployclient_listlocations_async] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listlocations/AsyncListLocationsPaged.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 0000000..38d3399 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_listlocations_paged_async] +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = cloudDeployClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END deploy_v1_generated_clouddeployclient_listlocations_paged_async] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listlocations/SyncListLocations.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listlocations/SyncListLocations.java new file mode 100644 index 0000000..03468fe --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_listlocations_sync] +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : cloudDeployClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END deploy_v1_generated_clouddeployclient_listlocations_sync] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/retryjob/AsyncRetryJob.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/retryjob/AsyncRetryJob.java new file mode 100644 index 0000000..7ff1adc --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/retryjob/AsyncRetryJob.java @@ -0,0 +1,58 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_retryjob_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.RetryJobRequest; +import com.google.cloud.deploy.v1.RetryJobResponse; +import com.google.cloud.deploy.v1.RolloutName; + +public class AsyncRetryJob { + + public static void main(String[] args) throws Exception { + asyncRetryJob(); + } + + public static void asyncRetryJob() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + RetryJobRequest request = + RetryJobRequest.newBuilder() + .setRollout( + RolloutName.of( + "[PROJECT]", + "[LOCATION]", + "[DELIVERY_PIPELINE]", + "[RELEASE]", + "[ROLLOUT]") + .toString()) + .setPhaseId("phaseId-608264202") + .setJobId("jobId101296568") + .build(); + ApiFuture future = cloudDeployClient.retryJobCallable().futureCall(request); + // Do something. + RetryJobResponse response = future.get(); + } + } +} +// [END deploy_v1_generated_clouddeployclient_retryjob_async] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/retryjob/SyncRetryJob.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/retryjob/SyncRetryJob.java new file mode 100644 index 0000000..3d2bbe4 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/retryjob/SyncRetryJob.java @@ -0,0 +1,55 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_retryjob_sync] +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.RetryJobRequest; +import com.google.cloud.deploy.v1.RetryJobResponse; +import com.google.cloud.deploy.v1.RolloutName; + +public class SyncRetryJob { + + public static void main(String[] args) throws Exception { + syncRetryJob(); + } + + public static void syncRetryJob() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + RetryJobRequest request = + RetryJobRequest.newBuilder() + .setRollout( + RolloutName.of( + "[PROJECT]", + "[LOCATION]", + "[DELIVERY_PIPELINE]", + "[RELEASE]", + "[ROLLOUT]") + .toString()) + .setPhaseId("phaseId-608264202") + .setJobId("jobId101296568") + .build(); + RetryJobResponse response = cloudDeployClient.retryJob(request); + } + } +} +// [END deploy_v1_generated_clouddeployclient_retryjob_sync] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/retryjob/SyncRetryJobRolloutnameStringString.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/retryjob/SyncRetryJobRolloutnameStringString.java new file mode 100644 index 0000000..8a03714 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/retryjob/SyncRetryJobRolloutnameStringString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_retryjob_rolloutnamestringstring_sync] +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.RetryJobResponse; +import com.google.cloud.deploy.v1.RolloutName; + +public class SyncRetryJobRolloutnameStringString { + + public static void main(String[] args) throws Exception { + syncRetryJobRolloutnameStringString(); + } + + public static void syncRetryJobRolloutnameStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + RolloutName rollout = + RolloutName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]"); + String phaseId = "phaseId-608264202"; + String jobId = "jobId101296568"; + RetryJobResponse response = cloudDeployClient.retryJob(rollout, phaseId, jobId); + } + } +} +// [END deploy_v1_generated_clouddeployclient_retryjob_rolloutnamestringstring_sync] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/retryjob/SyncRetryJobStringStringString.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/retryjob/SyncRetryJobStringStringString.java new file mode 100644 index 0000000..1e76345 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/retryjob/SyncRetryJobStringStringString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_retryjob_stringstringstring_sync] +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.RetryJobResponse; +import com.google.cloud.deploy.v1.RolloutName; + +public class SyncRetryJobStringStringString { + + public static void main(String[] args) throws Exception { + syncRetryJobStringStringString(); + } + + public static void syncRetryJobStringStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + String rollout = + RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]") + .toString(); + String phaseId = "phaseId-608264202"; + String jobId = "jobId101296568"; + RetryJobResponse response = cloudDeployClient.retryJob(rollout, phaseId, jobId); + } + } +} +// [END deploy_v1_generated_clouddeployclient_retryjob_stringstringstring_sync] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/setiampolicy/AsyncSetIamPolicy.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 0000000..409b485 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_setiampolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = cloudDeployClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END deploy_v1_generated_clouddeployclient_setiampolicy_async] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/setiampolicy/SyncSetIamPolicy.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 0000000..cf83ff5 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_setiampolicy_sync] +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = cloudDeployClient.setIamPolicy(request); + } + } +} +// [END deploy_v1_generated_clouddeployclient_setiampolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/testiampermissions/AsyncTestIamPermissions.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 0000000..c0cc16d --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,54 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_testiampermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + cloudDeployClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END deploy_v1_generated_clouddeployclient_testiampermissions_async] diff --git a/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/testiampermissions/SyncTestIamPermissions.java b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 0000000..f7f4e49 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeployclient/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.deploy.v1.samples; + +// [START deploy_v1_generated_clouddeployclient_testiampermissions_sync] +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = cloudDeployClient.testIamPermissions(request); + } + } +} +// [END deploy_v1_generated_clouddeployclient_testiampermissions_sync] diff --git a/versions.txt b/versions.txt index 9bf6539..dd761d0 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-deploy:1.1.7:1.1.7 -grpc-google-cloud-deploy-v1:1.1.7:1.1.7 -proto-google-cloud-deploy-v1:1.1.7:1.1.7 +google-cloud-deploy:1.1.8:1.1.8 +grpc-google-cloud-deploy-v1:1.1.8:1.1.8 +proto-google-cloud-deploy-v1:1.1.8:1.1.8