diff --git a/java-deploy/README.md b/java-deploy/README.md index 6a344b8746c6..e83c82a70f42 100644 --- a/java-deploy/README.md +++ b/java-deploy/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.25.0 + 26.26.0 pom import @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-deploy.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-deploy/1.26.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-deploy/1.27.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeployClient.java b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeployClient.java index eed45630a575..497c1e25ac51 100644 --- a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeployClient.java +++ b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeployClient.java @@ -234,7 +234,7 @@ public final OperationsClient getHttpJsonOperationsClient() { * } * * @param parent Required. The parent, which owns this collection of pipelines. Format must be - * projects/{project_id}/locations/{location_name}. + * `projects/{project_id}/locations/{location_name}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListDeliveryPipelinesPagedResponse listDeliveryPipelines(LocationName parent) { @@ -267,7 +267,7 @@ public final ListDeliveryPipelinesPagedResponse listDeliveryPipelines(LocationNa * } * * @param parent Required. The parent, which owns this collection of pipelines. Format must be - * projects/{project_id}/locations/{location_name}. + * `projects/{project_id}/locations/{location_name}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListDeliveryPipelinesPagedResponse listDeliveryPipelines(String parent) { @@ -409,7 +409,7 @@ public final ListDeliveryPipelinesPagedResponse listDeliveryPipelines( * } * * @param name Required. Name of the `DeliveryPipeline`. Format must be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DeliveryPipeline getDeliveryPipeline(DeliveryPipelineName name) { @@ -440,7 +440,7 @@ public final DeliveryPipeline getDeliveryPipeline(DeliveryPipelineName name) { * } * * @param name Required. Name of the `DeliveryPipeline`. Format must be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final DeliveryPipeline getDeliveryPipeline(String name) { @@ -534,7 +534,7 @@ public final DeliveryPipeline getDeliveryPipeline(GetDeliveryPipelineRequest req * } * * @param parent Required. The parent collection in which the `DeliveryPipeline` should be - * created. Format should be projects/{project_id}/locations/{location_name}. + * created. Format should be `projects/{project_id}/locations/{location_name}`. * @param deliveryPipeline Required. The `DeliveryPipeline` to create. * @param deliveryPipelineId Required. ID of the `DeliveryPipeline`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -574,7 +574,7 @@ public final OperationFuture createDelivery * } * * @param parent Required. The parent collection in which the `DeliveryPipeline` should be - * created. Format should be projects/{project_id}/locations/{location_name}. + * created. Format should be `projects/{project_id}/locations/{location_name}`. * @param deliveryPipeline Required. The `DeliveryPipeline` to create. * @param deliveryPipelineId Required. ID of the `DeliveryPipeline`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -845,7 +845,7 @@ public final OperationFuture updateDelivery * } * * @param name Required. The name of the `DeliveryPipeline` to delete. Format should be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteDeliveryPipelineAsync( @@ -877,7 +877,7 @@ public final OperationFuture deleteDeliveryPipelineAsy * } * * @param name Required. The name of the `DeliveryPipeline` to delete. Format should be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteDeliveryPipelineAsync(String name) { @@ -1015,7 +1015,7 @@ public final OperationFuture deleteDeliveryPipelineAsy * } * * @param parent Required. The parent, which owns this collection of targets. Format must be - * projects/{project_id}/locations/{location_name}. + * `projects/{project_id}/locations/{location_name}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTargetsPagedResponse listTargets(LocationName parent) { @@ -1047,7 +1047,7 @@ public final ListTargetsPagedResponse listTargets(LocationName parent) { * } * * @param parent Required. The parent, which owns this collection of targets. Format must be - * projects/{project_id}/locations/{location_name}. + * `projects/{project_id}/locations/{location_name}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTargetsPagedResponse listTargets(String parent) { @@ -1163,6 +1163,157 @@ public final UnaryCallable listTargetsC return stub.listTargetsCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a `Rollout` to roll back the specified target. + * + *

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()) {
+   *   DeliveryPipelineName name =
+   *       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
+   *   String targetId = "targetId-441951604";
+   *   String rolloutId = "rolloutId551248556";
+   *   RollbackTargetResponse response = cloudDeployClient.rollbackTarget(name, targetId, rolloutId);
+   * }
+   * }
+ * + * @param name Required. The `DeliveryPipeline` for which the rollback `Rollout` should be + * created. Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @param targetId Required. ID of the `Target` that is being rolled back. + * @param rolloutId Required. ID of the rollback `Rollout` to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RollbackTargetResponse rollbackTarget( + DeliveryPipelineName name, String targetId, String rolloutId) { + RollbackTargetRequest request = + RollbackTargetRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setTargetId(targetId) + .setRolloutId(rolloutId) + .build(); + return rollbackTarget(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a `Rollout` to roll back the specified target. + * + *

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 =
+   *       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
+   *   String targetId = "targetId-441951604";
+   *   String rolloutId = "rolloutId551248556";
+   *   RollbackTargetResponse response = cloudDeployClient.rollbackTarget(name, targetId, rolloutId);
+   * }
+   * }
+ * + * @param name Required. The `DeliveryPipeline` for which the rollback `Rollout` should be + * created. Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @param targetId Required. ID of the `Target` that is being rolled back. + * @param rolloutId Required. ID of the rollback `Rollout` to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RollbackTargetResponse rollbackTarget( + String name, String targetId, String rolloutId) { + RollbackTargetRequest request = + RollbackTargetRequest.newBuilder() + .setName(name) + .setTargetId(targetId) + .setRolloutId(rolloutId) + .build(); + return rollbackTarget(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a `Rollout` to roll back the specified target. + * + *

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()) {
+   *   RollbackTargetRequest request =
+   *       RollbackTargetRequest.newBuilder()
+   *           .setName(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setTargetId("targetId-441951604")
+   *           .setRolloutId("rolloutId551248556")
+   *           .setReleaseId("releaseId89607042")
+   *           .setRolloutToRollBack("rolloutToRollBack-1195544784")
+   *           .setRollbackConfig(RollbackTargetConfig.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   RollbackTargetResponse response = cloudDeployClient.rollbackTarget(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 RollbackTargetResponse rollbackTarget(RollbackTargetRequest request) { + return rollbackTargetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a `Rollout` to roll back the specified target. + * + *

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()) {
+   *   RollbackTargetRequest request =
+   *       RollbackTargetRequest.newBuilder()
+   *           .setName(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setTargetId("targetId-441951604")
+   *           .setRolloutId("rolloutId551248556")
+   *           .setReleaseId("releaseId89607042")
+   *           .setRolloutToRollBack("rolloutToRollBack-1195544784")
+   *           .setRollbackConfig(RollbackTargetConfig.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       cloudDeployClient.rollbackTargetCallable().futureCall(request);
+   *   // Do something.
+   *   RollbackTargetResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + rollbackTargetCallable() { + return stub.rollbackTargetCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets details of a single Target. @@ -1182,7 +1333,7 @@ public final UnaryCallable listTargetsC * } * * @param name Required. Name of the `Target`. Format must be - * projects/{project_id}/locations/{location_name}/targets/{target_name}. + * `projects/{project_id}/locations/{location_name}/targets/{target_name}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Target getTarget(TargetName name) { @@ -1210,7 +1361,7 @@ public final Target getTarget(TargetName name) { * } * * @param name Required. Name of the `Target`. Format must be - * projects/{project_id}/locations/{location_name}/targets/{target_name}. + * `projects/{project_id}/locations/{location_name}/targets/{target_name}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Target getTarget(String name) { @@ -1294,7 +1445,7 @@ public final UnaryCallable getTargetCallable() { * } * * @param parent Required. The parent collection in which the `Target` should be created. Format - * should be projects/{project_id}/locations/{location_name}. + * should be `projects/{project_id}/locations/{location_name}`. * @param target Required. The `Target` to create. * @param targetId Required. ID of the `Target`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1331,7 +1482,7 @@ public final OperationFuture createTargetAsync( * } * * @param parent Required. The parent collection in which the `Target` should be created. Format - * should be projects/{project_id}/locations/{location_name}. + * should be `projects/{project_id}/locations/{location_name}`. * @param target Required. The `Target` to create. * @param targetId Required. ID of the `Target`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -1593,7 +1744,7 @@ public final UnaryCallable updateTargetCallable( * } * * @param name Required. The name of the `Target` to delete. Format should be - * projects/{project_id}/locations/{location_name}/targets/{target_name}. + * `projects/{project_id}/locations/{location_name}/targets/{target_name}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteTargetAsync(TargetName name) { @@ -1621,7 +1772,7 @@ public final OperationFuture deleteTargetAsync(TargetN * } * * @param name Required. The name of the `Target` to delete. Format should be - * projects/{project_id}/locations/{location_name}/targets/{target_name}. + * `projects/{project_id}/locations/{location_name}/targets/{target_name}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteTargetAsync(String name) { @@ -1921,7 +2072,7 @@ public final UnaryCallable listReleas * } * * @param name Required. Name of the `Release`. Format must be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Release getRelease(ReleaseName name) { @@ -1950,7 +2101,7 @@ public final Release getRelease(ReleaseName name) { * } * * @param name Required. Name of the `Release`. Format must be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Release getRelease(String name) { @@ -2040,7 +2191,7 @@ public final UnaryCallable getReleaseCallable() { * * @param parent Required. The parent collection in which the `Release` should be created. Format * should be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. * @param release Required. The `Release` to create. * @param releaseId Required. ID of the `Release`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2079,7 +2230,7 @@ public final OperationFuture createReleaseAsync( * * @param parent Required. The parent collection in which the `Release` should be created. Format * should be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. * @param release Required. The `Release` to create. * @param releaseId Required. ID of the `Release`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2218,8 +2369,7 @@ public final UnaryCallable createReleaseCallabl * } * * @param name Required. Name of the Release. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}. + * `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) { @@ -2248,8 +2398,7 @@ public final AbandonReleaseResponse abandonRelease(ReleaseName name) { * } * * @param name Required. Name of the Release. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}. + * `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) { @@ -2339,8 +2488,7 @@ public final AbandonReleaseResponse abandonRelease(AbandonReleaseRequest request * } * * @param name Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ApproveRolloutResponse approveRollout(RolloutName name) { @@ -2370,8 +2518,7 @@ public final ApproveRolloutResponse approveRollout(RolloutName name) { * } * * @param name Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ApproveRolloutResponse approveRollout(String name) { @@ -2474,8 +2621,7 @@ public final ApproveRolloutResponse approveRollout(ApproveRolloutRequest request * } * * @param name Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * @param phaseId Required. The phase ID to advance the `Rollout` to. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2510,8 +2656,7 @@ public final AdvanceRolloutResponse advanceRollout(RolloutName name, String phas * } * * @param name Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * @param phaseId Required. The phase ID to advance the `Rollout` to. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -2615,8 +2760,7 @@ public final AdvanceRolloutResponse advanceRollout(AdvanceRolloutRequest request * } * * @param name Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CancelRolloutResponse cancelRollout(RolloutName name) { @@ -2646,8 +2790,7 @@ public final CancelRolloutResponse cancelRollout(RolloutName name) { * } * * @param name Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CancelRolloutResponse cancelRollout(String name) { @@ -2921,7 +3064,7 @@ public final UnaryCallable listRollou * } * * @param name Required. Name of the `Rollout`. Format must be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Rollout getRollout(RolloutName name) { @@ -2951,7 +3094,7 @@ public final Rollout getRollout(RolloutName name) { * } * * @param name Required. Name of the `Rollout`. Format must be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Rollout getRollout(String name) { @@ -3051,7 +3194,7 @@ public final UnaryCallable getRolloutCallable() { * * @param parent Required. The parent collection in which the `Rollout` should be created. Format * should be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. * @param rollout Required. The `Rollout` to create. * @param rolloutId Required. ID of the `Rollout`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -3090,7 +3233,7 @@ public final OperationFuture createRolloutAsync( * * @param parent Required. The parent collection in which the `Rollout` should be created. Format * should be - * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. * @param rollout Required. The `Rollout` to create. * @param rolloutId Required. ID of the `Rollout`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -3235,8 +3378,7 @@ public final UnaryCallable createRolloutCallabl * } * * @param rollout Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * @param phaseId Required. The phase ID the Job to ignore belongs to. * @param jobId Required. The job ID for the Job to ignore. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -3274,8 +3416,7 @@ public final IgnoreJobResponse ignoreJob(RolloutName rollout, String phaseId, St * } * * @param rollout Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * @param phaseId Required. The phase ID the Job to ignore belongs to. * @param jobId Required. The job ID for the Job to ignore. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -3387,8 +3528,7 @@ public final UnaryCallable ignoreJobCallabl * } * * @param rollout Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `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 @@ -3426,8 +3566,7 @@ public final RetryJobResponse retryJob(RolloutName rollout, String phaseId, Stri * } * * @param rollout Required. Name of the Rollout. Format is - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}. + * `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 @@ -3733,7 +3872,7 @@ public final UnaryCallable listJobRunsC * } * * @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}. + * `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) { @@ -3769,7 +3908,7 @@ public final JobRun getJobRun(JobRunName 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}. + * `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) { @@ -3874,8 +4013,7 @@ public final UnaryCallable getJobRunCallable() { * } * * @param name Required. Name of the `JobRun`. Format must be - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TerminateJobRunResponse terminateJobRun(JobRunName name) { @@ -3911,8 +4049,7 @@ public final TerminateJobRunResponse terminateJobRun(JobRunName name) { * } * * @param name Required. Name of the `JobRun`. Format must be - * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - * releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TerminateJobRunResponse terminateJobRun(String name) { @@ -4103,7 +4240,7 @@ public final UnaryCallable getConfigCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists information about the supported locations for this service. + * Creates a new Automation in a given project and location. * *

Sample code: * @@ -4114,29 +4251,36 @@ public final UnaryCallable getConfigCallable() { * // - It may require specifying 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); - * } + * DeliveryPipelineName parent = + * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + * Automation automation = Automation.newBuilder().build(); + * String automationId = "automationId64173202"; + * Automation response = + * cloudDeployClient.createAutomationAsync(parent, automation, automationId).get(); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. The parent collection in which the `Automation` should be created. + * Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @param automation Required. The `Automation` to create. + * @param automationId Required. ID of the `Automation`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { - return listLocationsPagedCallable().call(request); + public final OperationFuture createAutomationAsync( + DeliveryPipelineName parent, Automation automation, String automationId) { + CreateAutomationRequest request = + CreateAutomationRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAutomation(automation) + .setAutomationId(automationId) + .build(); + return createAutomationAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists information about the supported locations for this service. + * Creates a new Automation in a given project and location. * *

Sample code: * @@ -4147,30 +4291,36 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque * // - It may require specifying 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); - * } + * String parent = + * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString(); + * Automation automation = Automation.newBuilder().build(); + * String automationId = "automationId64173202"; + * Automation response = + * cloudDeployClient.createAutomationAsync(parent, automation, automationId).get(); * } * } + * + * @param parent Required. The parent collection in which the `Automation` should be created. + * Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @param automation Required. The `Automation` to create. + * @param automationId Required. ID of the `Automation`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - listLocationsPagedCallable() { - return stub.listLocationsPagedCallable(); + public final OperationFuture createAutomationAsync( + String parent, Automation automation, String automationId) { + CreateAutomationRequest request = + CreateAutomationRequest.newBuilder() + .setParent(parent) + .setAutomation(automation) + .setAutomationId(automationId) + .build(); + return createAutomationAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists information about the supported locations for this service. + * Creates a new Automation in a given project and location. * *

Sample code: * @@ -4181,35 +4331,31 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque * // - It may require specifying 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") + * CreateAutomationRequest request = + * CreateAutomationRequest.newBuilder() + * .setParent( + * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + * .toString()) + * .setAutomationId("automationId64173202") + * .setAutomation(Automation.newBuilder().build()) + * .setRequestId("requestId693933066") + * .setValidateOnly(true) * .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; - * } - * } + * Automation response = cloudDeployClient.createAutomationAsync(request).get(); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable listLocationsCallable() { - return stub.listLocationsCallable(); + public final OperationFuture createAutomationAsync( + CreateAutomationRequest request) { + return createAutomationOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about a location. + * Creates a new Automation in a given project and location. * *

Sample code: * @@ -4220,21 +4366,31 @@ public final UnaryCallable listLoca * // - It may require specifying 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); + * CreateAutomationRequest request = + * CreateAutomationRequest.newBuilder() + * .setParent( + * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + * .toString()) + * .setAutomationId("automationId64173202") + * .setAutomation(Automation.newBuilder().build()) + * .setRequestId("requestId693933066") + * .setValidateOnly(true) + * .build(); + * OperationFuture future = + * cloudDeployClient.createAutomationOperationCallable().futureCall(request); + * // Do something. + * Automation response = future.get(); * } * } - * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Location getLocation(GetLocationRequest request) { - return getLocationCallable().call(request); + public final OperationCallable + createAutomationOperationCallable() { + return stub.createAutomationOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about a location. + * Creates a new Automation in a given project and location. * *

Sample code: * @@ -4245,22 +4401,30 @@ public final Location getLocation(GetLocationRequest 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()) { - * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); - * ApiFuture future = cloudDeployClient.getLocationCallable().futureCall(request); + * CreateAutomationRequest request = + * CreateAutomationRequest.newBuilder() + * .setParent( + * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + * .toString()) + * .setAutomationId("automationId64173202") + * .setAutomation(Automation.newBuilder().build()) + * .setRequestId("requestId693933066") + * .setValidateOnly(true) + * .build(); + * ApiFuture future = + * cloudDeployClient.createAutomationCallable().futureCall(request); * // Do something. - * Location response = future.get(); + * Operation response = future.get(); * } * } */ - public final UnaryCallable getLocationCallable() { - return stub.getLocationCallable(); + public final UnaryCallable createAutomationCallable() { + return stub.createAutomationCallable(); } // 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. + * Updates the parameters of a single Automation resource. * *

Sample code: * @@ -4271,30 +4435,32 @@ public final UnaryCallable getLocationCallable() { * // - It may require specifying 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); + * Automation automation = Automation.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * Automation response = cloudDeployClient.updateAutomationAsync(automation, updateMask).get(); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param automation Required. The `Automation` to update. + * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `Automation` resource by the update. The fields specified in the update_mask are relative + * to the resource, not the full request. A field will be overwritten if it is in the mask. If + * the user does not provide a mask then all fields will be overwritten. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Policy setIamPolicy(SetIamPolicyRequest request) { - return setIamPolicyCallable().call(request); + public final OperationFuture updateAutomationAsync( + Automation automation, FieldMask updateMask) { + UpdateAutomationRequest request = + UpdateAutomationRequest.newBuilder() + .setAutomation(automation) + .setUpdateMask(updateMask) + .build(); + return updateAutomationAsync(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. + * Updates the parameters of a single Automation resource. * *

Sample code: * @@ -4305,28 +4471,29 @@ public final Policy setIamPolicy(SetIamPolicyRequest 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()) { - * SetIamPolicyRequest request = - * SetIamPolicyRequest.newBuilder() - * .setResource( - * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") - * .toString()) - * .setPolicy(Policy.newBuilder().build()) + * UpdateAutomationRequest request = + * UpdateAutomationRequest.newBuilder() * .setUpdateMask(FieldMask.newBuilder().build()) + * .setAutomation(Automation.newBuilder().build()) + * .setRequestId("requestId693933066") + * .setAllowMissing(true) + * .setValidateOnly(true) * .build(); - * ApiFuture future = cloudDeployClient.setIamPolicyCallable().futureCall(request); - * // Do something. - * Policy response = future.get(); + * Automation response = cloudDeployClient.updateAutomationAsync(request).get(); * } * } + * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable setIamPolicyCallable() { - return stub.setIamPolicyCallable(); + public final OperationFuture updateAutomationAsync( + UpdateAutomationRequest request) { + return updateAutomationOperationCallable().futureCall(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. + * Updates the parameters of a single Automation resource. * *

Sample code: * @@ -4337,15 +4504,1204 @@ public final UnaryCallable setIamPolicyCallable() { * // - It may require specifying 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); - * } + * UpdateAutomationRequest request = + * UpdateAutomationRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setAutomation(Automation.newBuilder().build()) + * .setRequestId("requestId693933066") + * .setAllowMissing(true) + * .setValidateOnly(true) + * .build(); + * OperationFuture future = + * cloudDeployClient.updateAutomationOperationCallable().futureCall(request); + * // Do something. + * Automation response = future.get(); + * } + * } + */ + public final OperationCallable + updateAutomationOperationCallable() { + return stub.updateAutomationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single Automation resource. + * + *

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()) {
+   *   UpdateAutomationRequest request =
+   *       UpdateAutomationRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setAutomation(Automation.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       cloudDeployClient.updateAutomationCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateAutomationCallable() { + return stub.updateAutomationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Automation resource. + * + *

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()) {
+   *   AutomationName name =
+   *       AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]");
+   *   cloudDeployClient.deleteAutomationAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the `Automation` to delete. Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAutomationAsync( + AutomationName name) { + DeleteAutomationRequest request = + DeleteAutomationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteAutomationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Automation resource. + * + *

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 =
+   *       AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
+   *           .toString();
+   *   cloudDeployClient.deleteAutomationAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the `Automation` to delete. Format should be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAutomationAsync(String name) { + DeleteAutomationRequest request = DeleteAutomationRequest.newBuilder().setName(name).build(); + return deleteAutomationAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Automation resource. + * + *

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()) {
+   *   DeleteAutomationRequest request =
+   *       DeleteAutomationRequest.newBuilder()
+   *           .setName(
+   *               AutomationName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   cloudDeployClient.deleteAutomationAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAutomationAsync( + DeleteAutomationRequest request) { + return deleteAutomationOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Automation resource. + * + *

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()) {
+   *   DeleteAutomationRequest request =
+   *       DeleteAutomationRequest.newBuilder()
+   *           .setName(
+   *               AutomationName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   OperationFuture future =
+   *       cloudDeployClient.deleteAutomationOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteAutomationOperationCallable() { + return stub.deleteAutomationOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single Automation resource. + * + *

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()) {
+   *   DeleteAutomationRequest request =
+   *       DeleteAutomationRequest.newBuilder()
+   *           .setName(
+   *               AutomationName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
+   *                   .toString())
+   *           .setRequestId("requestId693933066")
+   *           .setAllowMissing(true)
+   *           .setValidateOnly(true)
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudDeployClient.deleteAutomationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteAutomationCallable() { + return stub.deleteAutomationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Automation. + * + *

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()) {
+   *   AutomationName name =
+   *       AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]");
+   *   Automation response = cloudDeployClient.getAutomation(name);
+   * }
+   * }
+ * + * @param name Required. Name of the `Automation`. Format must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Automation getAutomation(AutomationName name) { + GetAutomationRequest request = + GetAutomationRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAutomation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Automation. + * + *

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 =
+   *       AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
+   *           .toString();
+   *   Automation response = cloudDeployClient.getAutomation(name);
+   * }
+   * }
+ * + * @param name Required. Name of the `Automation`. Format must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Automation getAutomation(String name) { + GetAutomationRequest request = GetAutomationRequest.newBuilder().setName(name).build(); + return getAutomation(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Automation. + * + *

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()) {
+   *   GetAutomationRequest request =
+   *       GetAutomationRequest.newBuilder()
+   *           .setName(
+   *               AutomationName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
+   *                   .toString())
+   *           .build();
+   *   Automation response = cloudDeployClient.getAutomation(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 Automation getAutomation(GetAutomationRequest request) { + return getAutomationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single Automation. + * + *

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()) {
+   *   GetAutomationRequest request =
+   *       GetAutomationRequest.newBuilder()
+   *           .setName(
+   *               AutomationName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = cloudDeployClient.getAutomationCallable().futureCall(request);
+   *   // Do something.
+   *   Automation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getAutomationCallable() { + return stub.getAutomationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Automations 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()) {
+   *   DeliveryPipelineName parent =
+   *       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
+   *   for (Automation element : cloudDeployClient.listAutomations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of automations. Format must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAutomationsPagedResponse listAutomations(DeliveryPipelineName parent) { + ListAutomationsRequest request = + ListAutomationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAutomations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Automations 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 =
+   *       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
+   *   for (Automation element : cloudDeployClient.listAutomations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of automations. Format must be + * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAutomationsPagedResponse listAutomations(String parent) { + ListAutomationsRequest request = ListAutomationsRequest.newBuilder().setParent(parent).build(); + return listAutomations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Automations 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()) {
+   *   ListAutomationsRequest request =
+   *       ListAutomationsRequest.newBuilder()
+   *           .setParent(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (Automation element : cloudDeployClient.listAutomations(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 ListAutomationsPagedResponse listAutomations(ListAutomationsRequest request) { + return listAutomationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Automations 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()) {
+   *   ListAutomationsRequest request =
+   *       ListAutomationsRequest.newBuilder()
+   *           .setParent(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudDeployClient.listAutomationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Automation element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAutomationsPagedCallable() { + return stub.listAutomationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Automations 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()) {
+   *   ListAutomationsRequest request =
+   *       ListAutomationsRequest.newBuilder()
+   *           .setParent(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListAutomationsResponse response =
+   *         cloudDeployClient.listAutomationsCallable().call(request);
+   *     for (Automation element : response.getAutomationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAutomationsCallable() { + return stub.listAutomationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single AutomationRun. + * + *

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()) {
+   *   AutomationRunName name =
+   *       AutomationRunName.of(
+   *           "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]");
+   *   AutomationRun response = cloudDeployClient.getAutomationRun(name);
+   * }
+   * }
+ * + * @param name Required. Name of the `AutomationRun`. Format must be + * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AutomationRun getAutomationRun(AutomationRunName name) { + GetAutomationRunRequest request = + GetAutomationRunRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAutomationRun(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single AutomationRun. + * + *

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 =
+   *       AutomationRunName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]")
+   *           .toString();
+   *   AutomationRun response = cloudDeployClient.getAutomationRun(name);
+   * }
+   * }
+ * + * @param name Required. Name of the `AutomationRun`. Format must be + * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AutomationRun getAutomationRun(String name) { + GetAutomationRunRequest request = GetAutomationRunRequest.newBuilder().setName(name).build(); + return getAutomationRun(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single AutomationRun. + * + *

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()) {
+   *   GetAutomationRunRequest request =
+   *       GetAutomationRunRequest.newBuilder()
+   *           .setName(
+   *               AutomationRunName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]")
+   *                   .toString())
+   *           .build();
+   *   AutomationRun response = cloudDeployClient.getAutomationRun(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 AutomationRun getAutomationRun(GetAutomationRunRequest request) { + return getAutomationRunCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets details of a single AutomationRun. + * + *

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()) {
+   *   GetAutomationRunRequest request =
+   *       GetAutomationRunRequest.newBuilder()
+   *           .setName(
+   *               AutomationRunName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       cloudDeployClient.getAutomationRunCallable().futureCall(request);
+   *   // Do something.
+   *   AutomationRun response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getAutomationRunCallable() { + return stub.getAutomationRunCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AutomationRuns 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()) {
+   *   DeliveryPipelineName parent =
+   *       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
+   *   for (AutomationRun element : cloudDeployClient.listAutomationRuns(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of automationRuns. Format must + * be `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAutomationRunsPagedResponse listAutomationRuns(DeliveryPipelineName parent) { + ListAutomationRunsRequest request = + ListAutomationRunsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAutomationRuns(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AutomationRuns 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 =
+   *       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
+   *   for (AutomationRun element : cloudDeployClient.listAutomationRuns(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent, which owns this collection of automationRuns. Format must + * be `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAutomationRunsPagedResponse listAutomationRuns(String parent) { + ListAutomationRunsRequest request = + ListAutomationRunsRequest.newBuilder().setParent(parent).build(); + return listAutomationRuns(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AutomationRuns 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()) {
+   *   ListAutomationRunsRequest request =
+   *       ListAutomationRunsRequest.newBuilder()
+   *           .setParent(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (AutomationRun element : cloudDeployClient.listAutomationRuns(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 ListAutomationRunsPagedResponse listAutomationRuns( + ListAutomationRunsRequest request) { + return listAutomationRunsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AutomationRuns 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()) {
+   *   ListAutomationRunsRequest request =
+   *       ListAutomationRunsRequest.newBuilder()
+   *           .setParent(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudDeployClient.listAutomationRunsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (AutomationRun element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAutomationRunsPagedCallable() { + return stub.listAutomationRunsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AutomationRuns 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()) {
+   *   ListAutomationRunsRequest request =
+   *       ListAutomationRunsRequest.newBuilder()
+   *           .setParent(
+   *               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+   *                   .toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListAutomationRunsResponse response =
+   *         cloudDeployClient.listAutomationRunsCallable().call(request);
+   *     for (AutomationRun element : response.getAutomationRunsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAutomationRunsCallable() { + return stub.listAutomationRunsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels an AutomationRun. The `state` of the `AutomationRun` after cancelling is `CANCELLED`. + * `CancelAutomationRun` can be called on AutomationRun in the state `IN_PROGRESS` and `PENDING`; + * AutomationRun in a different state returns an `FAILED_PRECONDITION` error. + * + *

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()) {
+   *   AutomationRunName name =
+   *       AutomationRunName.of(
+   *           "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]");
+   *   CancelAutomationRunResponse response = cloudDeployClient.cancelAutomationRun(name);
+   * }
+   * }
+ * + * @param name Required. Name of the `AutomationRun`. Format is + * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CancelAutomationRunResponse cancelAutomationRun(AutomationRunName name) { + CancelAutomationRunRequest request = + CancelAutomationRunRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return cancelAutomationRun(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels an AutomationRun. The `state` of the `AutomationRun` after cancelling is `CANCELLED`. + * `CancelAutomationRun` can be called on AutomationRun in the state `IN_PROGRESS` and `PENDING`; + * AutomationRun in a different state returns an `FAILED_PRECONDITION` error. + * + *

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 =
+   *       AutomationRunName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]")
+   *           .toString();
+   *   CancelAutomationRunResponse response = cloudDeployClient.cancelAutomationRun(name);
+   * }
+   * }
+ * + * @param name Required. Name of the `AutomationRun`. Format is + * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CancelAutomationRunResponse cancelAutomationRun(String name) { + CancelAutomationRunRequest request = + CancelAutomationRunRequest.newBuilder().setName(name).build(); + return cancelAutomationRun(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels an AutomationRun. The `state` of the `AutomationRun` after cancelling is `CANCELLED`. + * `CancelAutomationRun` can be called on AutomationRun in the state `IN_PROGRESS` and `PENDING`; + * AutomationRun in a different state returns an `FAILED_PRECONDITION` error. + * + *

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()) {
+   *   CancelAutomationRunRequest request =
+   *       CancelAutomationRunRequest.newBuilder()
+   *           .setName(
+   *               AutomationRunName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]")
+   *                   .toString())
+   *           .build();
+   *   CancelAutomationRunResponse response = cloudDeployClient.cancelAutomationRun(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 CancelAutomationRunResponse cancelAutomationRun(CancelAutomationRunRequest request) { + return cancelAutomationRunCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels an AutomationRun. The `state` of the `AutomationRun` after cancelling is `CANCELLED`. + * `CancelAutomationRun` can be called on AutomationRun in the state `IN_PROGRESS` and `PENDING`; + * AutomationRun in a different state returns an `FAILED_PRECONDITION` error. + * + *

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()) {
+   *   CancelAutomationRunRequest request =
+   *       CancelAutomationRunRequest.newBuilder()
+   *           .setName(
+   *               AutomationRunName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       cloudDeployClient.cancelAutomationRunCallable().futureCall(request);
+   *   // Do something.
+   *   CancelAutomationRunResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + cancelAutomationRunCallable() { + return stub.cancelAutomationRunCallable(); + } + + // 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. @@ -4869,6 +6225,163 @@ protected ListJobRunsFixedSizeCollection createCollection( } } + public static class ListAutomationsPagedResponse + extends AbstractPagedListResponse< + ListAutomationsRequest, + ListAutomationsResponse, + Automation, + ListAutomationsPage, + ListAutomationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAutomationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAutomationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAutomationsPagedResponse(ListAutomationsPage page) { + super(page, ListAutomationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAutomationsPage + extends AbstractPage< + ListAutomationsRequest, ListAutomationsResponse, Automation, ListAutomationsPage> { + + private ListAutomationsPage( + PageContext context, + ListAutomationsResponse response) { + super(context, response); + } + + private static ListAutomationsPage createEmptyPage() { + return new ListAutomationsPage(null, null); + } + + @Override + protected ListAutomationsPage createPage( + PageContext context, + ListAutomationsResponse response) { + return new ListAutomationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAutomationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAutomationsRequest, + ListAutomationsResponse, + Automation, + ListAutomationsPage, + ListAutomationsFixedSizeCollection> { + + private ListAutomationsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAutomationsFixedSizeCollection createEmptyCollection() { + return new ListAutomationsFixedSizeCollection(null, 0); + } + + @Override + protected ListAutomationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAutomationsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListAutomationRunsPagedResponse + extends AbstractPagedListResponse< + ListAutomationRunsRequest, + ListAutomationRunsResponse, + AutomationRun, + ListAutomationRunsPage, + ListAutomationRunsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAutomationRunsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAutomationRunsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAutomationRunsPagedResponse(ListAutomationRunsPage page) { + super(page, ListAutomationRunsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAutomationRunsPage + extends AbstractPage< + ListAutomationRunsRequest, + ListAutomationRunsResponse, + AutomationRun, + ListAutomationRunsPage> { + + private ListAutomationRunsPage( + PageContext context, + ListAutomationRunsResponse response) { + super(context, response); + } + + private static ListAutomationRunsPage createEmptyPage() { + return new ListAutomationRunsPage(null, null); + } + + @Override + protected ListAutomationRunsPage createPage( + PageContext context, + ListAutomationRunsResponse response) { + return new ListAutomationRunsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAutomationRunsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAutomationRunsRequest, + ListAutomationRunsResponse, + AutomationRun, + ListAutomationRunsPage, + ListAutomationRunsFixedSizeCollection> { + + private ListAutomationRunsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAutomationRunsFixedSizeCollection createEmptyCollection() { + return new ListAutomationRunsFixedSizeCollection(null, 0); + } + + @Override + protected ListAutomationRunsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAutomationRunsFixedSizeCollection(pages, collectionSize); + } + } + public static class ListLocationsPagedResponse extends AbstractPagedListResponse< ListLocationsRequest, diff --git a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeploySettings.java b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeploySettings.java index b6f07bf68336..5d7cd4158900 100644 --- a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeploySettings.java +++ b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeploySettings.java @@ -16,6 +16,8 @@ package com.google.cloud.deploy.v1; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationRunsPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationsPagedResponse; 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; @@ -148,6 +150,11 @@ public class CloudDeploySettings extends ClientSettings { return ((CloudDeployStubSettings) getStubSettings()).listTargetsSettings(); } + /** Returns the object with the settings used for calls to rollbackTarget. */ + public UnaryCallSettings rollbackTargetSettings() { + return ((CloudDeployStubSettings) getStubSettings()).rollbackTargetSettings(); + } + /** Returns the object with the settings used for calls to getTarget. */ public UnaryCallSettings getTargetSettings() { return ((CloudDeployStubSettings) getStubSettings()).getTargetSettings(); @@ -282,6 +289,69 @@ public UnaryCallSettings getConfigSettings() { return ((CloudDeployStubSettings) getStubSettings()).getConfigSettings(); } + /** Returns the object with the settings used for calls to createAutomation. */ + public UnaryCallSettings createAutomationSettings() { + return ((CloudDeployStubSettings) getStubSettings()).createAutomationSettings(); + } + + /** Returns the object with the settings used for calls to createAutomation. */ + public OperationCallSettings + createAutomationOperationSettings() { + return ((CloudDeployStubSettings) getStubSettings()).createAutomationOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateAutomation. */ + public UnaryCallSettings updateAutomationSettings() { + return ((CloudDeployStubSettings) getStubSettings()).updateAutomationSettings(); + } + + /** Returns the object with the settings used for calls to updateAutomation. */ + public OperationCallSettings + updateAutomationOperationSettings() { + return ((CloudDeployStubSettings) getStubSettings()).updateAutomationOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteAutomation. */ + public UnaryCallSettings deleteAutomationSettings() { + return ((CloudDeployStubSettings) getStubSettings()).deleteAutomationSettings(); + } + + /** Returns the object with the settings used for calls to deleteAutomation. */ + public OperationCallSettings + deleteAutomationOperationSettings() { + return ((CloudDeployStubSettings) getStubSettings()).deleteAutomationOperationSettings(); + } + + /** Returns the object with the settings used for calls to getAutomation. */ + public UnaryCallSettings getAutomationSettings() { + return ((CloudDeployStubSettings) getStubSettings()).getAutomationSettings(); + } + + /** Returns the object with the settings used for calls to listAutomations. */ + public PagedCallSettings< + ListAutomationsRequest, ListAutomationsResponse, ListAutomationsPagedResponse> + listAutomationsSettings() { + return ((CloudDeployStubSettings) getStubSettings()).listAutomationsSettings(); + } + + /** Returns the object with the settings used for calls to getAutomationRun. */ + public UnaryCallSettings getAutomationRunSettings() { + return ((CloudDeployStubSettings) getStubSettings()).getAutomationRunSettings(); + } + + /** Returns the object with the settings used for calls to listAutomationRuns. */ + public PagedCallSettings< + ListAutomationRunsRequest, ListAutomationRunsResponse, ListAutomationRunsPagedResponse> + listAutomationRunsSettings() { + return ((CloudDeployStubSettings) getStubSettings()).listAutomationRunsSettings(); + } + + /** Returns the object with the settings used for calls to cancelAutomationRun. */ + public UnaryCallSettings + cancelAutomationRunSettings() { + return ((CloudDeployStubSettings) getStubSettings()).cancelAutomationRunSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -483,6 +553,12 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().listTargetsSettings(); } + /** Returns the builder for the settings used for calls to rollbackTarget. */ + public UnaryCallSettings.Builder + rollbackTargetSettings() { + return getStubSettingsBuilder().rollbackTargetSettings(); + } + /** Returns the builder for the settings used for calls to getTarget. */ public UnaryCallSettings.Builder getTargetSettings() { return getStubSettingsBuilder().getTargetSettings(); @@ -624,6 +700,73 @@ public UnaryCallSettings.Builder getConfigSettings() { return getStubSettingsBuilder().getConfigSettings(); } + /** Returns the builder for the settings used for calls to createAutomation. */ + public UnaryCallSettings.Builder + createAutomationSettings() { + return getStubSettingsBuilder().createAutomationSettings(); + } + + /** Returns the builder for the settings used for calls to createAutomation. */ + public OperationCallSettings.Builder + createAutomationOperationSettings() { + return getStubSettingsBuilder().createAutomationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateAutomation. */ + public UnaryCallSettings.Builder + updateAutomationSettings() { + return getStubSettingsBuilder().updateAutomationSettings(); + } + + /** Returns the builder for the settings used for calls to updateAutomation. */ + public OperationCallSettings.Builder + updateAutomationOperationSettings() { + return getStubSettingsBuilder().updateAutomationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAutomation. */ + public UnaryCallSettings.Builder + deleteAutomationSettings() { + return getStubSettingsBuilder().deleteAutomationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAutomation. */ + public OperationCallSettings.Builder + deleteAutomationOperationSettings() { + return getStubSettingsBuilder().deleteAutomationOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getAutomation. */ + public UnaryCallSettings.Builder getAutomationSettings() { + return getStubSettingsBuilder().getAutomationSettings(); + } + + /** Returns the builder for the settings used for calls to listAutomations. */ + public PagedCallSettings.Builder< + ListAutomationsRequest, ListAutomationsResponse, ListAutomationsPagedResponse> + listAutomationsSettings() { + return getStubSettingsBuilder().listAutomationsSettings(); + } + + /** Returns the builder for the settings used for calls to getAutomationRun. */ + public UnaryCallSettings.Builder + getAutomationRunSettings() { + return getStubSettingsBuilder().getAutomationRunSettings(); + } + + /** Returns the builder for the settings used for calls to listAutomationRuns. */ + public PagedCallSettings.Builder< + ListAutomationRunsRequest, ListAutomationRunsResponse, ListAutomationRunsPagedResponse> + listAutomationRunsSettings() { + return getStubSettingsBuilder().listAutomationRunsSettings(); + } + + /** Returns the builder for the settings used for calls to cancelAutomationRun. */ + public UnaryCallSettings.Builder + cancelAutomationRunSettings() { + return getStubSettingsBuilder().cancelAutomationRunSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/gapic_metadata.json b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/gapic_metadata.json index 8dfd98802ec6..b5120d3225d5 100644 --- a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/gapic_metadata.json +++ b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/gapic_metadata.json @@ -19,9 +19,15 @@ "ApproveRollout": { "methods": ["approveRollout", "approveRollout", "approveRollout", "approveRolloutCallable"] }, + "CancelAutomationRun": { + "methods": ["cancelAutomationRun", "cancelAutomationRun", "cancelAutomationRun", "cancelAutomationRunCallable"] + }, "CancelRollout": { "methods": ["cancelRollout", "cancelRollout", "cancelRollout", "cancelRolloutCallable"] }, + "CreateAutomation": { + "methods": ["createAutomationAsync", "createAutomationAsync", "createAutomationAsync", "createAutomationOperationCallable", "createAutomationCallable"] + }, "CreateDeliveryPipeline": { "methods": ["createDeliveryPipelineAsync", "createDeliveryPipelineAsync", "createDeliveryPipelineAsync", "createDeliveryPipelineOperationCallable", "createDeliveryPipelineCallable"] }, @@ -34,12 +40,21 @@ "CreateTarget": { "methods": ["createTargetAsync", "createTargetAsync", "createTargetAsync", "createTargetOperationCallable", "createTargetCallable"] }, + "DeleteAutomation": { + "methods": ["deleteAutomationAsync", "deleteAutomationAsync", "deleteAutomationAsync", "deleteAutomationOperationCallable", "deleteAutomationCallable"] + }, "DeleteDeliveryPipeline": { "methods": ["deleteDeliveryPipelineAsync", "deleteDeliveryPipelineAsync", "deleteDeliveryPipelineAsync", "deleteDeliveryPipelineOperationCallable", "deleteDeliveryPipelineCallable"] }, "DeleteTarget": { "methods": ["deleteTargetAsync", "deleteTargetAsync", "deleteTargetAsync", "deleteTargetOperationCallable", "deleteTargetCallable"] }, + "GetAutomation": { + "methods": ["getAutomation", "getAutomation", "getAutomation", "getAutomationCallable"] + }, + "GetAutomationRun": { + "methods": ["getAutomationRun", "getAutomationRun", "getAutomationRun", "getAutomationRunCallable"] + }, "GetConfig": { "methods": ["getConfig", "getConfig", "getConfig", "getConfigCallable"] }, @@ -67,6 +82,12 @@ "IgnoreJob": { "methods": ["ignoreJob", "ignoreJob", "ignoreJob", "ignoreJobCallable"] }, + "ListAutomationRuns": { + "methods": ["listAutomationRuns", "listAutomationRuns", "listAutomationRuns", "listAutomationRunsPagedCallable", "listAutomationRunsCallable"] + }, + "ListAutomations": { + "methods": ["listAutomations", "listAutomations", "listAutomations", "listAutomationsPagedCallable", "listAutomationsCallable"] + }, "ListDeliveryPipelines": { "methods": ["listDeliveryPipelines", "listDeliveryPipelines", "listDeliveryPipelines", "listDeliveryPipelinesPagedCallable", "listDeliveryPipelinesCallable"] }, @@ -88,6 +109,9 @@ "RetryJob": { "methods": ["retryJob", "retryJob", "retryJob", "retryJobCallable"] }, + "RollbackTarget": { + "methods": ["rollbackTarget", "rollbackTarget", "rollbackTarget", "rollbackTargetCallable"] + }, "SetIamPolicy": { "methods": ["setIamPolicy", "setIamPolicyCallable"] }, @@ -97,6 +121,9 @@ "TestIamPermissions": { "methods": ["testIamPermissions", "testIamPermissionsCallable"] }, + "UpdateAutomation": { + "methods": ["updateAutomationAsync", "updateAutomationAsync", "updateAutomationOperationCallable", "updateAutomationCallable"] + }, "UpdateDeliveryPipeline": { "methods": ["updateDeliveryPipelineAsync", "updateDeliveryPipelineAsync", "updateDeliveryPipelineOperationCallable", "updateDeliveryPipelineCallable"] }, diff --git a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStub.java b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStub.java index d172b9b3da90..0b0ed2819963 100644 --- a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStub.java +++ b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStub.java @@ -16,6 +16,8 @@ package com.google.cloud.deploy.v1.stub; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationRunsPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationsPagedResponse; 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; @@ -32,16 +34,24 @@ import com.google.cloud.deploy.v1.AdvanceRolloutResponse; import com.google.cloud.deploy.v1.ApproveRolloutRequest; import com.google.cloud.deploy.v1.ApproveRolloutResponse; +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.AutomationRun; +import com.google.cloud.deploy.v1.CancelAutomationRunRequest; +import com.google.cloud.deploy.v1.CancelAutomationRunResponse; import com.google.cloud.deploy.v1.CancelRolloutRequest; import com.google.cloud.deploy.v1.CancelRolloutResponse; import com.google.cloud.deploy.v1.Config; +import com.google.cloud.deploy.v1.CreateAutomationRequest; import com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest; import com.google.cloud.deploy.v1.CreateReleaseRequest; import com.google.cloud.deploy.v1.CreateRolloutRequest; import com.google.cloud.deploy.v1.CreateTargetRequest; +import com.google.cloud.deploy.v1.DeleteAutomationRequest; import com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest; import com.google.cloud.deploy.v1.DeleteTargetRequest; import com.google.cloud.deploy.v1.DeliveryPipeline; +import com.google.cloud.deploy.v1.GetAutomationRequest; +import com.google.cloud.deploy.v1.GetAutomationRunRequest; import com.google.cloud.deploy.v1.GetConfigRequest; import com.google.cloud.deploy.v1.GetDeliveryPipelineRequest; import com.google.cloud.deploy.v1.GetJobRunRequest; @@ -51,6 +61,10 @@ import com.google.cloud.deploy.v1.IgnoreJobRequest; import com.google.cloud.deploy.v1.IgnoreJobResponse; import com.google.cloud.deploy.v1.JobRun; +import com.google.cloud.deploy.v1.ListAutomationRunsRequest; +import com.google.cloud.deploy.v1.ListAutomationRunsResponse; +import com.google.cloud.deploy.v1.ListAutomationsRequest; +import com.google.cloud.deploy.v1.ListAutomationsResponse; import com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest; import com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse; import com.google.cloud.deploy.v1.ListJobRunsRequest; @@ -65,10 +79,13 @@ 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.RollbackTargetRequest; +import com.google.cloud.deploy.v1.RollbackTargetResponse; import com.google.cloud.deploy.v1.Rollout; import com.google.cloud.deploy.v1.Target; import com.google.cloud.deploy.v1.TerminateJobRunRequest; import com.google.cloud.deploy.v1.TerminateJobRunResponse; +import com.google.cloud.deploy.v1.UpdateAutomationRequest; import com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest; import com.google.cloud.deploy.v1.UpdateTargetRequest; import com.google.cloud.location.GetLocationRequest; @@ -155,6 +172,10 @@ public UnaryCallable listTargetsCallabl throw new UnsupportedOperationException("Not implemented: listTargetsCallable()"); } + public UnaryCallable rollbackTargetCallable() { + throw new UnsupportedOperationException("Not implemented: rollbackTargetCallable()"); + } + public UnaryCallable getTargetCallable() { throw new UnsupportedOperationException("Not implemented: getTargetCallable()"); } @@ -272,6 +293,65 @@ public UnaryCallable getConfigCallable() { throw new UnsupportedOperationException("Not implemented: getConfigCallable()"); } + public OperationCallable + createAutomationOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createAutomationOperationCallable()"); + } + + public UnaryCallable createAutomationCallable() { + throw new UnsupportedOperationException("Not implemented: createAutomationCallable()"); + } + + public OperationCallable + updateAutomationOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateAutomationOperationCallable()"); + } + + public UnaryCallable updateAutomationCallable() { + throw new UnsupportedOperationException("Not implemented: updateAutomationCallable()"); + } + + public OperationCallable + deleteAutomationOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAutomationOperationCallable()"); + } + + public UnaryCallable deleteAutomationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAutomationCallable()"); + } + + public UnaryCallable getAutomationCallable() { + throw new UnsupportedOperationException("Not implemented: getAutomationCallable()"); + } + + public UnaryCallable + listAutomationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAutomationsPagedCallable()"); + } + + public UnaryCallable listAutomationsCallable() { + throw new UnsupportedOperationException("Not implemented: listAutomationsCallable()"); + } + + public UnaryCallable getAutomationRunCallable() { + throw new UnsupportedOperationException("Not implemented: getAutomationRunCallable()"); + } + + public UnaryCallable + listAutomationRunsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAutomationRunsPagedCallable()"); + } + + public UnaryCallable + listAutomationRunsCallable() { + throw new UnsupportedOperationException("Not implemented: listAutomationRunsCallable()"); + } + + public UnaryCallable + cancelAutomationRunCallable() { + throw new UnsupportedOperationException("Not implemented: cancelAutomationRunCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStubSettings.java b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStubSettings.java index 076a9a65974f..5d24e7a0b948 100644 --- a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStubSettings.java +++ b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStubSettings.java @@ -16,6 +16,8 @@ package com.google.cloud.deploy.v1.stub; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationRunsPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationsPagedResponse; 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; @@ -58,16 +60,24 @@ import com.google.cloud.deploy.v1.AdvanceRolloutResponse; import com.google.cloud.deploy.v1.ApproveRolloutRequest; import com.google.cloud.deploy.v1.ApproveRolloutResponse; +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.AutomationRun; +import com.google.cloud.deploy.v1.CancelAutomationRunRequest; +import com.google.cloud.deploy.v1.CancelAutomationRunResponse; import com.google.cloud.deploy.v1.CancelRolloutRequest; import com.google.cloud.deploy.v1.CancelRolloutResponse; import com.google.cloud.deploy.v1.Config; +import com.google.cloud.deploy.v1.CreateAutomationRequest; import com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest; import com.google.cloud.deploy.v1.CreateReleaseRequest; import com.google.cloud.deploy.v1.CreateRolloutRequest; import com.google.cloud.deploy.v1.CreateTargetRequest; +import com.google.cloud.deploy.v1.DeleteAutomationRequest; import com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest; import com.google.cloud.deploy.v1.DeleteTargetRequest; import com.google.cloud.deploy.v1.DeliveryPipeline; +import com.google.cloud.deploy.v1.GetAutomationRequest; +import com.google.cloud.deploy.v1.GetAutomationRunRequest; import com.google.cloud.deploy.v1.GetConfigRequest; import com.google.cloud.deploy.v1.GetDeliveryPipelineRequest; import com.google.cloud.deploy.v1.GetJobRunRequest; @@ -77,6 +87,10 @@ import com.google.cloud.deploy.v1.IgnoreJobRequest; import com.google.cloud.deploy.v1.IgnoreJobResponse; import com.google.cloud.deploy.v1.JobRun; +import com.google.cloud.deploy.v1.ListAutomationRunsRequest; +import com.google.cloud.deploy.v1.ListAutomationRunsResponse; +import com.google.cloud.deploy.v1.ListAutomationsRequest; +import com.google.cloud.deploy.v1.ListAutomationsResponse; import com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest; import com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse; import com.google.cloud.deploy.v1.ListJobRunsRequest; @@ -91,10 +105,13 @@ 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.RollbackTargetRequest; +import com.google.cloud.deploy.v1.RollbackTargetResponse; import com.google.cloud.deploy.v1.Rollout; import com.google.cloud.deploy.v1.Target; import com.google.cloud.deploy.v1.TerminateJobRunRequest; import com.google.cloud.deploy.v1.TerminateJobRunResponse; +import com.google.cloud.deploy.v1.UpdateAutomationRequest; import com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest; import com.google.cloud.deploy.v1.UpdateTargetRequest; import com.google.cloud.location.GetLocationRequest; @@ -183,6 +200,8 @@ public class CloudDeployStubSettings extends StubSettings listTargetsSettings; + private final UnaryCallSettings + rollbackTargetSettings; private final UnaryCallSettings getTargetSettings; private final UnaryCallSettings createTargetSettings; private final OperationCallSettings @@ -223,6 +242,25 @@ public class CloudDeployStubSettings extends StubSettings terminateJobRunSettings; private final UnaryCallSettings getConfigSettings; + private final UnaryCallSettings createAutomationSettings; + private final OperationCallSettings + createAutomationOperationSettings; + private final UnaryCallSettings updateAutomationSettings; + private final OperationCallSettings + updateAutomationOperationSettings; + private final UnaryCallSettings deleteAutomationSettings; + private final OperationCallSettings + deleteAutomationOperationSettings; + private final UnaryCallSettings getAutomationSettings; + private final PagedCallSettings< + ListAutomationsRequest, ListAutomationsResponse, ListAutomationsPagedResponse> + listAutomationsSettings; + private final UnaryCallSettings getAutomationRunSettings; + private final PagedCallSettings< + ListAutomationRunsRequest, ListAutomationRunsResponse, ListAutomationRunsPagedResponse> + listAutomationRunsSettings; + private final UnaryCallSettings + cancelAutomationRunSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -417,6 +455,85 @@ public Iterable extractResources(ListJobRunsResponse payload) { } }; + private static final PagedListDescriptor< + ListAutomationsRequest, ListAutomationsResponse, Automation> + LIST_AUTOMATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAutomationsRequest injectToken( + ListAutomationsRequest payload, String token) { + return ListAutomationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAutomationsRequest injectPageSize( + ListAutomationsRequest payload, int pageSize) { + return ListAutomationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAutomationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAutomationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAutomationsResponse payload) { + return payload.getAutomationsList() == null + ? ImmutableList.of() + : payload.getAutomationsList(); + } + }; + + private static final PagedListDescriptor< + ListAutomationRunsRequest, ListAutomationRunsResponse, AutomationRun> + LIST_AUTOMATION_RUNS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAutomationRunsRequest, ListAutomationRunsResponse, AutomationRun>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAutomationRunsRequest injectToken( + ListAutomationRunsRequest payload, String token) { + return ListAutomationRunsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAutomationRunsRequest injectPageSize( + ListAutomationRunsRequest payload, int pageSize) { + return ListAutomationRunsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAutomationRunsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAutomationRunsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAutomationRunsResponse payload) { + return payload.getAutomationRunsList() == null + ? ImmutableList.of() + : payload.getAutomationRunsList(); + } + }; + private static final PagedListDescriptor LIST_LOCATIONS_PAGE_STR_DESC = new PagedListDescriptor() { @@ -545,6 +662,44 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListAutomationsRequest, ListAutomationsResponse, ListAutomationsPagedResponse> + LIST_AUTOMATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAutomationsRequest, ListAutomationsResponse, ListAutomationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAutomationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_AUTOMATIONS_PAGE_STR_DESC, request, context); + return ListAutomationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListAutomationRunsRequest, ListAutomationRunsResponse, ListAutomationRunsPagedResponse> + LIST_AUTOMATION_RUNS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAutomationRunsRequest, + ListAutomationRunsResponse, + ListAutomationRunsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAutomationRunsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_AUTOMATION_RUNS_PAGE_STR_DESC, request, context); + return ListAutomationRunsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> LIST_LOCATIONS_PAGE_STR_FACT = @@ -619,6 +774,11 @@ public ApiFuture getFuturePagedResponse( return listTargetsSettings; } + /** Returns the object with the settings used for calls to rollbackTarget. */ + public UnaryCallSettings rollbackTargetSettings() { + return rollbackTargetSettings; + } + /** Returns the object with the settings used for calls to getTarget. */ public UnaryCallSettings getTargetSettings() { return getTargetSettings; @@ -753,6 +913,69 @@ public UnaryCallSettings getConfigSettings() { return getConfigSettings; } + /** Returns the object with the settings used for calls to createAutomation. */ + public UnaryCallSettings createAutomationSettings() { + return createAutomationSettings; + } + + /** Returns the object with the settings used for calls to createAutomation. */ + public OperationCallSettings + createAutomationOperationSettings() { + return createAutomationOperationSettings; + } + + /** Returns the object with the settings used for calls to updateAutomation. */ + public UnaryCallSettings updateAutomationSettings() { + return updateAutomationSettings; + } + + /** Returns the object with the settings used for calls to updateAutomation. */ + public OperationCallSettings + updateAutomationOperationSettings() { + return updateAutomationOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteAutomation. */ + public UnaryCallSettings deleteAutomationSettings() { + return deleteAutomationSettings; + } + + /** Returns the object with the settings used for calls to deleteAutomation. */ + public OperationCallSettings + deleteAutomationOperationSettings() { + return deleteAutomationOperationSettings; + } + + /** Returns the object with the settings used for calls to getAutomation. */ + public UnaryCallSettings getAutomationSettings() { + return getAutomationSettings; + } + + /** Returns the object with the settings used for calls to listAutomations. */ + public PagedCallSettings< + ListAutomationsRequest, ListAutomationsResponse, ListAutomationsPagedResponse> + listAutomationsSettings() { + return listAutomationsSettings; + } + + /** Returns the object with the settings used for calls to getAutomationRun. */ + public UnaryCallSettings getAutomationRunSettings() { + return getAutomationRunSettings; + } + + /** Returns the object with the settings used for calls to listAutomationRuns. */ + public PagedCallSettings< + ListAutomationRunsRequest, ListAutomationRunsResponse, ListAutomationRunsPagedResponse> + listAutomationRunsSettings() { + return listAutomationRunsSettings; + } + + /** Returns the object with the settings used for calls to cancelAutomationRun. */ + public UnaryCallSettings + cancelAutomationRunSettings() { + return cancelAutomationRunSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -898,6 +1121,7 @@ protected CloudDeployStubSettings(Builder settingsBuilder) throws IOException { deleteDeliveryPipelineOperationSettings = settingsBuilder.deleteDeliveryPipelineOperationSettings().build(); listTargetsSettings = settingsBuilder.listTargetsSettings().build(); + rollbackTargetSettings = settingsBuilder.rollbackTargetSettings().build(); getTargetSettings = settingsBuilder.getTargetSettings().build(); createTargetSettings = settingsBuilder.createTargetSettings().build(); createTargetOperationSettings = settingsBuilder.createTargetOperationSettings().build(); @@ -923,6 +1147,17 @@ protected CloudDeployStubSettings(Builder settingsBuilder) throws IOException { getJobRunSettings = settingsBuilder.getJobRunSettings().build(); terminateJobRunSettings = settingsBuilder.terminateJobRunSettings().build(); getConfigSettings = settingsBuilder.getConfigSettings().build(); + createAutomationSettings = settingsBuilder.createAutomationSettings().build(); + createAutomationOperationSettings = settingsBuilder.createAutomationOperationSettings().build(); + updateAutomationSettings = settingsBuilder.updateAutomationSettings().build(); + updateAutomationOperationSettings = settingsBuilder.updateAutomationOperationSettings().build(); + deleteAutomationSettings = settingsBuilder.deleteAutomationSettings().build(); + deleteAutomationOperationSettings = settingsBuilder.deleteAutomationOperationSettings().build(); + getAutomationSettings = settingsBuilder.getAutomationSettings().build(); + listAutomationsSettings = settingsBuilder.listAutomationsSettings().build(); + getAutomationRunSettings = settingsBuilder.getAutomationRunSettings().build(); + listAutomationRunsSettings = settingsBuilder.listAutomationRunsSettings().build(); + cancelAutomationRunSettings = settingsBuilder.cancelAutomationRunSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); @@ -958,6 +1193,8 @@ public static class Builder extends StubSettings.Builder listTargetsSettings; + private final UnaryCallSettings.Builder + rollbackTargetSettings; private final UnaryCallSettings.Builder getTargetSettings; private final UnaryCallSettings.Builder createTargetSettings; private final OperationCallSettings.Builder @@ -999,6 +1236,31 @@ public static class Builder extends StubSettings.Builder terminateJobRunSettings; private final UnaryCallSettings.Builder getConfigSettings; + private final UnaryCallSettings.Builder + createAutomationSettings; + private final OperationCallSettings.Builder< + CreateAutomationRequest, Automation, OperationMetadata> + createAutomationOperationSettings; + private final UnaryCallSettings.Builder + updateAutomationSettings; + private final OperationCallSettings.Builder< + UpdateAutomationRequest, Automation, OperationMetadata> + updateAutomationOperationSettings; + private final UnaryCallSettings.Builder + deleteAutomationSettings; + private final OperationCallSettings.Builder + deleteAutomationOperationSettings; + private final UnaryCallSettings.Builder getAutomationSettings; + private final PagedCallSettings.Builder< + ListAutomationsRequest, ListAutomationsResponse, ListAutomationsPagedResponse> + listAutomationsSettings; + private final UnaryCallSettings.Builder + getAutomationRunSettings; + private final PagedCallSettings.Builder< + ListAutomationRunsRequest, ListAutomationRunsResponse, ListAutomationRunsPagedResponse> + listAutomationRunsSettings; + private final UnaryCallSettings.Builder + cancelAutomationRunSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -1068,6 +1330,7 @@ protected Builder(ClientContext clientContext) { deleteDeliveryPipelineSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteDeliveryPipelineOperationSettings = OperationCallSettings.newBuilder(); listTargetsSettings = PagedCallSettings.newBuilder(LIST_TARGETS_PAGE_STR_FACT); + rollbackTargetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getTargetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createTargetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createTargetOperationSettings = OperationCallSettings.newBuilder(); @@ -1093,6 +1356,17 @@ protected Builder(ClientContext clientContext) { getJobRunSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); terminateJobRunSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAutomationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAutomationOperationSettings = OperationCallSettings.newBuilder(); + updateAutomationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAutomationOperationSettings = OperationCallSettings.newBuilder(); + deleteAutomationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteAutomationOperationSettings = OperationCallSettings.newBuilder(); + getAutomationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listAutomationsSettings = PagedCallSettings.newBuilder(LIST_AUTOMATIONS_PAGE_STR_FACT); + getAutomationRunSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listAutomationRunsSettings = PagedCallSettings.newBuilder(LIST_AUTOMATION_RUNS_PAGE_STR_FACT); + cancelAutomationRunSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -1107,6 +1381,7 @@ protected Builder(ClientContext clientContext) { updateDeliveryPipelineSettings, deleteDeliveryPipelineSettings, listTargetsSettings, + rollbackTargetSettings, getTargetSettings, createTargetSettings, updateTargetSettings, @@ -1127,6 +1402,14 @@ protected Builder(ClientContext clientContext) { getJobRunSettings, terminateJobRunSettings, getConfigSettings, + createAutomationSettings, + updateAutomationSettings, + deleteAutomationSettings, + getAutomationSettings, + listAutomationsSettings, + getAutomationRunSettings, + listAutomationRunsSettings, + cancelAutomationRunSettings, listLocationsSettings, getLocationSettings, setIamPolicySettings, @@ -1150,6 +1433,7 @@ protected Builder(CloudDeployStubSettings settings) { deleteDeliveryPipelineOperationSettings = settings.deleteDeliveryPipelineOperationSettings.toBuilder(); listTargetsSettings = settings.listTargetsSettings.toBuilder(); + rollbackTargetSettings = settings.rollbackTargetSettings.toBuilder(); getTargetSettings = settings.getTargetSettings.toBuilder(); createTargetSettings = settings.createTargetSettings.toBuilder(); createTargetOperationSettings = settings.createTargetOperationSettings.toBuilder(); @@ -1175,6 +1459,17 @@ protected Builder(CloudDeployStubSettings settings) { getJobRunSettings = settings.getJobRunSettings.toBuilder(); terminateJobRunSettings = settings.terminateJobRunSettings.toBuilder(); getConfigSettings = settings.getConfigSettings.toBuilder(); + createAutomationSettings = settings.createAutomationSettings.toBuilder(); + createAutomationOperationSettings = settings.createAutomationOperationSettings.toBuilder(); + updateAutomationSettings = settings.updateAutomationSettings.toBuilder(); + updateAutomationOperationSettings = settings.updateAutomationOperationSettings.toBuilder(); + deleteAutomationSettings = settings.deleteAutomationSettings.toBuilder(); + deleteAutomationOperationSettings = settings.deleteAutomationOperationSettings.toBuilder(); + getAutomationSettings = settings.getAutomationSettings.toBuilder(); + listAutomationsSettings = settings.listAutomationsSettings.toBuilder(); + getAutomationRunSettings = settings.getAutomationRunSettings.toBuilder(); + listAutomationRunsSettings = settings.listAutomationRunsSettings.toBuilder(); + cancelAutomationRunSettings = settings.cancelAutomationRunSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); @@ -1189,6 +1484,7 @@ protected Builder(CloudDeployStubSettings settings) { updateDeliveryPipelineSettings, deleteDeliveryPipelineSettings, listTargetsSettings, + rollbackTargetSettings, getTargetSettings, createTargetSettings, updateTargetSettings, @@ -1209,6 +1505,14 @@ protected Builder(CloudDeployStubSettings settings) { getJobRunSettings, terminateJobRunSettings, getConfigSettings, + createAutomationSettings, + updateAutomationSettings, + deleteAutomationSettings, + getAutomationSettings, + listAutomationsSettings, + getAutomationRunSettings, + listAutomationRunsSettings, + cancelAutomationRunSettings, listLocationsSettings, getLocationSettings, setIamPolicySettings, @@ -1273,6 +1577,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .rollbackTargetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .getTargetSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -1373,6 +1682,46 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .createAutomationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .updateAutomationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .deleteAutomationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getAutomationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listAutomationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getAutomationRunSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listAutomationRunsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .cancelAutomationRunSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -1590,6 +1939,78 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .createAutomationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Automation.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateAutomationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Automation.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteAutomationOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + return builder; } @@ -1674,6 +2095,12 @@ public Builder applyToAllUnaryMethods( return listTargetsSettings; } + /** Returns the builder for the settings used for calls to rollbackTarget. */ + public UnaryCallSettings.Builder + rollbackTargetSettings() { + return rollbackTargetSettings; + } + /** Returns the builder for the settings used for calls to getTarget. */ public UnaryCallSettings.Builder getTargetSettings() { return getTargetSettings; @@ -1825,6 +2252,79 @@ public UnaryCallSettings.Builder getConfigSettings() { return getConfigSettings; } + /** Returns the builder for the settings used for calls to createAutomation. */ + public UnaryCallSettings.Builder + createAutomationSettings() { + return createAutomationSettings; + } + + /** Returns the builder for the settings used for calls to createAutomation. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createAutomationOperationSettings() { + return createAutomationOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateAutomation. */ + public UnaryCallSettings.Builder + updateAutomationSettings() { + return updateAutomationSettings; + } + + /** Returns the builder for the settings used for calls to updateAutomation. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateAutomationOperationSettings() { + return updateAutomationOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteAutomation. */ + public UnaryCallSettings.Builder + deleteAutomationSettings() { + return deleteAutomationSettings; + } + + /** Returns the builder for the settings used for calls to deleteAutomation. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteAutomationOperationSettings() { + return deleteAutomationOperationSettings; + } + + /** Returns the builder for the settings used for calls to getAutomation. */ + public UnaryCallSettings.Builder getAutomationSettings() { + return getAutomationSettings; + } + + /** Returns the builder for the settings used for calls to listAutomations. */ + public PagedCallSettings.Builder< + ListAutomationsRequest, ListAutomationsResponse, ListAutomationsPagedResponse> + listAutomationsSettings() { + return listAutomationsSettings; + } + + /** Returns the builder for the settings used for calls to getAutomationRun. */ + public UnaryCallSettings.Builder + getAutomationRunSettings() { + return getAutomationRunSettings; + } + + /** Returns the builder for the settings used for calls to listAutomationRuns. */ + public PagedCallSettings.Builder< + ListAutomationRunsRequest, ListAutomationRunsResponse, ListAutomationRunsPagedResponse> + listAutomationRunsSettings() { + return listAutomationRunsSettings; + } + + /** Returns the builder for the settings used for calls to cancelAutomationRun. */ + public UnaryCallSettings.Builder + cancelAutomationRunSettings() { + return cancelAutomationRunSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployStub.java b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployStub.java index 889cee7038c0..aa825f4d3c42 100644 --- a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployStub.java +++ b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployStub.java @@ -16,6 +16,8 @@ package com.google.cloud.deploy.v1.stub; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationRunsPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationsPagedResponse; 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; @@ -37,16 +39,24 @@ import com.google.cloud.deploy.v1.AdvanceRolloutResponse; import com.google.cloud.deploy.v1.ApproveRolloutRequest; import com.google.cloud.deploy.v1.ApproveRolloutResponse; +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.AutomationRun; +import com.google.cloud.deploy.v1.CancelAutomationRunRequest; +import com.google.cloud.deploy.v1.CancelAutomationRunResponse; import com.google.cloud.deploy.v1.CancelRolloutRequest; import com.google.cloud.deploy.v1.CancelRolloutResponse; import com.google.cloud.deploy.v1.Config; +import com.google.cloud.deploy.v1.CreateAutomationRequest; import com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest; import com.google.cloud.deploy.v1.CreateReleaseRequest; import com.google.cloud.deploy.v1.CreateRolloutRequest; import com.google.cloud.deploy.v1.CreateTargetRequest; +import com.google.cloud.deploy.v1.DeleteAutomationRequest; import com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest; import com.google.cloud.deploy.v1.DeleteTargetRequest; import com.google.cloud.deploy.v1.DeliveryPipeline; +import com.google.cloud.deploy.v1.GetAutomationRequest; +import com.google.cloud.deploy.v1.GetAutomationRunRequest; import com.google.cloud.deploy.v1.GetConfigRequest; import com.google.cloud.deploy.v1.GetDeliveryPipelineRequest; import com.google.cloud.deploy.v1.GetJobRunRequest; @@ -56,6 +66,10 @@ import com.google.cloud.deploy.v1.IgnoreJobRequest; import com.google.cloud.deploy.v1.IgnoreJobResponse; import com.google.cloud.deploy.v1.JobRun; +import com.google.cloud.deploy.v1.ListAutomationRunsRequest; +import com.google.cloud.deploy.v1.ListAutomationRunsResponse; +import com.google.cloud.deploy.v1.ListAutomationsRequest; +import com.google.cloud.deploy.v1.ListAutomationsResponse; import com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest; import com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse; import com.google.cloud.deploy.v1.ListJobRunsRequest; @@ -70,10 +84,13 @@ 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.RollbackTargetRequest; +import com.google.cloud.deploy.v1.RollbackTargetResponse; import com.google.cloud.deploy.v1.Rollout; import com.google.cloud.deploy.v1.Target; import com.google.cloud.deploy.v1.TerminateJobRunRequest; import com.google.cloud.deploy.v1.TerminateJobRunResponse; +import com.google.cloud.deploy.v1.UpdateAutomationRequest; import com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest; import com.google.cloud.deploy.v1.UpdateTargetRequest; import com.google.cloud.location.GetLocationRequest; @@ -163,6 +180,17 @@ public class GrpcCloudDeployStub extends CloudDeployStub { ProtoUtils.marshaller(ListTargetsResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + rollbackTargetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/RollbackTarget") + .setRequestMarshaller( + ProtoUtils.marshaller(RollbackTargetRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RollbackTargetResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor getTargetMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -353,6 +381,89 @@ public class GrpcCloudDeployStub extends CloudDeployStub { .setResponseMarshaller(ProtoUtils.marshaller(Config.getDefaultInstance())) .build(); + private static final MethodDescriptor + createAutomationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/CreateAutomation") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateAutomationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateAutomationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/UpdateAutomation") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateAutomationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteAutomationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/DeleteAutomation") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteAutomationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAutomationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/GetAutomation") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAutomationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Automation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listAutomationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/ListAutomations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAutomationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAutomationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAutomationRunMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/GetAutomationRun") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAutomationRunRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AutomationRun.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listAutomationRunsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/ListAutomationRuns") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAutomationRunsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAutomationRunsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + cancelAutomationRunMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/CancelAutomationRun") + .setRequestMarshaller( + ProtoUtils.marshaller(CancelAutomationRunRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(CancelAutomationRunResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -422,6 +533,7 @@ public class GrpcCloudDeployStub extends CloudDeployStub { private final UnaryCallable listTargetsCallable; private final UnaryCallable listTargetsPagedCallable; + private final UnaryCallable rollbackTargetCallable; private final UnaryCallable getTargetCallable; private final UnaryCallable createTargetCallable; private final OperationCallable @@ -459,6 +571,27 @@ public class GrpcCloudDeployStub extends CloudDeployStub { private final UnaryCallable terminateJobRunCallable; private final UnaryCallable getConfigCallable; + private final UnaryCallable createAutomationCallable; + private final OperationCallable + createAutomationOperationCallable; + private final UnaryCallable updateAutomationCallable; + private final OperationCallable + updateAutomationOperationCallable; + private final UnaryCallable deleteAutomationCallable; + private final OperationCallable + deleteAutomationOperationCallable; + private final UnaryCallable getAutomationCallable; + private final UnaryCallable + listAutomationsCallable; + private final UnaryCallable + listAutomationsPagedCallable; + private final UnaryCallable getAutomationRunCallable; + private final UnaryCallable + listAutomationRunsCallable; + private final UnaryCallable + listAutomationRunsPagedCallable; + private final UnaryCallable + cancelAutomationRunCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -578,6 +711,17 @@ protected GrpcCloudDeployStub( return builder.build(); }) .build(); + GrpcCallSettings + rollbackTargetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(rollbackTargetMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); GrpcCallSettings getTargetTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getTargetMethodDescriptor) @@ -782,6 +926,89 @@ protected GrpcCloudDeployStub( return builder.build(); }) .build(); + GrpcCallSettings createAutomationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAutomationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateAutomationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAutomationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("automation.name", String.valueOf(request.getAutomation().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteAutomationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAutomationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getAutomationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAutomationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listAutomationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAutomationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getAutomationRunTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAutomationRunMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listAutomationRunsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAutomationRunsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + cancelAutomationRunTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(cancelAutomationRunMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -888,6 +1115,9 @@ protected GrpcCloudDeployStub( this.listTargetsPagedCallable = callableFactory.createPagedCallable( listTargetsTransportSettings, settings.listTargetsSettings(), clientContext); + this.rollbackTargetCallable = + callableFactory.createUnaryCallable( + rollbackTargetTransportSettings, settings.rollbackTargetSettings(), clientContext); this.getTargetCallable = callableFactory.createUnaryCallable( getTargetTransportSettings, settings.getTargetSettings(), clientContext); @@ -987,6 +1217,60 @@ protected GrpcCloudDeployStub( this.getConfigCallable = callableFactory.createUnaryCallable( getConfigTransportSettings, settings.getConfigSettings(), clientContext); + this.createAutomationCallable = + callableFactory.createUnaryCallable( + createAutomationTransportSettings, settings.createAutomationSettings(), clientContext); + this.createAutomationOperationCallable = + callableFactory.createOperationCallable( + createAutomationTransportSettings, + settings.createAutomationOperationSettings(), + clientContext, + operationsStub); + this.updateAutomationCallable = + callableFactory.createUnaryCallable( + updateAutomationTransportSettings, settings.updateAutomationSettings(), clientContext); + this.updateAutomationOperationCallable = + callableFactory.createOperationCallable( + updateAutomationTransportSettings, + settings.updateAutomationOperationSettings(), + clientContext, + operationsStub); + this.deleteAutomationCallable = + callableFactory.createUnaryCallable( + deleteAutomationTransportSettings, settings.deleteAutomationSettings(), clientContext); + this.deleteAutomationOperationCallable = + callableFactory.createOperationCallable( + deleteAutomationTransportSettings, + settings.deleteAutomationOperationSettings(), + clientContext, + operationsStub); + this.getAutomationCallable = + callableFactory.createUnaryCallable( + getAutomationTransportSettings, settings.getAutomationSettings(), clientContext); + this.listAutomationsCallable = + callableFactory.createUnaryCallable( + listAutomationsTransportSettings, settings.listAutomationsSettings(), clientContext); + this.listAutomationsPagedCallable = + callableFactory.createPagedCallable( + listAutomationsTransportSettings, settings.listAutomationsSettings(), clientContext); + this.getAutomationRunCallable = + callableFactory.createUnaryCallable( + getAutomationRunTransportSettings, settings.getAutomationRunSettings(), clientContext); + this.listAutomationRunsCallable = + callableFactory.createUnaryCallable( + listAutomationRunsTransportSettings, + settings.listAutomationRunsSettings(), + clientContext); + this.listAutomationRunsPagedCallable = + callableFactory.createPagedCallable( + listAutomationRunsTransportSettings, + settings.listAutomationRunsSettings(), + clientContext); + this.cancelAutomationRunCallable = + callableFactory.createUnaryCallable( + cancelAutomationRunTransportSettings, + settings.cancelAutomationRunSettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -1076,6 +1360,11 @@ public UnaryCallable listTargetsPa return listTargetsPagedCallable; } + @Override + public UnaryCallable rollbackTargetCallable() { + return rollbackTargetCallable; + } + @Override public UnaryCallable getTargetCallable() { return getTargetCallable; @@ -1221,6 +1510,78 @@ public UnaryCallable getConfigCallable() { return getConfigCallable; } + @Override + public UnaryCallable createAutomationCallable() { + return createAutomationCallable; + } + + @Override + public OperationCallable + createAutomationOperationCallable() { + return createAutomationOperationCallable; + } + + @Override + public UnaryCallable updateAutomationCallable() { + return updateAutomationCallable; + } + + @Override + public OperationCallable + updateAutomationOperationCallable() { + return updateAutomationOperationCallable; + } + + @Override + public UnaryCallable deleteAutomationCallable() { + return deleteAutomationCallable; + } + + @Override + public OperationCallable + deleteAutomationOperationCallable() { + return deleteAutomationOperationCallable; + } + + @Override + public UnaryCallable getAutomationCallable() { + return getAutomationCallable; + } + + @Override + public UnaryCallable listAutomationsCallable() { + return listAutomationsCallable; + } + + @Override + public UnaryCallable + listAutomationsPagedCallable() { + return listAutomationsPagedCallable; + } + + @Override + public UnaryCallable getAutomationRunCallable() { + return getAutomationRunCallable; + } + + @Override + public UnaryCallable + listAutomationRunsCallable() { + return listAutomationRunsCallable; + } + + @Override + public UnaryCallable + listAutomationRunsPagedCallable() { + return listAutomationRunsPagedCallable; + } + + @Override + public UnaryCallable + cancelAutomationRunCallable() { + return cancelAutomationRunCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/HttpJsonCloudDeployStub.java b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/HttpJsonCloudDeployStub.java index 07b20c3ece94..b6d9d80359af 100644 --- a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/HttpJsonCloudDeployStub.java +++ b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/HttpJsonCloudDeployStub.java @@ -16,6 +16,8 @@ package com.google.cloud.deploy.v1.stub; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationRunsPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationsPagedResponse; 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; @@ -46,16 +48,24 @@ import com.google.cloud.deploy.v1.AdvanceRolloutResponse; import com.google.cloud.deploy.v1.ApproveRolloutRequest; import com.google.cloud.deploy.v1.ApproveRolloutResponse; +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.AutomationRun; +import com.google.cloud.deploy.v1.CancelAutomationRunRequest; +import com.google.cloud.deploy.v1.CancelAutomationRunResponse; import com.google.cloud.deploy.v1.CancelRolloutRequest; import com.google.cloud.deploy.v1.CancelRolloutResponse; import com.google.cloud.deploy.v1.Config; +import com.google.cloud.deploy.v1.CreateAutomationRequest; import com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest; import com.google.cloud.deploy.v1.CreateReleaseRequest; import com.google.cloud.deploy.v1.CreateRolloutRequest; import com.google.cloud.deploy.v1.CreateTargetRequest; +import com.google.cloud.deploy.v1.DeleteAutomationRequest; import com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest; import com.google.cloud.deploy.v1.DeleteTargetRequest; import com.google.cloud.deploy.v1.DeliveryPipeline; +import com.google.cloud.deploy.v1.GetAutomationRequest; +import com.google.cloud.deploy.v1.GetAutomationRunRequest; import com.google.cloud.deploy.v1.GetConfigRequest; import com.google.cloud.deploy.v1.GetDeliveryPipelineRequest; import com.google.cloud.deploy.v1.GetJobRunRequest; @@ -65,6 +75,10 @@ import com.google.cloud.deploy.v1.IgnoreJobRequest; import com.google.cloud.deploy.v1.IgnoreJobResponse; import com.google.cloud.deploy.v1.JobRun; +import com.google.cloud.deploy.v1.ListAutomationRunsRequest; +import com.google.cloud.deploy.v1.ListAutomationRunsResponse; +import com.google.cloud.deploy.v1.ListAutomationsRequest; +import com.google.cloud.deploy.v1.ListAutomationsResponse; import com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest; import com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse; import com.google.cloud.deploy.v1.ListJobRunsRequest; @@ -79,10 +93,13 @@ 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.RollbackTargetRequest; +import com.google.cloud.deploy.v1.RollbackTargetResponse; import com.google.cloud.deploy.v1.Rollout; import com.google.cloud.deploy.v1.Target; import com.google.cloud.deploy.v1.TerminateJobRunRequest; import com.google.cloud.deploy.v1.TerminateJobRunResponse; +import com.google.cloud.deploy.v1.UpdateAutomationRequest; import com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest; import com.google.cloud.deploy.v1.UpdateTargetRequest; import com.google.cloud.location.GetLocationRequest; @@ -120,6 +137,7 @@ public class HttpJsonCloudDeployStub extends CloudDeployStub { .add(Empty.getDescriptor()) .add(OperationMetadata.getDescriptor()) .add(Rollout.getDescriptor()) + .add(Automation.getDescriptor()) .add(DeliveryPipeline.getDescriptor()) .add(Target.getDescriptor()) .add(Release.getDescriptor()) @@ -375,6 +393,43 @@ public class HttpJsonCloudDeployStub extends CloudDeployStub { .build()) .build(); + private static final ApiMethodDescriptor + rollbackTargetMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/RollbackTarget") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/deliveryPipelines/*}:rollbackTarget", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RollbackTargetResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor getTargetMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/GetTarget") @@ -1137,6 +1192,322 @@ public class HttpJsonCloudDeployStub extends CloudDeployStub { .build()) .build(); + private static final ApiMethodDescriptor + createAutomationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/CreateAutomation") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations", + 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, "automationId", request.getAutomationId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("automation", request.getAutomation(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateAutomationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateAutomationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/UpdateAutomation") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{automation.name=projects/*/locations/*/deliveryPipelines/*/automations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "automation.name", request.getAutomation().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "allowMissing", request.getAllowMissing()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("automation", request.getAutomation(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateAutomationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteAutomationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/DeleteAutomation") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "allowMissing", request.getAllowMissing()); + serializer.putQueryParam(fields, "etag", request.getEtag()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteAutomationRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getAutomationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/GetAutomation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Automation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listAutomationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/ListAutomations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations", + 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()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAutomationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getAutomationRunMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/GetAutomationRun") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AutomationRun.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listAutomationRunsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/ListAutomationRuns") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automationRuns", + 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()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAutomationRunsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + cancelAutomationRunMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/CancelAutomationRun") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}:cancel", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CancelAutomationRunResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -1342,6 +1713,7 @@ public class HttpJsonCloudDeployStub extends CloudDeployStub { private final UnaryCallable listTargetsCallable; private final UnaryCallable listTargetsPagedCallable; + private final UnaryCallable rollbackTargetCallable; private final UnaryCallable getTargetCallable; private final UnaryCallable createTargetCallable; private final OperationCallable @@ -1379,6 +1751,27 @@ public class HttpJsonCloudDeployStub extends CloudDeployStub { private final UnaryCallable terminateJobRunCallable; private final UnaryCallable getConfigCallable; + private final UnaryCallable createAutomationCallable; + private final OperationCallable + createAutomationOperationCallable; + private final UnaryCallable updateAutomationCallable; + private final OperationCallable + updateAutomationOperationCallable; + private final UnaryCallable deleteAutomationCallable; + private final OperationCallable + deleteAutomationOperationCallable; + private final UnaryCallable getAutomationCallable; + private final UnaryCallable + listAutomationsCallable; + private final UnaryCallable + listAutomationsPagedCallable; + private final UnaryCallable getAutomationRunCallable; + private final UnaryCallable + listAutomationRunsCallable; + private final UnaryCallable + listAutomationRunsPagedCallable; + private final UnaryCallable + cancelAutomationRunCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -1532,6 +1925,18 @@ protected HttpJsonCloudDeployStub( return builder.build(); }) .build(); + HttpJsonCallSettings + rollbackTargetTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(rollbackTargetMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); HttpJsonCallSettings getTargetTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getTargetMethodDescriptor) @@ -1757,6 +2162,98 @@ protected HttpJsonCloudDeployStub( return builder.build(); }) .build(); + HttpJsonCallSettings createAutomationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createAutomationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateAutomationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateAutomationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("automation.name", String.valueOf(request.getAutomation().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteAutomationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteAutomationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getAutomationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAutomationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listAutomationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listAutomationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getAutomationRunTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAutomationRunMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listAutomationRunsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listAutomationRunsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + cancelAutomationRunTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(cancelAutomationRunMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -1869,6 +2366,9 @@ protected HttpJsonCloudDeployStub( this.listTargetsPagedCallable = callableFactory.createPagedCallable( listTargetsTransportSettings, settings.listTargetsSettings(), clientContext); + this.rollbackTargetCallable = + callableFactory.createUnaryCallable( + rollbackTargetTransportSettings, settings.rollbackTargetSettings(), clientContext); this.getTargetCallable = callableFactory.createUnaryCallable( getTargetTransportSettings, settings.getTargetSettings(), clientContext); @@ -1968,6 +2468,60 @@ protected HttpJsonCloudDeployStub( this.getConfigCallable = callableFactory.createUnaryCallable( getConfigTransportSettings, settings.getConfigSettings(), clientContext); + this.createAutomationCallable = + callableFactory.createUnaryCallable( + createAutomationTransportSettings, settings.createAutomationSettings(), clientContext); + this.createAutomationOperationCallable = + callableFactory.createOperationCallable( + createAutomationTransportSettings, + settings.createAutomationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateAutomationCallable = + callableFactory.createUnaryCallable( + updateAutomationTransportSettings, settings.updateAutomationSettings(), clientContext); + this.updateAutomationOperationCallable = + callableFactory.createOperationCallable( + updateAutomationTransportSettings, + settings.updateAutomationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteAutomationCallable = + callableFactory.createUnaryCallable( + deleteAutomationTransportSettings, settings.deleteAutomationSettings(), clientContext); + this.deleteAutomationOperationCallable = + callableFactory.createOperationCallable( + deleteAutomationTransportSettings, + settings.deleteAutomationOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getAutomationCallable = + callableFactory.createUnaryCallable( + getAutomationTransportSettings, settings.getAutomationSettings(), clientContext); + this.listAutomationsCallable = + callableFactory.createUnaryCallable( + listAutomationsTransportSettings, settings.listAutomationsSettings(), clientContext); + this.listAutomationsPagedCallable = + callableFactory.createPagedCallable( + listAutomationsTransportSettings, settings.listAutomationsSettings(), clientContext); + this.getAutomationRunCallable = + callableFactory.createUnaryCallable( + getAutomationRunTransportSettings, settings.getAutomationRunSettings(), clientContext); + this.listAutomationRunsCallable = + callableFactory.createUnaryCallable( + listAutomationRunsTransportSettings, + settings.listAutomationRunsSettings(), + clientContext); + this.listAutomationRunsPagedCallable = + callableFactory.createPagedCallable( + listAutomationRunsTransportSettings, + settings.listAutomationRunsSettings(), + clientContext); + this.cancelAutomationRunCallable = + callableFactory.createUnaryCallable( + cancelAutomationRunTransportSettings, + settings.cancelAutomationRunSettings(), + clientContext); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -2002,6 +2556,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(updateDeliveryPipelineMethodDescriptor); methodDescriptors.add(deleteDeliveryPipelineMethodDescriptor); methodDescriptors.add(listTargetsMethodDescriptor); + methodDescriptors.add(rollbackTargetMethodDescriptor); methodDescriptors.add(getTargetMethodDescriptor); methodDescriptors.add(createTargetMethodDescriptor); methodDescriptors.add(updateTargetMethodDescriptor); @@ -2022,6 +2577,14 @@ public static List getMethodDescriptors() { methodDescriptors.add(getJobRunMethodDescriptor); methodDescriptors.add(terminateJobRunMethodDescriptor); methodDescriptors.add(getConfigMethodDescriptor); + methodDescriptors.add(createAutomationMethodDescriptor); + methodDescriptors.add(updateAutomationMethodDescriptor); + methodDescriptors.add(deleteAutomationMethodDescriptor); + methodDescriptors.add(getAutomationMethodDescriptor); + methodDescriptors.add(listAutomationsMethodDescriptor); + methodDescriptors.add(getAutomationRunMethodDescriptor); + methodDescriptors.add(listAutomationRunsMethodDescriptor); + methodDescriptors.add(cancelAutomationRunMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); methodDescriptors.add(setIamPolicyMethodDescriptor); @@ -2094,6 +2657,11 @@ public UnaryCallable listTargetsPa return listTargetsPagedCallable; } + @Override + public UnaryCallable rollbackTargetCallable() { + return rollbackTargetCallable; + } + @Override public UnaryCallable getTargetCallable() { return getTargetCallable; @@ -2239,6 +2807,78 @@ public UnaryCallable getConfigCallable() { return getConfigCallable; } + @Override + public UnaryCallable createAutomationCallable() { + return createAutomationCallable; + } + + @Override + public OperationCallable + createAutomationOperationCallable() { + return createAutomationOperationCallable; + } + + @Override + public UnaryCallable updateAutomationCallable() { + return updateAutomationCallable; + } + + @Override + public OperationCallable + updateAutomationOperationCallable() { + return updateAutomationOperationCallable; + } + + @Override + public UnaryCallable deleteAutomationCallable() { + return deleteAutomationCallable; + } + + @Override + public OperationCallable + deleteAutomationOperationCallable() { + return deleteAutomationOperationCallable; + } + + @Override + public UnaryCallable getAutomationCallable() { + return getAutomationCallable; + } + + @Override + public UnaryCallable listAutomationsCallable() { + return listAutomationsCallable; + } + + @Override + public UnaryCallable + listAutomationsPagedCallable() { + return listAutomationsPagedCallable; + } + + @Override + public UnaryCallable getAutomationRunCallable() { + return getAutomationRunCallable; + } + + @Override + public UnaryCallable + listAutomationRunsCallable() { + return listAutomationRunsCallable; + } + + @Override + public UnaryCallable + listAutomationRunsPagedCallable() { + return listAutomationRunsPagedCallable; + } + + @Override + public UnaryCallable + cancelAutomationRunCallable() { + return cancelAutomationRunCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-deploy/google-cloud-deploy/src/main/resources/META-INF/native-image/com.google.cloud.deploy.v1/reflect-config.json b/java-deploy/google-cloud-deploy/src/main/resources/META-INF/native-image/com.google.cloud.deploy.v1/reflect-config.json index bfa8bd164b5e..6e29fad427f2 100644 --- a/java-deploy/google-cloud-deploy/src/main/resources/META-INF/native-image/com.google.cloud.deploy.v1/reflect-config.json +++ b/java-deploy/google-cloud-deploy/src/main/resources/META-INF/native-image/com.google.cloud.deploy.v1/reflect-config.json @@ -449,6 +449,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.deploy.v1.AdvanceRolloutOperation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.AdvanceRolloutOperation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.deploy.v1.AdvanceRolloutRequest", "queryAllDeclaredConstructors": true, @@ -485,6 +503,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.deploy.v1.AdvanceRolloutRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.AdvanceRolloutRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.deploy.v1.AnthosCluster", "queryAllDeclaredConstructors": true, @@ -539,6 +575,168 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.deploy.v1.Automation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.Automation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.AutomationEvent", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.AutomationEvent$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.AutomationResourceSelector", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.AutomationResourceSelector$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.AutomationRolloutMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.AutomationRolloutMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.AutomationRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.AutomationRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.AutomationRuleCondition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.AutomationRuleCondition$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.AutomationRun", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.AutomationRun$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.AutomationRun$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.AutomationRunEvent", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.AutomationRunEvent$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.BackoffMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.deploy.v1.BuildArtifact", "queryAllDeclaredConstructors": true, @@ -593,6 +791,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.deploy.v1.CancelAutomationRunRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.CancelAutomationRunRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.CancelAutomationRunResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.CancelAutomationRunResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.deploy.v1.CancelRolloutRequest", "queryAllDeclaredConstructors": true, @@ -737,6 +971,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.deploy.v1.CreateAutomationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.CreateAutomationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.deploy.v1.CreateChildRolloutJob", "queryAllDeclaredConstructors": true, @@ -899,6 +1151,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.deploy.v1.DeleteAutomationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.DeleteAutomationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest", "queryAllDeclaredConstructors": true, @@ -927,7 +1197,403 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.DeleteTargetRequest$Builder", + "name": "com.google.cloud.deploy.v1.DeleteTargetRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.DeliveryPipeline", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.DeliveryPipeline$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.DeliveryPipelineNotificationEvent", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.DeliveryPipelineNotificationEvent$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.DeployArtifact", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.DeployArtifact$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.DeployJob", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.DeployJob$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.DeployJobRun", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.DeployJobRun$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.DeployJobRun$FailureCause", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.DeployJobRunMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.DeployJobRunMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.DeployParameters", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.DeployParameters$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.DeploymentJobs", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.DeploymentJobs$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.ExecutionConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.ExecutionConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.ExecutionConfig$ExecutionEnvironmentUsage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.GetAutomationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.GetAutomationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.GetAutomationRunRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.GetAutomationRunRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.GetConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.GetConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.GetDeliveryPipelineRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.GetDeliveryPipelineRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.GetJobRunRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.GetJobRunRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.GetReleaseRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.GetReleaseRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.GetRolloutRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.GetRolloutRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.GetTargetRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.GetTargetRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.GkeCluster", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.GkeCluster$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.IgnoreJobRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.IgnoreJobRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.IgnoreJobResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.IgnoreJobResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.Job", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.Job$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -936,7 +1602,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.DeliveryPipeline", + "name": "com.google.cloud.deploy.v1.Job$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -945,7 +1611,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.DeliveryPipeline$Builder", + "name": "com.google.cloud.deploy.v1.JobRun", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -954,7 +1620,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.DeliveryPipelineNotificationEvent", + "name": "com.google.cloud.deploy.v1.JobRun$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -963,7 +1629,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.DeliveryPipelineNotificationEvent$Builder", + "name": "com.google.cloud.deploy.v1.JobRun$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -972,7 +1638,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.DeployArtifact", + "name": "com.google.cloud.deploy.v1.JobRunNotificationEvent", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -981,7 +1647,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.DeployArtifact$Builder", + "name": "com.google.cloud.deploy.v1.JobRunNotificationEvent$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -990,7 +1656,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.DeployJob", + "name": "com.google.cloud.deploy.v1.KubernetesConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -999,7 +1665,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.DeployJob$Builder", + "name": "com.google.cloud.deploy.v1.KubernetesConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1008,7 +1674,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.DeployJobRun", + "name": "com.google.cloud.deploy.v1.KubernetesConfig$GatewayServiceMesh", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1017,7 +1683,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.DeployJobRun$Builder", + "name": "com.google.cloud.deploy.v1.KubernetesConfig$GatewayServiceMesh$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1026,7 +1692,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.DeployJobRun$FailureCause", + "name": "com.google.cloud.deploy.v1.KubernetesConfig$ServiceNetworking", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1035,7 +1701,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.DeployJobRunMetadata", + "name": "com.google.cloud.deploy.v1.KubernetesConfig$ServiceNetworking$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1044,7 +1710,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.DeployJobRunMetadata$Builder", + "name": "com.google.cloud.deploy.v1.ListAutomationRunsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1053,7 +1719,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.DeployParameters", + "name": "com.google.cloud.deploy.v1.ListAutomationRunsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1062,7 +1728,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.DeployParameters$Builder", + "name": "com.google.cloud.deploy.v1.ListAutomationRunsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1071,7 +1737,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.DeploymentJobs", + "name": "com.google.cloud.deploy.v1.ListAutomationRunsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1080,7 +1746,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.DeploymentJobs$Builder", + "name": "com.google.cloud.deploy.v1.ListAutomationsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1089,7 +1755,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ExecutionConfig", + "name": "com.google.cloud.deploy.v1.ListAutomationsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1098,7 +1764,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ExecutionConfig$Builder", + "name": "com.google.cloud.deploy.v1.ListAutomationsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1107,7 +1773,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ExecutionConfig$ExecutionEnvironmentUsage", + "name": "com.google.cloud.deploy.v1.ListAutomationsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1116,7 +1782,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.GetConfigRequest", + "name": "com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1125,7 +1791,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.GetConfigRequest$Builder", + "name": "com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1134,7 +1800,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.GetDeliveryPipelineRequest", + "name": "com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1143,7 +1809,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.GetDeliveryPipelineRequest$Builder", + "name": "com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1152,7 +1818,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.GetJobRunRequest", + "name": "com.google.cloud.deploy.v1.ListJobRunsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1161,7 +1827,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.GetJobRunRequest$Builder", + "name": "com.google.cloud.deploy.v1.ListJobRunsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1170,7 +1836,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.GetReleaseRequest", + "name": "com.google.cloud.deploy.v1.ListJobRunsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1179,7 +1845,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.GetReleaseRequest$Builder", + "name": "com.google.cloud.deploy.v1.ListJobRunsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1188,7 +1854,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.GetRolloutRequest", + "name": "com.google.cloud.deploy.v1.ListReleasesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1197,7 +1863,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.GetRolloutRequest$Builder", + "name": "com.google.cloud.deploy.v1.ListReleasesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1206,7 +1872,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.GetTargetRequest", + "name": "com.google.cloud.deploy.v1.ListReleasesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1215,7 +1881,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.GetTargetRequest$Builder", + "name": "com.google.cloud.deploy.v1.ListReleasesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1224,7 +1890,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.GkeCluster", + "name": "com.google.cloud.deploy.v1.ListRolloutsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1233,7 +1899,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.GkeCluster$Builder", + "name": "com.google.cloud.deploy.v1.ListRolloutsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1242,7 +1908,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.IgnoreJobRequest", + "name": "com.google.cloud.deploy.v1.ListRolloutsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1251,7 +1917,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.IgnoreJobRequest$Builder", + "name": "com.google.cloud.deploy.v1.ListRolloutsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1260,7 +1926,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.IgnoreJobResponse", + "name": "com.google.cloud.deploy.v1.ListTargetsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1269,7 +1935,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.IgnoreJobResponse$Builder", + "name": "com.google.cloud.deploy.v1.ListTargetsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1278,7 +1944,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Job", + "name": "com.google.cloud.deploy.v1.ListTargetsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1287,7 +1953,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Job$Builder", + "name": "com.google.cloud.deploy.v1.ListTargetsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1296,7 +1962,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Job$State", + "name": "com.google.cloud.deploy.v1.Metadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1305,7 +1971,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.JobRun", + "name": "com.google.cloud.deploy.v1.Metadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1314,7 +1980,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.JobRun$Builder", + "name": "com.google.cloud.deploy.v1.MultiTarget", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1323,7 +1989,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.JobRun$State", + "name": "com.google.cloud.deploy.v1.MultiTarget$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1332,7 +1998,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.JobRunNotificationEvent", + "name": "com.google.cloud.deploy.v1.OperationMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1341,7 +2007,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.JobRunNotificationEvent$Builder", + "name": "com.google.cloud.deploy.v1.OperationMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1350,7 +2016,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.KubernetesConfig", + "name": "com.google.cloud.deploy.v1.Phase", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1359,7 +2025,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.KubernetesConfig$Builder", + "name": "com.google.cloud.deploy.v1.Phase$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1368,7 +2034,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.KubernetesConfig$GatewayServiceMesh", + "name": "com.google.cloud.deploy.v1.Phase$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1377,7 +2043,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.KubernetesConfig$GatewayServiceMesh$Builder", + "name": "com.google.cloud.deploy.v1.PipelineCondition", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1386,7 +2052,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.KubernetesConfig$ServiceNetworking", + "name": "com.google.cloud.deploy.v1.PipelineCondition$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1395,7 +2061,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.KubernetesConfig$ServiceNetworking$Builder", + "name": "com.google.cloud.deploy.v1.PipelineReadyCondition", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1404,7 +2070,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest", + "name": "com.google.cloud.deploy.v1.PipelineReadyCondition$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1413,7 +2079,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest$Builder", + "name": "com.google.cloud.deploy.v1.Postdeploy", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1422,7 +2088,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse", + "name": "com.google.cloud.deploy.v1.Postdeploy$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1431,7 +2097,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse$Builder", + "name": "com.google.cloud.deploy.v1.PostdeployJob", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1440,7 +2106,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListJobRunsRequest", + "name": "com.google.cloud.deploy.v1.PostdeployJob$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1449,7 +2115,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListJobRunsRequest$Builder", + "name": "com.google.cloud.deploy.v1.PostdeployJobRun", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1458,7 +2124,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListJobRunsResponse", + "name": "com.google.cloud.deploy.v1.PostdeployJobRun$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1467,7 +2133,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListJobRunsResponse$Builder", + "name": "com.google.cloud.deploy.v1.PostdeployJobRun$FailureCause", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1476,7 +2142,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListReleasesRequest", + "name": "com.google.cloud.deploy.v1.Predeploy", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1485,7 +2151,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListReleasesRequest$Builder", + "name": "com.google.cloud.deploy.v1.Predeploy$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1494,7 +2160,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListReleasesResponse", + "name": "com.google.cloud.deploy.v1.PredeployJob", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1503,7 +2169,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListReleasesResponse$Builder", + "name": "com.google.cloud.deploy.v1.PredeployJob$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1512,7 +2178,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListRolloutsRequest", + "name": "com.google.cloud.deploy.v1.PredeployJobRun", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1521,7 +2187,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListRolloutsRequest$Builder", + "name": "com.google.cloud.deploy.v1.PredeployJobRun$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1530,7 +2196,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListRolloutsResponse", + "name": "com.google.cloud.deploy.v1.PredeployJobRun$FailureCause", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1539,7 +2205,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListRolloutsResponse$Builder", + "name": "com.google.cloud.deploy.v1.PrivatePool", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1548,7 +2214,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListTargetsRequest", + "name": "com.google.cloud.deploy.v1.PrivatePool$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1557,7 +2223,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListTargetsRequest$Builder", + "name": "com.google.cloud.deploy.v1.PromoteReleaseOperation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1566,7 +2232,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListTargetsResponse", + "name": "com.google.cloud.deploy.v1.PromoteReleaseOperation$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1575,7 +2241,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ListTargetsResponse$Builder", + "name": "com.google.cloud.deploy.v1.PromoteReleaseRule", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1584,7 +2250,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Metadata", + "name": "com.google.cloud.deploy.v1.PromoteReleaseRule$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1593,7 +2259,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Metadata$Builder", + "name": "com.google.cloud.deploy.v1.Release", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1602,7 +2268,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.MultiTarget", + "name": "com.google.cloud.deploy.v1.Release$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1611,7 +2277,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.MultiTarget$Builder", + "name": "com.google.cloud.deploy.v1.Release$ReleaseCondition", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1620,7 +2286,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.OperationMetadata", + "name": "com.google.cloud.deploy.v1.Release$ReleaseCondition$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1629,7 +2295,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.OperationMetadata$Builder", + "name": "com.google.cloud.deploy.v1.Release$ReleaseReadyCondition", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1638,7 +2304,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Phase", + "name": "com.google.cloud.deploy.v1.Release$ReleaseReadyCondition$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1647,7 +2313,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Phase$Builder", + "name": "com.google.cloud.deploy.v1.Release$RenderState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1656,7 +2322,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Phase$State", + "name": "com.google.cloud.deploy.v1.Release$SkaffoldSupportedCondition", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1665,7 +2331,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.PipelineCondition", + "name": "com.google.cloud.deploy.v1.Release$SkaffoldSupportedCondition$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1674,7 +2340,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.PipelineCondition$Builder", + "name": "com.google.cloud.deploy.v1.Release$TargetRender", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1683,7 +2349,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.PipelineReadyCondition", + "name": "com.google.cloud.deploy.v1.Release$TargetRender$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1692,7 +2358,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.PipelineReadyCondition$Builder", + "name": "com.google.cloud.deploy.v1.Release$TargetRender$FailureCause", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1701,7 +2367,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Postdeploy", + "name": "com.google.cloud.deploy.v1.Release$TargetRender$TargetRenderState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1710,7 +2376,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Postdeploy$Builder", + "name": "com.google.cloud.deploy.v1.ReleaseNotificationEvent", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1719,7 +2385,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.PostdeployJob", + "name": "com.google.cloud.deploy.v1.ReleaseNotificationEvent$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1728,7 +2394,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.PostdeployJob$Builder", + "name": "com.google.cloud.deploy.v1.ReleaseRenderEvent", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1737,7 +2403,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.PostdeployJobRun", + "name": "com.google.cloud.deploy.v1.ReleaseRenderEvent$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1746,7 +2412,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.PostdeployJobRun$Builder", + "name": "com.google.cloud.deploy.v1.RenderMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1755,7 +2421,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.PostdeployJobRun$FailureCause", + "name": "com.google.cloud.deploy.v1.RenderMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1764,7 +2430,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Predeploy", + "name": "com.google.cloud.deploy.v1.RepairMode", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1773,7 +2439,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Predeploy$Builder", + "name": "com.google.cloud.deploy.v1.RepairMode$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1782,7 +2448,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.PredeployJob", + "name": "com.google.cloud.deploy.v1.RepairPhase", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1791,7 +2457,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.PredeployJob$Builder", + "name": "com.google.cloud.deploy.v1.RepairPhase$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1800,7 +2466,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.PredeployJobRun", + "name": "com.google.cloud.deploy.v1.RepairRolloutOperation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1809,7 +2475,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.PredeployJobRun$Builder", + "name": "com.google.cloud.deploy.v1.RepairRolloutOperation$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1818,7 +2484,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.PredeployJobRun$FailureCause", + "name": "com.google.cloud.deploy.v1.RepairRolloutRule", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1827,7 +2493,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.PrivatePool", + "name": "com.google.cloud.deploy.v1.RepairRolloutRule$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1836,7 +2502,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.PrivatePool$Builder", + "name": "com.google.cloud.deploy.v1.RepairState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1845,7 +2511,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Release", + "name": "com.google.cloud.deploy.v1.Retry", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1854,7 +2520,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Release$Builder", + "name": "com.google.cloud.deploy.v1.Retry$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1863,7 +2529,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Release$ReleaseCondition", + "name": "com.google.cloud.deploy.v1.RetryAttempt", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1872,7 +2538,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Release$ReleaseCondition$Builder", + "name": "com.google.cloud.deploy.v1.RetryAttempt$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1881,7 +2547,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Release$ReleaseReadyCondition", + "name": "com.google.cloud.deploy.v1.RetryJobRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1890,7 +2556,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Release$ReleaseReadyCondition$Builder", + "name": "com.google.cloud.deploy.v1.RetryJobRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1899,7 +2565,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Release$RenderState", + "name": "com.google.cloud.deploy.v1.RetryJobResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1908,7 +2574,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Release$SkaffoldSupportedCondition", + "name": "com.google.cloud.deploy.v1.RetryJobResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1917,7 +2583,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Release$SkaffoldSupportedCondition$Builder", + "name": "com.google.cloud.deploy.v1.RetryPhase", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1926,7 +2592,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Release$TargetRender", + "name": "com.google.cloud.deploy.v1.RetryPhase$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1935,7 +2601,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Release$TargetRender$Builder", + "name": "com.google.cloud.deploy.v1.Rollback", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1944,7 +2610,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Release$TargetRender$FailureCause", + "name": "com.google.cloud.deploy.v1.Rollback$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1953,7 +2619,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Release$TargetRender$TargetRenderState", + "name": "com.google.cloud.deploy.v1.RollbackAttempt", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1962,7 +2628,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ReleaseNotificationEvent", + "name": "com.google.cloud.deploy.v1.RollbackAttempt$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1971,7 +2637,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ReleaseNotificationEvent$Builder", + "name": "com.google.cloud.deploy.v1.RollbackTargetConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1980,7 +2646,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ReleaseRenderEvent", + "name": "com.google.cloud.deploy.v1.RollbackTargetConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1989,7 +2655,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.ReleaseRenderEvent$Builder", + "name": "com.google.cloud.deploy.v1.RollbackTargetRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1998,7 +2664,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.RenderMetadata", + "name": "com.google.cloud.deploy.v1.RollbackTargetRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2007,7 +2673,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.RenderMetadata$Builder", + "name": "com.google.cloud.deploy.v1.RollbackTargetResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2016,7 +2682,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.RetryJobRequest", + "name": "com.google.cloud.deploy.v1.RollbackTargetResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2025,7 +2691,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.RetryJobRequest$Builder", + "name": "com.google.cloud.deploy.v1.Rollout", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2034,7 +2700,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.RetryJobResponse", + "name": "com.google.cloud.deploy.v1.Rollout$ApprovalState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2043,7 +2709,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.RetryJobResponse$Builder", + "name": "com.google.cloud.deploy.v1.Rollout$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2052,7 +2718,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Rollout", + "name": "com.google.cloud.deploy.v1.Rollout$FailureCause", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2061,7 +2727,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Rollout$ApprovalState", + "name": "com.google.cloud.deploy.v1.Rollout$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2070,7 +2736,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Rollout$Builder", + "name": "com.google.cloud.deploy.v1.RolloutNotificationEvent", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2079,7 +2745,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Rollout$FailureCause", + "name": "com.google.cloud.deploy.v1.RolloutNotificationEvent$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2088,7 +2754,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.Rollout$State", + "name": "com.google.cloud.deploy.v1.RolloutUpdateEvent", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2097,7 +2763,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.RolloutNotificationEvent", + "name": "com.google.cloud.deploy.v1.RolloutUpdateEvent$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2106,7 +2772,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.deploy.v1.RolloutNotificationEvent$Builder", + "name": "com.google.cloud.deploy.v1.RolloutUpdateEvent$RolloutUpdateType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2285,6 +2951,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.deploy.v1.TargetAttribute", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.TargetAttribute$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.deploy.v1.TargetNotificationEvent", "queryAllDeclaredConstructors": true, @@ -2384,6 +3068,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.deploy.v1.UpdateAutomationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.deploy.v1.UpdateAutomationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest", "queryAllDeclaredConstructors": true, diff --git a/java-deploy/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientHttpJsonTest.java b/java-deploy/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientHttpJsonTest.java index 295be1489193..6efcd46a34a0 100644 --- a/java-deploy/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientHttpJsonTest.java +++ b/java-deploy/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientHttpJsonTest.java @@ -16,6 +16,8 @@ package com.google.cloud.deploy.v1; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationRunsPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationsPagedResponse; 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; @@ -730,6 +732,106 @@ public void listTargetsExceptionTest2() throws Exception { } } + @Test + public void rollbackTargetTest() throws Exception { + RollbackTargetResponse expectedResponse = + RollbackTargetResponse.newBuilder() + .setRollbackConfig(RollbackTargetConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DeliveryPipelineName name = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + String targetId = "targetId-441951604"; + String rolloutId = "rolloutId551248556"; + + RollbackTargetResponse actualResponse = client.rollbackTarget(name, targetId, rolloutId); + 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 rollbackTargetExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DeliveryPipelineName name = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + String targetId = "targetId-441951604"; + String rolloutId = "rolloutId551248556"; + client.rollbackTarget(name, targetId, rolloutId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void rollbackTargetTest2() throws Exception { + RollbackTargetResponse expectedResponse = + RollbackTargetResponse.newBuilder() + .setRollbackConfig(RollbackTargetConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-2531/locations/location-2531/deliveryPipelines/deliveryPipeline-2531"; + String targetId = "targetId-441951604"; + String rolloutId = "rolloutId551248556"; + + RollbackTargetResponse actualResponse = client.rollbackTarget(name, targetId, rolloutId); + 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 rollbackTargetExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-2531/locations/location-2531/deliveryPipelines/deliveryPipeline-2531"; + String targetId = "targetId-441951604"; + String rolloutId = "rolloutId551248556"; + client.rollbackTarget(name, targetId, rolloutId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void getTargetTest() throws Exception { Target expectedResponse = @@ -2017,6 +2119,8 @@ public void getRolloutTest() throws Exception { .addAllPhases(new ArrayList()) .setMetadata(Metadata.newBuilder().build()) .setControllerRollout("controllerRollout-685691275") + .setRollbackOfRollout("rollbackOfRollout-1379582634") + .addAllRolledBackByRollouts(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -2083,6 +2187,8 @@ public void getRolloutTest2() throws Exception { .addAllPhases(new ArrayList()) .setMetadata(Metadata.newBuilder().build()) .setControllerRollout("controllerRollout-685691275") + .setRollbackOfRollout("rollbackOfRollout-1379582634") + .addAllRolledBackByRollouts(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -2148,6 +2254,8 @@ public void createRolloutTest() throws Exception { .addAllPhases(new ArrayList()) .setMetadata(Metadata.newBuilder().build()) .setControllerRollout("controllerRollout-685691275") + .setRollbackOfRollout("rollbackOfRollout-1379582634") + .addAllRolledBackByRollouts(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2222,6 +2330,8 @@ public void createRolloutTest2() throws Exception { .addAllPhases(new ArrayList()) .setMetadata(Metadata.newBuilder().build()) .setControllerRollout("controllerRollout-685691275") + .setRollbackOfRollout("rollbackOfRollout-1379582634") + .addAllRolledBackByRollouts(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2891,6 +3001,869 @@ public void getConfigExceptionTest2() throws Exception { } } + @Test + public void createAutomationTest() throws Exception { + Automation expectedResponse = + Automation.newBuilder() + .setName( + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setSuspended(true) + .setServiceAccount("serviceAccount1079137720") + .setSelector(AutomationResourceSelector.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAutomationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DeliveryPipelineName parent = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + Automation automation = Automation.newBuilder().build(); + String automationId = "automationId64173202"; + + Automation actualResponse = + client.createAutomationAsync(parent, automation, automationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createAutomationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DeliveryPipelineName parent = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + Automation automation = Automation.newBuilder().build(); + String automationId = "automationId64173202"; + client.createAutomationAsync(parent, automation, automationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createAutomationTest2() throws Exception { + Automation expectedResponse = + Automation.newBuilder() + .setName( + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setSuspended(true) + .setServiceAccount("serviceAccount1079137720") + .setSelector(AutomationResourceSelector.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAutomationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = + "projects/project-5586/locations/location-5586/deliveryPipelines/deliveryPipeline-5586"; + Automation automation = Automation.newBuilder().build(); + String automationId = "automationId64173202"; + + Automation actualResponse = + client.createAutomationAsync(parent, automation, automationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createAutomationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-5586/locations/location-5586/deliveryPipelines/deliveryPipeline-5586"; + Automation automation = Automation.newBuilder().build(); + String automationId = "automationId64173202"; + client.createAutomationAsync(parent, automation, automationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateAutomationTest() throws Exception { + Automation expectedResponse = + Automation.newBuilder() + .setName( + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setSuspended(true) + .setServiceAccount("serviceAccount1079137720") + .setSelector(AutomationResourceSelector.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateAutomationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + Automation automation = + Automation.newBuilder() + .setName( + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setSuspended(true) + .setServiceAccount("serviceAccount1079137720") + .setSelector(AutomationResourceSelector.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Automation actualResponse = client.updateAutomationAsync(automation, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateAutomationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Automation automation = + Automation.newBuilder() + .setName( + AutomationName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setSuspended(true) + .setServiceAccount("serviceAccount1079137720") + .setSelector(AutomationResourceSelector.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAutomationAsync(automation, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteAutomationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAutomationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AutomationName name = + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]"); + + client.deleteAutomationAsync(name).get(); + + 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 deleteAutomationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AutomationName name = + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]"); + client.deleteAutomationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteAutomationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAutomationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-3803/locations/location-3803/deliveryPipelines/deliveryPipeline-3803/automations/automation-3803"; + + client.deleteAutomationAsync(name).get(); + + 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 deleteAutomationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3803/locations/location-3803/deliveryPipelines/deliveryPipeline-3803/automations/automation-3803"; + client.deleteAutomationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getAutomationTest() throws Exception { + Automation expectedResponse = + Automation.newBuilder() + .setName( + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setSuspended(true) + .setServiceAccount("serviceAccount1079137720") + .setSelector(AutomationResourceSelector.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + AutomationName name = + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]"); + + Automation actualResponse = client.getAutomation(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 getAutomationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AutomationName name = + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]"); + client.getAutomation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAutomationTest2() throws Exception { + Automation expectedResponse = + Automation.newBuilder() + .setName( + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setSuspended(true) + .setServiceAccount("serviceAccount1079137720") + .setSelector(AutomationResourceSelector.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-3803/locations/location-3803/deliveryPipelines/deliveryPipeline-3803/automations/automation-3803"; + + Automation actualResponse = client.getAutomation(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 getAutomationExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3803/locations/location-3803/deliveryPipelines/deliveryPipeline-3803/automations/automation-3803"; + client.getAutomation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAutomationsTest() throws Exception { + Automation responsesElement = Automation.newBuilder().build(); + ListAutomationsResponse expectedResponse = + ListAutomationsResponse.newBuilder() + .setNextPageToken("") + .addAllAutomations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + DeliveryPipelineName parent = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + + ListAutomationsPagedResponse pagedListResponse = client.listAutomations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAutomationsList().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 listAutomationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DeliveryPipelineName parent = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + client.listAutomations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAutomationsTest2() throws Exception { + Automation responsesElement = Automation.newBuilder().build(); + ListAutomationsResponse expectedResponse = + ListAutomationsResponse.newBuilder() + .setNextPageToken("") + .addAllAutomations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-5586/locations/location-5586/deliveryPipelines/deliveryPipeline-5586"; + + ListAutomationsPagedResponse pagedListResponse = client.listAutomations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAutomationsList().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 listAutomationsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-5586/locations/location-5586/deliveryPipelines/deliveryPipeline-5586"; + client.listAutomations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAutomationRunTest() throws Exception { + AutomationRun expectedResponse = + AutomationRun.newBuilder() + .setName( + AutomationRunName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .setServiceAccount("serviceAccount1079137720") + .setAutomationSnapshot(Automation.newBuilder().build()) + .setTargetId("targetId-441951604") + .setStateDescription("stateDescription-1173318997") + .setExpireTime(Timestamp.newBuilder().build()) + .setRuleId("ruleId-919875273") + .setAutomationId("automationId64173202") + .setWaitUntilTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + AutomationRunName name = + AutomationRunName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]"); + + AutomationRun actualResponse = client.getAutomationRun(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 getAutomationRunExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AutomationRunName name = + AutomationRunName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]"); + client.getAutomationRun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAutomationRunTest2() throws Exception { + AutomationRun expectedResponse = + AutomationRun.newBuilder() + .setName( + AutomationRunName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .setServiceAccount("serviceAccount1079137720") + .setAutomationSnapshot(Automation.newBuilder().build()) + .setTargetId("targetId-441951604") + .setStateDescription("stateDescription-1173318997") + .setExpireTime(Timestamp.newBuilder().build()) + .setRuleId("ruleId-919875273") + .setAutomationId("automationId64173202") + .setWaitUntilTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-3466/locations/location-3466/deliveryPipelines/deliveryPipeline-3466/automationRuns/automationRun-3466"; + + AutomationRun actualResponse = client.getAutomationRun(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 getAutomationRunExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3466/locations/location-3466/deliveryPipelines/deliveryPipeline-3466/automationRuns/automationRun-3466"; + client.getAutomationRun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAutomationRunsTest() throws Exception { + AutomationRun responsesElement = AutomationRun.newBuilder().build(); + ListAutomationRunsResponse expectedResponse = + ListAutomationRunsResponse.newBuilder() + .setNextPageToken("") + .addAllAutomationRuns(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + DeliveryPipelineName parent = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + + ListAutomationRunsPagedResponse pagedListResponse = client.listAutomationRuns(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAutomationRunsList().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 listAutomationRunsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DeliveryPipelineName parent = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + client.listAutomationRuns(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAutomationRunsTest2() throws Exception { + AutomationRun responsesElement = AutomationRun.newBuilder().build(); + ListAutomationRunsResponse expectedResponse = + ListAutomationRunsResponse.newBuilder() + .setNextPageToken("") + .addAllAutomationRuns(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-5586/locations/location-5586/deliveryPipelines/deliveryPipeline-5586"; + + ListAutomationRunsPagedResponse pagedListResponse = client.listAutomationRuns(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAutomationRunsList().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 listAutomationRunsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-5586/locations/location-5586/deliveryPipelines/deliveryPipeline-5586"; + client.listAutomationRuns(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelAutomationRunTest() throws Exception { + CancelAutomationRunResponse expectedResponse = CancelAutomationRunResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + AutomationRunName name = + AutomationRunName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]"); + + CancelAutomationRunResponse actualResponse = client.cancelAutomationRun(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 cancelAutomationRunExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AutomationRunName name = + AutomationRunName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]"); + client.cancelAutomationRun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelAutomationRunTest2() throws Exception { + CancelAutomationRunResponse expectedResponse = CancelAutomationRunResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-3466/locations/location-3466/deliveryPipelines/deliveryPipeline-3466/automationRuns/automationRun-3466"; + + CancelAutomationRunResponse actualResponse = client.cancelAutomationRun(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 cancelAutomationRunExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3466/locations/location-3466/deliveryPipelines/deliveryPipeline-3466/automationRuns/automationRun-3466"; + client.cancelAutomationRun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-deploy/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientTest.java b/java-deploy/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientTest.java index 44ac5a14b40a..63dc1024512a 100644 --- a/java-deploy/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientTest.java +++ b/java-deploy/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/CloudDeployClientTest.java @@ -16,6 +16,8 @@ package com.google.cloud.deploy.v1; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationRunsPagedResponse; +import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationsPagedResponse; 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; @@ -668,6 +670,96 @@ public void listTargetsExceptionTest2() throws Exception { } } + @Test + public void rollbackTargetTest() throws Exception { + RollbackTargetResponse expectedResponse = + RollbackTargetResponse.newBuilder() + .setRollbackConfig(RollbackTargetConfig.newBuilder().build()) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + DeliveryPipelineName name = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + String targetId = "targetId-441951604"; + String rolloutId = "rolloutId551248556"; + + RollbackTargetResponse actualResponse = client.rollbackTarget(name, targetId, rolloutId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RollbackTargetRequest actualRequest = ((RollbackTargetRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertEquals(targetId, actualRequest.getTargetId()); + Assert.assertEquals(rolloutId, actualRequest.getRolloutId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rollbackTargetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + DeliveryPipelineName name = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + String targetId = "targetId-441951604"; + String rolloutId = "rolloutId551248556"; + client.rollbackTarget(name, targetId, rolloutId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void rollbackTargetTest2() throws Exception { + RollbackTargetResponse expectedResponse = + RollbackTargetResponse.newBuilder() + .setRollbackConfig(RollbackTargetConfig.newBuilder().build()) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + String name = "name3373707"; + String targetId = "targetId-441951604"; + String rolloutId = "rolloutId551248556"; + + RollbackTargetResponse actualResponse = client.rollbackTarget(name, targetId, rolloutId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RollbackTargetRequest actualRequest = ((RollbackTargetRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(targetId, actualRequest.getTargetId()); + Assert.assertEquals(rolloutId, actualRequest.getRolloutId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void rollbackTargetExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String name = "name3373707"; + String targetId = "targetId-441951604"; + String rolloutId = "rolloutId551248556"; + client.rollbackTarget(name, targetId, rolloutId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void getTargetTest() throws Exception { Target expectedResponse = @@ -1805,6 +1897,8 @@ public void getRolloutTest() throws Exception { .addAllPhases(new ArrayList()) .setMetadata(Metadata.newBuilder().build()) .setControllerRollout("controllerRollout-685691275") + .setRollbackOfRollout("rollbackOfRollout-1379582634") + .addAllRolledBackByRollouts(new ArrayList()) .build(); mockCloudDeploy.addResponse(expectedResponse); @@ -1865,6 +1959,8 @@ public void getRolloutTest2() throws Exception { .addAllPhases(new ArrayList()) .setMetadata(Metadata.newBuilder().build()) .setControllerRollout("controllerRollout-685691275") + .setRollbackOfRollout("rollbackOfRollout-1379582634") + .addAllRolledBackByRollouts(new ArrayList()) .build(); mockCloudDeploy.addResponse(expectedResponse); @@ -1922,6 +2018,8 @@ public void createRolloutTest() throws Exception { .addAllPhases(new ArrayList()) .setMetadata(Metadata.newBuilder().build()) .setControllerRollout("controllerRollout-685691275") + .setRollbackOfRollout("rollbackOfRollout-1379582634") + .addAllRolledBackByRollouts(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -1995,6 +2093,8 @@ public void createRolloutTest2() throws Exception { .addAllPhases(new ArrayList()) .setMetadata(Metadata.newBuilder().build()) .setControllerRollout("controllerRollout-685691275") + .setRollbackOfRollout("rollbackOfRollout-1379582634") + .addAllRolledBackByRollouts(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -2587,6 +2687,752 @@ public void getConfigExceptionTest2() throws Exception { } } + @Test + public void createAutomationTest() throws Exception { + Automation expectedResponse = + Automation.newBuilder() + .setName( + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setSuspended(true) + .setServiceAccount("serviceAccount1079137720") + .setSelector(AutomationResourceSelector.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAutomationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudDeploy.addResponse(resultOperation); + + DeliveryPipelineName parent = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + Automation automation = Automation.newBuilder().build(); + String automationId = "automationId64173202"; + + Automation actualResponse = + client.createAutomationAsync(parent, automation, automationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAutomationRequest actualRequest = ((CreateAutomationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(automation, actualRequest.getAutomation()); + Assert.assertEquals(automationId, actualRequest.getAutomationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAutomationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + DeliveryPipelineName parent = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + Automation automation = Automation.newBuilder().build(); + String automationId = "automationId64173202"; + client.createAutomationAsync(parent, automation, automationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createAutomationTest2() throws Exception { + Automation expectedResponse = + Automation.newBuilder() + .setName( + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setSuspended(true) + .setServiceAccount("serviceAccount1079137720") + .setSelector(AutomationResourceSelector.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAutomationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudDeploy.addResponse(resultOperation); + + String parent = "parent-995424086"; + Automation automation = Automation.newBuilder().build(); + String automationId = "automationId64173202"; + + Automation actualResponse = + client.createAutomationAsync(parent, automation, automationId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAutomationRequest actualRequest = ((CreateAutomationRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(automation, actualRequest.getAutomation()); + Assert.assertEquals(automationId, actualRequest.getAutomationId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAutomationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String parent = "parent-995424086"; + Automation automation = Automation.newBuilder().build(); + String automationId = "automationId64173202"; + client.createAutomationAsync(parent, automation, automationId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateAutomationTest() throws Exception { + Automation expectedResponse = + Automation.newBuilder() + .setName( + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setSuspended(true) + .setServiceAccount("serviceAccount1079137720") + .setSelector(AutomationResourceSelector.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateAutomationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudDeploy.addResponse(resultOperation); + + Automation automation = Automation.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Automation actualResponse = client.updateAutomationAsync(automation, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAutomationRequest actualRequest = ((UpdateAutomationRequest) actualRequests.get(0)); + + Assert.assertEquals(automation, actualRequest.getAutomation()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAutomationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + Automation automation = Automation.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAutomationAsync(automation, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteAutomationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAutomationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudDeploy.addResponse(resultOperation); + + AutomationName name = + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]"); + + client.deleteAutomationAsync(name).get(); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAutomationRequest actualRequest = ((DeleteAutomationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAutomationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + AutomationName name = + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]"); + client.deleteAutomationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteAutomationTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAutomationTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudDeploy.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteAutomationAsync(name).get(); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAutomationRequest actualRequest = ((DeleteAutomationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAutomationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String name = "name3373707"; + client.deleteAutomationAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getAutomationTest() throws Exception { + Automation expectedResponse = + Automation.newBuilder() + .setName( + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setSuspended(true) + .setServiceAccount("serviceAccount1079137720") + .setSelector(AutomationResourceSelector.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + AutomationName name = + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]"); + + Automation actualResponse = client.getAutomation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAutomationRequest actualRequest = ((GetAutomationRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAutomationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + AutomationName name = + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]"); + client.getAutomation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAutomationTest2() throws Exception { + Automation expectedResponse = + Automation.newBuilder() + .setName( + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]") + .toString()) + .setUid("uid115792") + .setDescription("description-1724546052") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllAnnotations(new HashMap()) + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .setSuspended(true) + .setServiceAccount("serviceAccount1079137720") + .setSelector(AutomationResourceSelector.newBuilder().build()) + .addAllRules(new ArrayList()) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + String name = "name3373707"; + + Automation actualResponse = client.getAutomation(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAutomationRequest actualRequest = ((GetAutomationRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAutomationExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String name = "name3373707"; + client.getAutomation(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAutomationsTest() throws Exception { + Automation responsesElement = Automation.newBuilder().build(); + ListAutomationsResponse expectedResponse = + ListAutomationsResponse.newBuilder() + .setNextPageToken("") + .addAllAutomations(Arrays.asList(responsesElement)) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + DeliveryPipelineName parent = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + + ListAutomationsPagedResponse pagedListResponse = client.listAutomations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAutomationsList().get(0), resources.get(0)); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAutomationsRequest actualRequest = ((ListAutomationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAutomationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + DeliveryPipelineName parent = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + client.listAutomations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAutomationsTest2() throws Exception { + Automation responsesElement = Automation.newBuilder().build(); + ListAutomationsResponse expectedResponse = + ListAutomationsResponse.newBuilder() + .setNextPageToken("") + .addAllAutomations(Arrays.asList(responsesElement)) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAutomationsPagedResponse pagedListResponse = client.listAutomations(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAutomationsList().get(0), resources.get(0)); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAutomationsRequest actualRequest = ((ListAutomationsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAutomationsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAutomations(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAutomationRunTest() throws Exception { + AutomationRun expectedResponse = + AutomationRun.newBuilder() + .setName( + AutomationRunName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .setServiceAccount("serviceAccount1079137720") + .setAutomationSnapshot(Automation.newBuilder().build()) + .setTargetId("targetId-441951604") + .setStateDescription("stateDescription-1173318997") + .setExpireTime(Timestamp.newBuilder().build()) + .setRuleId("ruleId-919875273") + .setAutomationId("automationId64173202") + .setWaitUntilTime(Timestamp.newBuilder().build()) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + AutomationRunName name = + AutomationRunName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]"); + + AutomationRun actualResponse = client.getAutomationRun(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAutomationRunRequest actualRequest = ((GetAutomationRunRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAutomationRunExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + AutomationRunName name = + AutomationRunName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]"); + client.getAutomationRun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAutomationRunTest2() throws Exception { + AutomationRun expectedResponse = + AutomationRun.newBuilder() + .setName( + AutomationRunName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]") + .toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setEtag("etag3123477") + .setServiceAccount("serviceAccount1079137720") + .setAutomationSnapshot(Automation.newBuilder().build()) + .setTargetId("targetId-441951604") + .setStateDescription("stateDescription-1173318997") + .setExpireTime(Timestamp.newBuilder().build()) + .setRuleId("ruleId-919875273") + .setAutomationId("automationId64173202") + .setWaitUntilTime(Timestamp.newBuilder().build()) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + String name = "name3373707"; + + AutomationRun actualResponse = client.getAutomationRun(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAutomationRunRequest actualRequest = ((GetAutomationRunRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAutomationRunExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String name = "name3373707"; + client.getAutomationRun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAutomationRunsTest() throws Exception { + AutomationRun responsesElement = AutomationRun.newBuilder().build(); + ListAutomationRunsResponse expectedResponse = + ListAutomationRunsResponse.newBuilder() + .setNextPageToken("") + .addAllAutomationRuns(Arrays.asList(responsesElement)) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + DeliveryPipelineName parent = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + + ListAutomationRunsPagedResponse pagedListResponse = client.listAutomationRuns(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAutomationRunsList().get(0), resources.get(0)); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAutomationRunsRequest actualRequest = ((ListAutomationRunsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAutomationRunsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + DeliveryPipelineName parent = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + client.listAutomationRuns(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAutomationRunsTest2() throws Exception { + AutomationRun responsesElement = AutomationRun.newBuilder().build(); + ListAutomationRunsResponse expectedResponse = + ListAutomationRunsResponse.newBuilder() + .setNextPageToken("") + .addAllAutomationRuns(Arrays.asList(responsesElement)) + .build(); + mockCloudDeploy.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAutomationRunsPagedResponse pagedListResponse = client.listAutomationRuns(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAutomationRunsList().get(0), resources.get(0)); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAutomationRunsRequest actualRequest = ((ListAutomationRunsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAutomationRunsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAutomationRuns(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelAutomationRunTest() throws Exception { + CancelAutomationRunResponse expectedResponse = CancelAutomationRunResponse.newBuilder().build(); + mockCloudDeploy.addResponse(expectedResponse); + + AutomationRunName name = + AutomationRunName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]"); + + CancelAutomationRunResponse actualResponse = client.cancelAutomationRun(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelAutomationRunRequest actualRequest = ((CancelAutomationRunRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelAutomationRunExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + AutomationRunName name = + AutomationRunName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]"); + client.cancelAutomationRun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelAutomationRunTest2() throws Exception { + CancelAutomationRunResponse expectedResponse = CancelAutomationRunResponse.newBuilder().build(); + mockCloudDeploy.addResponse(expectedResponse); + + String name = "name3373707"; + + CancelAutomationRunResponse actualResponse = client.cancelAutomationRun(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudDeploy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelAutomationRunRequest actualRequest = ((CancelAutomationRunRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelAutomationRunExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudDeploy.addException(exception); + + try { + String name = "name3373707"; + client.cancelAutomationRun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-deploy/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockCloudDeployImpl.java b/java-deploy/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockCloudDeployImpl.java index 25e90e8ca488..2792ba328d57 100644 --- a/java-deploy/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockCloudDeployImpl.java +++ b/java-deploy/google-cloud-deploy/src/test/java/com/google/cloud/deploy/v1/MockCloudDeployImpl.java @@ -186,6 +186,27 @@ public void listTargets( } } + @Override + public void rollbackTarget( + RollbackTargetRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RollbackTargetResponse) { + requests.add(request); + responseObserver.onNext(((RollbackTargetResponse) 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 RollbackTarget, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RollbackTargetResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void getTarget(GetTargetRequest request, StreamObserver responseObserver) { Object response = responses.poll(); @@ -599,4 +620,174 @@ public void getConfig(GetConfigRequest request, StreamObserver responseO Exception.class.getName()))); } } + + @Override + public void createAutomation( + CreateAutomationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateAutomation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAutomation( + UpdateAutomationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateAutomation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteAutomation( + DeleteAutomationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteAutomation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAutomation( + GetAutomationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Automation) { + requests.add(request); + responseObserver.onNext(((Automation) 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 GetAutomation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Automation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAutomations( + ListAutomationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAutomationsResponse) { + requests.add(request); + responseObserver.onNext(((ListAutomationsResponse) 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 ListAutomations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAutomationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAutomationRun( + GetAutomationRunRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AutomationRun) { + requests.add(request); + responseObserver.onNext(((AutomationRun) 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 GetAutomationRun, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AutomationRun.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAutomationRuns( + ListAutomationRunsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAutomationRunsResponse) { + requests.add(request); + responseObserver.onNext(((ListAutomationRunsResponse) 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 ListAutomationRuns, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAutomationRunsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void cancelAutomationRun( + CancelAutomationRunRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof CancelAutomationRunResponse) { + requests.add(request); + responseObserver.onNext(((CancelAutomationRunResponse) 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 CancelAutomationRun, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + CancelAutomationRunResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-deploy/grpc-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployGrpc.java b/java-deploy/grpc-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployGrpc.java index de8f2984f09c..6134c4725ec5 100644 --- a/java-deploy/grpc-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployGrpc.java +++ b/java-deploy/grpc-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployGrpc.java @@ -323,6 +323,53 @@ private CloudDeployGrpc() {} return getListTargetsMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.RollbackTargetRequest, + com.google.cloud.deploy.v1.RollbackTargetResponse> + getRollbackTargetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RollbackTarget", + requestType = com.google.cloud.deploy.v1.RollbackTargetRequest.class, + responseType = com.google.cloud.deploy.v1.RollbackTargetResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.RollbackTargetRequest, + com.google.cloud.deploy.v1.RollbackTargetResponse> + getRollbackTargetMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.RollbackTargetRequest, + com.google.cloud.deploy.v1.RollbackTargetResponse> + getRollbackTargetMethod; + if ((getRollbackTargetMethod = CloudDeployGrpc.getRollbackTargetMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getRollbackTargetMethod = CloudDeployGrpc.getRollbackTargetMethod) == null) { + CloudDeployGrpc.getRollbackTargetMethod = + getRollbackTargetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RollbackTarget")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.RollbackTargetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.RollbackTargetResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudDeployMethodDescriptorSupplier("RollbackTarget")) + .build(); + } + } + } + return getRollbackTargetMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.deploy.v1.GetTargetRequest, com.google.cloud.deploy.v1.Target> getGetTargetMethod; @@ -1181,6 +1228,364 @@ private CloudDeployGrpc() {} return getGetConfigMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.CreateAutomationRequest, com.google.longrunning.Operation> + getCreateAutomationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAutomation", + requestType = com.google.cloud.deploy.v1.CreateAutomationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.CreateAutomationRequest, com.google.longrunning.Operation> + getCreateAutomationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.CreateAutomationRequest, com.google.longrunning.Operation> + getCreateAutomationMethod; + if ((getCreateAutomationMethod = CloudDeployGrpc.getCreateAutomationMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getCreateAutomationMethod = CloudDeployGrpc.getCreateAutomationMethod) == null) { + CloudDeployGrpc.getCreateAutomationMethod = + getCreateAutomationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateAutomation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.CreateAutomationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudDeployMethodDescriptorSupplier("CreateAutomation")) + .build(); + } + } + } + return getCreateAutomationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.UpdateAutomationRequest, com.google.longrunning.Operation> + getUpdateAutomationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAutomation", + requestType = com.google.cloud.deploy.v1.UpdateAutomationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.UpdateAutomationRequest, com.google.longrunning.Operation> + getUpdateAutomationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.UpdateAutomationRequest, com.google.longrunning.Operation> + getUpdateAutomationMethod; + if ((getUpdateAutomationMethod = CloudDeployGrpc.getUpdateAutomationMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getUpdateAutomationMethod = CloudDeployGrpc.getUpdateAutomationMethod) == null) { + CloudDeployGrpc.getUpdateAutomationMethod = + getUpdateAutomationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAutomation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.UpdateAutomationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudDeployMethodDescriptorSupplier("UpdateAutomation")) + .build(); + } + } + } + return getUpdateAutomationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.DeleteAutomationRequest, com.google.longrunning.Operation> + getDeleteAutomationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteAutomation", + requestType = com.google.cloud.deploy.v1.DeleteAutomationRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.DeleteAutomationRequest, com.google.longrunning.Operation> + getDeleteAutomationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.DeleteAutomationRequest, com.google.longrunning.Operation> + getDeleteAutomationMethod; + if ((getDeleteAutomationMethod = CloudDeployGrpc.getDeleteAutomationMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getDeleteAutomationMethod = CloudDeployGrpc.getDeleteAutomationMethod) == null) { + CloudDeployGrpc.getDeleteAutomationMethod = + getDeleteAutomationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAutomation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.DeleteAutomationRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudDeployMethodDescriptorSupplier("DeleteAutomation")) + .build(); + } + } + } + return getDeleteAutomationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetAutomationRequest, com.google.cloud.deploy.v1.Automation> + getGetAutomationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAutomation", + requestType = com.google.cloud.deploy.v1.GetAutomationRequest.class, + responseType = com.google.cloud.deploy.v1.Automation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetAutomationRequest, com.google.cloud.deploy.v1.Automation> + getGetAutomationMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetAutomationRequest, com.google.cloud.deploy.v1.Automation> + getGetAutomationMethod; + if ((getGetAutomationMethod = CloudDeployGrpc.getGetAutomationMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getGetAutomationMethod = CloudDeployGrpc.getGetAutomationMethod) == null) { + CloudDeployGrpc.getGetAutomationMethod = + getGetAutomationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAutomation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.GetAutomationRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.Automation.getDefaultInstance())) + .setSchemaDescriptor(new CloudDeployMethodDescriptorSupplier("GetAutomation")) + .build(); + } + } + } + return getGetAutomationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListAutomationsRequest, + com.google.cloud.deploy.v1.ListAutomationsResponse> + getListAutomationsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAutomations", + requestType = com.google.cloud.deploy.v1.ListAutomationsRequest.class, + responseType = com.google.cloud.deploy.v1.ListAutomationsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListAutomationsRequest, + com.google.cloud.deploy.v1.ListAutomationsResponse> + getListAutomationsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListAutomationsRequest, + com.google.cloud.deploy.v1.ListAutomationsResponse> + getListAutomationsMethod; + if ((getListAutomationsMethod = CloudDeployGrpc.getListAutomationsMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getListAutomationsMethod = CloudDeployGrpc.getListAutomationsMethod) == null) { + CloudDeployGrpc.getListAutomationsMethod = + getListAutomationsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAutomations")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.ListAutomationsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.ListAutomationsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudDeployMethodDescriptorSupplier("ListAutomations")) + .build(); + } + } + } + return getListAutomationsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetAutomationRunRequest, + com.google.cloud.deploy.v1.AutomationRun> + getGetAutomationRunMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAutomationRun", + requestType = com.google.cloud.deploy.v1.GetAutomationRunRequest.class, + responseType = com.google.cloud.deploy.v1.AutomationRun.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetAutomationRunRequest, + com.google.cloud.deploy.v1.AutomationRun> + getGetAutomationRunMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.GetAutomationRunRequest, + com.google.cloud.deploy.v1.AutomationRun> + getGetAutomationRunMethod; + if ((getGetAutomationRunMethod = CloudDeployGrpc.getGetAutomationRunMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getGetAutomationRunMethod = CloudDeployGrpc.getGetAutomationRunMethod) == null) { + CloudDeployGrpc.getGetAutomationRunMethod = + getGetAutomationRunMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAutomationRun")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.GetAutomationRunRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.AutomationRun.getDefaultInstance())) + .setSchemaDescriptor( + new CloudDeployMethodDescriptorSupplier("GetAutomationRun")) + .build(); + } + } + } + return getGetAutomationRunMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListAutomationRunsRequest, + com.google.cloud.deploy.v1.ListAutomationRunsResponse> + getListAutomationRunsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAutomationRuns", + requestType = com.google.cloud.deploy.v1.ListAutomationRunsRequest.class, + responseType = com.google.cloud.deploy.v1.ListAutomationRunsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListAutomationRunsRequest, + com.google.cloud.deploy.v1.ListAutomationRunsResponse> + getListAutomationRunsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.ListAutomationRunsRequest, + com.google.cloud.deploy.v1.ListAutomationRunsResponse> + getListAutomationRunsMethod; + if ((getListAutomationRunsMethod = CloudDeployGrpc.getListAutomationRunsMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getListAutomationRunsMethod = CloudDeployGrpc.getListAutomationRunsMethod) == null) { + CloudDeployGrpc.getListAutomationRunsMethod = + getListAutomationRunsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAutomationRuns")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.ListAutomationRunsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.ListAutomationRunsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudDeployMethodDescriptorSupplier("ListAutomationRuns")) + .build(); + } + } + } + return getListAutomationRunsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.CancelAutomationRunRequest, + com.google.cloud.deploy.v1.CancelAutomationRunResponse> + getCancelAutomationRunMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CancelAutomationRun", + requestType = com.google.cloud.deploy.v1.CancelAutomationRunRequest.class, + responseType = com.google.cloud.deploy.v1.CancelAutomationRunResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.CancelAutomationRunRequest, + com.google.cloud.deploy.v1.CancelAutomationRunResponse> + getCancelAutomationRunMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.deploy.v1.CancelAutomationRunRequest, + com.google.cloud.deploy.v1.CancelAutomationRunResponse> + getCancelAutomationRunMethod; + if ((getCancelAutomationRunMethod = CloudDeployGrpc.getCancelAutomationRunMethod) == null) { + synchronized (CloudDeployGrpc.class) { + if ((getCancelAutomationRunMethod = CloudDeployGrpc.getCancelAutomationRunMethod) == null) { + CloudDeployGrpc.getCancelAutomationRunMethod = + getCancelAutomationRunMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CancelAutomationRun")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.CancelAutomationRunRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.deploy.v1.CancelAutomationRunResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudDeployMethodDescriptorSupplier("CancelAutomationRun")) + .build(); + } + } + } + return getCancelAutomationRunMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static CloudDeployStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -1317,6 +1722,21 @@ default void listTargets( getListTargetsMethod(), responseObserver); } + /** + * + * + *
+     * Creates a `Rollout` to roll back the specified target.
+     * 
+ */ + default void rollbackTarget( + com.google.cloud.deploy.v1.RollbackTargetRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRollbackTargetMethod(), responseObserver); + } + /** * * @@ -1598,28 +2018,146 @@ default void getConfig( io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetConfigMethod(), responseObserver); } - } - - /** - * Base class for the server implementation of the service CloudDeploy. - * - *
-   * CloudDeploy service creates and manages Continuous Delivery operations
-   * on Google Cloud Platform via Skaffold (https://skaffold.dev).
-   * 
- */ - public abstract static class CloudDeployImplBase - implements io.grpc.BindableService, AsyncService { - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return CloudDeployGrpc.bindService(this); + /** + * + * + *
+     * Creates a new Automation in a given project and location.
+     * 
+ */ + default void createAutomation( + com.google.cloud.deploy.v1.CreateAutomationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAutomationMethod(), responseObserver); } - } - /** - * A stub to allow clients to do asynchronous rpc calls to service CloudDeploy. - * + /** + * + * + *
+     * Updates the parameters of a single Automation resource.
+     * 
+ */ + default void updateAutomation( + com.google.cloud.deploy.v1.UpdateAutomationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAutomationMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a single Automation resource.
+     * 
+ */ + default void deleteAutomation( + com.google.cloud.deploy.v1.DeleteAutomationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAutomationMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Automation.
+     * 
+ */ + default void getAutomation( + com.google.cloud.deploy.v1.GetAutomationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAutomationMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Automations in a given project and location.
+     * 
+ */ + default void listAutomations( + com.google.cloud.deploy.v1.ListAutomationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAutomationsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets details of a single AutomationRun.
+     * 
+ */ + default void getAutomationRun( + com.google.cloud.deploy.v1.GetAutomationRunRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAutomationRunMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists AutomationRuns in a given project and location.
+     * 
+ */ + default void listAutomationRuns( + com.google.cloud.deploy.v1.ListAutomationRunsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAutomationRunsMethod(), responseObserver); + } + + /** + * + * + *
+     * Cancels an AutomationRun. The `state` of the `AutomationRun` after
+     * cancelling is `CANCELLED`. `CancelAutomationRun` can be called on
+     * AutomationRun in the state `IN_PROGRESS` and `PENDING`; AutomationRun
+     * in a different state returns an `FAILED_PRECONDITION` error.
+     * 
+ */ + default void cancelAutomationRun( + com.google.cloud.deploy.v1.CancelAutomationRunRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCancelAutomationRunMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service CloudDeploy. + * + *
+   * CloudDeploy service creates and manages Continuous Delivery operations
+   * on Google Cloud Platform via Skaffold (https://skaffold.dev).
+   * 
+ */ + public abstract static class CloudDeployImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return CloudDeployGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service CloudDeploy. + * *
    * CloudDeploy service creates and manages Continuous Delivery operations
    * on Google Cloud Platform via Skaffold (https://skaffold.dev).
@@ -1734,6 +2272,23 @@ public void listTargets(
           responseObserver);
     }
 
+    /**
+     *
+     *
+     * 
+     * Creates a `Rollout` to roll back the specified target.
+     * 
+ */ + public void rollbackTarget( + com.google.cloud.deploy.v1.RollbackTargetRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRollbackTargetMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -2048,6 +2603,140 @@ public void getConfig( io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetConfigMethod(), getCallOptions()), request, responseObserver); } + + /** + * + * + *
+     * Creates a new Automation in a given project and location.
+     * 
+ */ + public void createAutomation( + com.google.cloud.deploy.v1.CreateAutomationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAutomationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the parameters of a single Automation resource.
+     * 
+ */ + public void updateAutomation( + com.google.cloud.deploy.v1.UpdateAutomationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAutomationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a single Automation resource.
+     * 
+ */ + public void deleteAutomation( + com.google.cloud.deploy.v1.DeleteAutomationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAutomationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single Automation.
+     * 
+ */ + public void getAutomation( + com.google.cloud.deploy.v1.GetAutomationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAutomationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Automations in a given project and location.
+     * 
+ */ + public void listAutomations( + com.google.cloud.deploy.v1.ListAutomationsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAutomationsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets details of a single AutomationRun.
+     * 
+ */ + public void getAutomationRun( + com.google.cloud.deploy.v1.GetAutomationRunRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAutomationRunMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists AutomationRuns in a given project and location.
+     * 
+ */ + public void listAutomationRuns( + com.google.cloud.deploy.v1.ListAutomationRunsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAutomationRunsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Cancels an AutomationRun. The `state` of the `AutomationRun` after
+     * cancelling is `CANCELLED`. `CancelAutomationRun` can be called on
+     * AutomationRun in the state `IN_PROGRESS` and `PENDING`; AutomationRun
+     * in a different state returns an `FAILED_PRECONDITION` error.
+     * 
+ */ + public void cancelAutomationRun( + com.google.cloud.deploy.v1.CancelAutomationRunRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCancelAutomationRunMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -2148,6 +2837,19 @@ public com.google.cloud.deploy.v1.ListTargetsResponse listTargets( getChannel(), getListTargetsMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Creates a `Rollout` to roll back the specified target.
+     * 
+ */ + public com.google.cloud.deploy.v1.RollbackTargetResponse rollbackTarget( + com.google.cloud.deploy.v1.RollbackTargetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRollbackTargetMethod(), getCallOptions(), request); + } + /** * * @@ -2407,6 +3109,113 @@ public com.google.cloud.deploy.v1.Config getConfig( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetConfigMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Creates a new Automation in a given project and location.
+     * 
+ */ + public com.google.longrunning.Operation createAutomation( + com.google.cloud.deploy.v1.CreateAutomationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAutomationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Automation resource.
+     * 
+ */ + public com.google.longrunning.Operation updateAutomation( + com.google.cloud.deploy.v1.UpdateAutomationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAutomationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a single Automation resource.
+     * 
+ */ + public com.google.longrunning.Operation deleteAutomation( + com.google.cloud.deploy.v1.DeleteAutomationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAutomationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single Automation.
+     * 
+ */ + public com.google.cloud.deploy.v1.Automation getAutomation( + com.google.cloud.deploy.v1.GetAutomationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAutomationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Automations in a given project and location.
+     * 
+ */ + public com.google.cloud.deploy.v1.ListAutomationsResponse listAutomations( + com.google.cloud.deploy.v1.ListAutomationsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAutomationsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets details of a single AutomationRun.
+     * 
+ */ + public com.google.cloud.deploy.v1.AutomationRun getAutomationRun( + com.google.cloud.deploy.v1.GetAutomationRunRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAutomationRunMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists AutomationRuns in a given project and location.
+     * 
+ */ + public com.google.cloud.deploy.v1.ListAutomationRunsResponse listAutomationRuns( + com.google.cloud.deploy.v1.ListAutomationRunsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAutomationRunsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Cancels an AutomationRun. The `state` of the `AutomationRun` after
+     * cancelling is `CANCELLED`. `CancelAutomationRun` can be called on
+     * AutomationRun in the state `IN_PROGRESS` and `PENDING`; AutomationRun
+     * in a different state returns an `FAILED_PRECONDITION` error.
+     * 
+ */ + public com.google.cloud.deploy.v1.CancelAutomationRunResponse cancelAutomationRun( + com.google.cloud.deploy.v1.CancelAutomationRunRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCancelAutomationRunMethod(), getCallOptions(), request); + } } /** @@ -2510,6 +3319,20 @@ protected CloudDeployFutureStub build( getChannel().newCall(getListTargetsMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Creates a `Rollout` to roll back the specified target.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.deploy.v1.RollbackTargetResponse> + rollbackTarget(com.google.cloud.deploy.v1.RollbackTargetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRollbackTargetMethod(), getCallOptions()), request); + } + /** * * @@ -2779,6 +3602,117 @@ protected CloudDeployFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetConfigMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Creates a new Automation in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createAutomation(com.google.cloud.deploy.v1.CreateAutomationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAutomationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the parameters of a single Automation resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateAutomation(com.google.cloud.deploy.v1.UpdateAutomationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAutomationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a single Automation resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteAutomation(com.google.cloud.deploy.v1.DeleteAutomationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteAutomationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single Automation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getAutomation(com.google.cloud.deploy.v1.GetAutomationRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAutomationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Automations in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.deploy.v1.ListAutomationsResponse> + listAutomations(com.google.cloud.deploy.v1.ListAutomationsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAutomationsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets details of a single AutomationRun.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.deploy.v1.AutomationRun> + getAutomationRun(com.google.cloud.deploy.v1.GetAutomationRunRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAutomationRunMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists AutomationRuns in a given project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.deploy.v1.ListAutomationRunsResponse> + listAutomationRuns(com.google.cloud.deploy.v1.ListAutomationRunsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAutomationRunsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Cancels an AutomationRun. The `state` of the `AutomationRun` after
+     * cancelling is `CANCELLED`. `CancelAutomationRun` can be called on
+     * AutomationRun in the state `IN_PROGRESS` and `PENDING`; AutomationRun
+     * in a different state returns an `FAILED_PRECONDITION` error.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.deploy.v1.CancelAutomationRunResponse> + cancelAutomationRun(com.google.cloud.deploy.v1.CancelAutomationRunRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCancelAutomationRunMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_DELIVERY_PIPELINES = 0; @@ -2787,26 +3721,35 @@ protected CloudDeployFutureStub build( private static final int METHODID_UPDATE_DELIVERY_PIPELINE = 3; private static final int METHODID_DELETE_DELIVERY_PIPELINE = 4; private static final int METHODID_LIST_TARGETS = 5; - private static final int METHODID_GET_TARGET = 6; - private static final int METHODID_CREATE_TARGET = 7; - private static final int METHODID_UPDATE_TARGET = 8; - private static final int METHODID_DELETE_TARGET = 9; - 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_ABANDON_RELEASE = 13; - private static final int METHODID_APPROVE_ROLLOUT = 14; - private static final int METHODID_ADVANCE_ROLLOUT = 15; - private static final int METHODID_CANCEL_ROLLOUT = 16; - private static final int METHODID_LIST_ROLLOUTS = 17; - private static final int METHODID_GET_ROLLOUT = 18; - private static final int METHODID_CREATE_ROLLOUT = 19; - private static final int METHODID_IGNORE_JOB = 20; - private static final int METHODID_RETRY_JOB = 21; - private static final int METHODID_LIST_JOB_RUNS = 22; - private static final int METHODID_GET_JOB_RUN = 23; - private static final int METHODID_TERMINATE_JOB_RUN = 24; - private static final int METHODID_GET_CONFIG = 25; + private static final int METHODID_ROLLBACK_TARGET = 6; + private static final int METHODID_GET_TARGET = 7; + private static final int METHODID_CREATE_TARGET = 8; + private static final int METHODID_UPDATE_TARGET = 9; + private static final int METHODID_DELETE_TARGET = 10; + private static final int METHODID_LIST_RELEASES = 11; + private static final int METHODID_GET_RELEASE = 12; + private static final int METHODID_CREATE_RELEASE = 13; + private static final int METHODID_ABANDON_RELEASE = 14; + private static final int METHODID_APPROVE_ROLLOUT = 15; + private static final int METHODID_ADVANCE_ROLLOUT = 16; + private static final int METHODID_CANCEL_ROLLOUT = 17; + private static final int METHODID_LIST_ROLLOUTS = 18; + private static final int METHODID_GET_ROLLOUT = 19; + private static final int METHODID_CREATE_ROLLOUT = 20; + private static final int METHODID_IGNORE_JOB = 21; + private static final int METHODID_RETRY_JOB = 22; + private static final int METHODID_LIST_JOB_RUNS = 23; + private static final int METHODID_GET_JOB_RUN = 24; + private static final int METHODID_TERMINATE_JOB_RUN = 25; + private static final int METHODID_GET_CONFIG = 26; + private static final int METHODID_CREATE_AUTOMATION = 27; + private static final int METHODID_UPDATE_AUTOMATION = 28; + private static final int METHODID_DELETE_AUTOMATION = 29; + private static final int METHODID_GET_AUTOMATION = 30; + private static final int METHODID_LIST_AUTOMATIONS = 31; + private static final int METHODID_GET_AUTOMATION_RUN = 32; + private static final int METHODID_LIST_AUTOMATION_RUNS = 33; + private static final int METHODID_CANCEL_AUTOMATION_RUN = 34; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2859,6 +3802,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_ROLLBACK_TARGET: + serviceImpl.rollbackTarget( + (com.google.cloud.deploy.v1.RollbackTargetRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_GET_TARGET: serviceImpl.getTarget( (com.google.cloud.deploy.v1.GetTargetRequest) request, @@ -2969,6 +3918,51 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.deploy.v1.GetConfigRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_CREATE_AUTOMATION: + serviceImpl.createAutomation( + (com.google.cloud.deploy.v1.CreateAutomationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_AUTOMATION: + serviceImpl.updateAutomation( + (com.google.cloud.deploy.v1.UpdateAutomationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_AUTOMATION: + serviceImpl.deleteAutomation( + (com.google.cloud.deploy.v1.DeleteAutomationRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_AUTOMATION: + serviceImpl.getAutomation( + (com.google.cloud.deploy.v1.GetAutomationRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_AUTOMATIONS: + serviceImpl.listAutomations( + (com.google.cloud.deploy.v1.ListAutomationsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_AUTOMATION_RUN: + serviceImpl.getAutomationRun( + (com.google.cloud.deploy.v1.GetAutomationRunRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_AUTOMATION_RUNS: + serviceImpl.listAutomationRuns( + (com.google.cloud.deploy.v1.ListAutomationRunsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CANCEL_AUTOMATION_RUN: + serviceImpl.cancelAutomationRun( + (com.google.cloud.deploy.v1.CancelAutomationRunRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -3026,6 +4020,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.deploy.v1.ListTargetsRequest, com.google.cloud.deploy.v1.ListTargetsResponse>( service, METHODID_LIST_TARGETS))) + .addMethod( + getRollbackTargetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.RollbackTargetRequest, + com.google.cloud.deploy.v1.RollbackTargetResponse>( + service, METHODID_ROLLBACK_TARGET))) .addMethod( getGetTargetMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -3154,6 +4155,58 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.deploy.v1.GetConfigRequest, com.google.cloud.deploy.v1.Config>( service, METHODID_GET_CONFIG))) + .addMethod( + getCreateAutomationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.CreateAutomationRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_AUTOMATION))) + .addMethod( + getUpdateAutomationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.UpdateAutomationRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_AUTOMATION))) + .addMethod( + getDeleteAutomationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.DeleteAutomationRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_AUTOMATION))) + .addMethod( + getGetAutomationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.GetAutomationRequest, + com.google.cloud.deploy.v1.Automation>(service, METHODID_GET_AUTOMATION))) + .addMethod( + getListAutomationsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.ListAutomationsRequest, + com.google.cloud.deploy.v1.ListAutomationsResponse>( + service, METHODID_LIST_AUTOMATIONS))) + .addMethod( + getGetAutomationRunMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.GetAutomationRunRequest, + com.google.cloud.deploy.v1.AutomationRun>( + service, METHODID_GET_AUTOMATION_RUN))) + .addMethod( + getListAutomationRunsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.ListAutomationRunsRequest, + com.google.cloud.deploy.v1.ListAutomationRunsResponse>( + service, METHODID_LIST_AUTOMATION_RUNS))) + .addMethod( + getCancelAutomationRunMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.deploy.v1.CancelAutomationRunRequest, + com.google.cloud.deploy.v1.CancelAutomationRunResponse>( + service, METHODID_CANCEL_AUTOMATION_RUN))) .build(); } @@ -3211,6 +4264,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getUpdateDeliveryPipelineMethod()) .addMethod(getDeleteDeliveryPipelineMethod()) .addMethod(getListTargetsMethod()) + .addMethod(getRollbackTargetMethod()) .addMethod(getGetTargetMethod()) .addMethod(getCreateTargetMethod()) .addMethod(getUpdateTargetMethod()) @@ -3231,6 +4285,14 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGetJobRunMethod()) .addMethod(getTerminateJobRunMethod()) .addMethod(getGetConfigMethod()) + .addMethod(getCreateAutomationMethod()) + .addMethod(getUpdateAutomationMethod()) + .addMethod(getDeleteAutomationMethod()) + .addMethod(getGetAutomationMethod()) + .addMethod(getListAutomationsMethod()) + .addMethod(getGetAutomationRunMethod()) + .addMethod(getListAutomationRunsMethod()) + .addMethod(getCancelAutomationRunMethod()) .build(); } } diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseRequest.java index a5cdd623e250..84a95e13c818 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseRequest.java @@ -71,8 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. Name of the Release. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`.
    * 
* * @@ -98,8 +97,7 @@ public java.lang.String getName() { * *
    * Required. Name of the Release. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`.
    * 
* * @@ -469,8 +467,7 @@ public Builder mergeFrom( * *
      * Required. Name of the Release. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`.
      * 
* * @@ -495,8 +492,7 @@ public java.lang.String getName() { * *
      * Required. Name of the Release. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`.
      * 
* * @@ -521,8 +517,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. Name of the Release. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`.
      * 
* * @@ -546,8 +541,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. Name of the Release. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`.
      * 
* * @@ -567,8 +561,7 @@ public Builder clearName() { * *
      * Required. Name of the Release. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseRequestOrBuilder.java index af3270474af8..ae72b6697e73 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AbandonReleaseRequestOrBuilder.java @@ -28,8 +28,7 @@ public interface AbandonReleaseRequestOrBuilder * *
    * Required. Name of the Release. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`.
    * 
* * @@ -44,8 +43,7 @@ public interface AbandonReleaseRequestOrBuilder * *
    * Required. Name of the Release. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceChildRolloutJobRun.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceChildRolloutJobRun.java index f24ec6c4aac3..15402eee6977 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceChildRolloutJobRun.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceChildRolloutJobRun.java @@ -72,9 +72,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Output only. Name of the `ChildRollout`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * Output only. Name of the `ChildRollout`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -97,9 +96,8 @@ public java.lang.String getRollout() { * * *
-   * Output only. Name of the `ChildRollout`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * Output only. Name of the `ChildRollout`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -542,9 +540,8 @@ public Builder mergeFrom( * * *
-     * Output only. Name of the `ChildRollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Output only. Name of the `ChildRollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -566,9 +563,8 @@ public java.lang.String getRollout() { * * *
-     * Output only. Name of the `ChildRollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Output only. Name of the `ChildRollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -590,9 +586,8 @@ public com.google.protobuf.ByteString getRolloutBytes() { * * *
-     * Output only. Name of the `ChildRollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Output only. Name of the `ChildRollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -613,9 +608,8 @@ public Builder setRollout(java.lang.String value) { * * *
-     * Output only. Name of the `ChildRollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Output only. Name of the `ChildRollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -632,9 +626,8 @@ public Builder clearRollout() { * * *
-     * Output only. Name of the `ChildRollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Output only. Name of the `ChildRollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceChildRolloutJobRunOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceChildRolloutJobRunOrBuilder.java index b1933e886cef..d2aa27599b35 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceChildRolloutJobRunOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceChildRolloutJobRunOrBuilder.java @@ -27,9 +27,8 @@ public interface AdvanceChildRolloutJobRunOrBuilder * * *
-   * Output only. Name of the `ChildRollout`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * Output only. Name of the `ChildRollout`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -41,9 +40,8 @@ public interface AdvanceChildRolloutJobRunOrBuilder * * *
-   * Output only. Name of the `ChildRollout`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * Output only. Name of the `ChildRollout`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutOperation.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutOperation.java new file mode 100644 index 000000000000..709edb675905 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutOperation.java @@ -0,0 +1,1244 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * Contains the information of an automated advance-rollout operation.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AdvanceRolloutOperation} + */ +public final class AdvanceRolloutOperation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.AdvanceRolloutOperation) + AdvanceRolloutOperationOrBuilder { + private static final long serialVersionUID = 0L; + // Use AdvanceRolloutOperation.newBuilder() to construct. + private AdvanceRolloutOperation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AdvanceRolloutOperation() { + sourcePhase_ = ""; + rollout_ = ""; + destinationPhase_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AdvanceRolloutOperation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AdvanceRolloutOperation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AdvanceRolloutOperation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AdvanceRolloutOperation.class, + com.google.cloud.deploy.v1.AdvanceRolloutOperation.Builder.class); + } + + public static final int SOURCE_PHASE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourcePhase_ = ""; + /** + * + * + *
+   * Output only. The phase of a deployment that initiated the operation.
+   * 
+ * + * string source_phase = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sourcePhase. + */ + @java.lang.Override + public java.lang.String getSourcePhase() { + java.lang.Object ref = sourcePhase_; + 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(); + sourcePhase_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The phase of a deployment that initiated the operation.
+   * 
+ * + * string source_phase = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for sourcePhase. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourcePhaseBytes() { + java.lang.Object ref = sourcePhase_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourcePhase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WAIT_FIELD_NUMBER = 2; + private com.google.protobuf.Duration wait_; + /** + * + * + *
+   * Output only. How long the operation will be paused.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the wait field is set. + */ + @java.lang.Override + public boolean hasWait() { + return wait_ != null; + } + /** + * + * + *
+   * Output only. How long the operation will be paused.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The wait. + */ + @java.lang.Override + public com.google.protobuf.Duration getWait() { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } + /** + * + * + *
+   * Output only. How long the operation will be paused.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getWaitOrBuilder() { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } + + public static final int ROLLOUT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object rollout_ = ""; + /** + * + * + *
+   * Output only. The name of the rollout that initiates the `AutomationRun`.
+   * 
+ * + * string rollout = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+   * Output only. The name of the rollout that initiates the `AutomationRun`.
+   * 
+ * + * string rollout = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 DESTINATION_PHASE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object destinationPhase_ = ""; + /** + * + * + *
+   * Output only. The phase to which the rollout will be advanced to.
+   * 
+ * + * string destination_phase = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The destinationPhase. + */ + @java.lang.Override + public java.lang.String getDestinationPhase() { + java.lang.Object ref = destinationPhase_; + 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(); + destinationPhase_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The phase to which the rollout will be advanced to.
+   * 
+ * + * string destination_phase = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for destinationPhase. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationPhaseBytes() { + java.lang.Object ref = destinationPhase_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationPhase_ = 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 (wait_ != null) { + output.writeMessage(2, getWait()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rollout_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, rollout_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationPhase_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, destinationPhase_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourcePhase_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, sourcePhase_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (wait_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getWait()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rollout_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, rollout_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationPhase_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, destinationPhase_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourcePhase_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, sourcePhase_); + } + 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.AdvanceRolloutOperation)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.AdvanceRolloutOperation other = + (com.google.cloud.deploy.v1.AdvanceRolloutOperation) obj; + + if (!getSourcePhase().equals(other.getSourcePhase())) return false; + if (hasWait() != other.hasWait()) return false; + if (hasWait()) { + if (!getWait().equals(other.getWait())) return false; + } + if (!getRollout().equals(other.getRollout())) return false; + if (!getDestinationPhase().equals(other.getDestinationPhase())) 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) + SOURCE_PHASE_FIELD_NUMBER; + hash = (53 * hash) + getSourcePhase().hashCode(); + if (hasWait()) { + hash = (37 * hash) + WAIT_FIELD_NUMBER; + hash = (53 * hash) + getWait().hashCode(); + } + hash = (37 * hash) + ROLLOUT_FIELD_NUMBER; + hash = (53 * hash) + getRollout().hashCode(); + hash = (37 * hash) + DESTINATION_PHASE_FIELD_NUMBER; + hash = (53 * hash) + getDestinationPhase().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.AdvanceRolloutOperation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AdvanceRolloutOperation 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.AdvanceRolloutOperation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AdvanceRolloutOperation 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.AdvanceRolloutOperation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AdvanceRolloutOperation 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.AdvanceRolloutOperation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AdvanceRolloutOperation 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.AdvanceRolloutOperation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AdvanceRolloutOperation 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.AdvanceRolloutOperation 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.AdvanceRolloutOperation 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.AdvanceRolloutOperation 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; + } + /** + * + * + *
+   * Contains the information of an automated advance-rollout operation.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AdvanceRolloutOperation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.AdvanceRolloutOperation) + com.google.cloud.deploy.v1.AdvanceRolloutOperationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AdvanceRolloutOperation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AdvanceRolloutOperation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AdvanceRolloutOperation.class, + com.google.cloud.deploy.v1.AdvanceRolloutOperation.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.AdvanceRolloutOperation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sourcePhase_ = ""; + wait_ = null; + if (waitBuilder_ != null) { + waitBuilder_.dispose(); + waitBuilder_ = null; + } + rollout_ = ""; + destinationPhase_ = ""; + 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_AdvanceRolloutOperation_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AdvanceRolloutOperation getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.AdvanceRolloutOperation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AdvanceRolloutOperation build() { + com.google.cloud.deploy.v1.AdvanceRolloutOperation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AdvanceRolloutOperation buildPartial() { + com.google.cloud.deploy.v1.AdvanceRolloutOperation result = + new com.google.cloud.deploy.v1.AdvanceRolloutOperation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.AdvanceRolloutOperation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sourcePhase_ = sourcePhase_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.wait_ = waitBuilder_ == null ? wait_ : waitBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.rollout_ = rollout_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.destinationPhase_ = destinationPhase_; + } + } + + @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.AdvanceRolloutOperation) { + return mergeFrom((com.google.cloud.deploy.v1.AdvanceRolloutOperation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.AdvanceRolloutOperation other) { + if (other == com.google.cloud.deploy.v1.AdvanceRolloutOperation.getDefaultInstance()) + return this; + if (!other.getSourcePhase().isEmpty()) { + sourcePhase_ = other.sourcePhase_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasWait()) { + mergeWait(other.getWait()); + } + if (!other.getRollout().isEmpty()) { + rollout_ = other.rollout_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDestinationPhase().isEmpty()) { + destinationPhase_ = other.destinationPhase_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage(getWaitFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + rollout_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + destinationPhase_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + sourcePhase_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object sourcePhase_ = ""; + /** + * + * + *
+     * Output only. The phase of a deployment that initiated the operation.
+     * 
+ * + * string source_phase = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sourcePhase. + */ + public java.lang.String getSourcePhase() { + java.lang.Object ref = sourcePhase_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourcePhase_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The phase of a deployment that initiated the operation.
+     * 
+ * + * string source_phase = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for sourcePhase. + */ + public com.google.protobuf.ByteString getSourcePhaseBytes() { + java.lang.Object ref = sourcePhase_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourcePhase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The phase of a deployment that initiated the operation.
+     * 
+ * + * string source_phase = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The sourcePhase to set. + * @return This builder for chaining. + */ + public Builder setSourcePhase(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourcePhase_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The phase of a deployment that initiated the operation.
+     * 
+ * + * string source_phase = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSourcePhase() { + sourcePhase_ = getDefaultInstance().getSourcePhase(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The phase of a deployment that initiated the operation.
+     * 
+ * + * string source_phase = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for sourcePhase to set. + * @return This builder for chaining. + */ + public Builder setSourcePhaseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourcePhase_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Duration wait_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + waitBuilder_; + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the wait field is set. + */ + public boolean hasWait() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The wait. + */ + public com.google.protobuf.Duration getWait() { + if (waitBuilder_ == null) { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } else { + return waitBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setWait(com.google.protobuf.Duration value) { + if (waitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + wait_ = value; + } else { + waitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setWait(com.google.protobuf.Duration.Builder builderForValue) { + if (waitBuilder_ == null) { + wait_ = builderForValue.build(); + } else { + waitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeWait(com.google.protobuf.Duration value) { + if (waitBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && wait_ != null + && wait_ != com.google.protobuf.Duration.getDefaultInstance()) { + getWaitBuilder().mergeFrom(value); + } else { + wait_ = value; + } + } else { + waitBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearWait() { + bitField0_ = (bitField0_ & ~0x00000002); + wait_ = null; + if (waitBuilder_ != null) { + waitBuilder_.dispose(); + waitBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Duration.Builder getWaitBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getWaitFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.DurationOrBuilder getWaitOrBuilder() { + if (waitBuilder_ != null) { + return waitBuilder_.getMessageOrBuilder(); + } else { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getWaitFieldBuilder() { + if (waitBuilder_ == null) { + waitBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getWait(), getParentForChildren(), isClean()); + wait_ = null; + } + return waitBuilder_; + } + + private java.lang.Object rollout_ = ""; + /** + * + * + *
+     * Output only. The name of the rollout that initiates the `AutomationRun`.
+     * 
+ * + * string rollout = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The name of the rollout that initiates the `AutomationRun`.
+     * 
+ * + * string rollout = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The name of the rollout that initiates the `AutomationRun`.
+     * 
+ * + * string rollout = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the rollout that initiates the `AutomationRun`.
+     * 
+ * + * string rollout = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRollout() { + rollout_ = getDefaultInstance().getRollout(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the rollout that initiates the `AutomationRun`.
+     * 
+ * + * string rollout = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object destinationPhase_ = ""; + /** + * + * + *
+     * Output only. The phase to which the rollout will be advanced to.
+     * 
+ * + * string destination_phase = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The destinationPhase. + */ + public java.lang.String getDestinationPhase() { + java.lang.Object ref = destinationPhase_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationPhase_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The phase to which the rollout will be advanced to.
+     * 
+ * + * string destination_phase = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for destinationPhase. + */ + public com.google.protobuf.ByteString getDestinationPhaseBytes() { + java.lang.Object ref = destinationPhase_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationPhase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The phase to which the rollout will be advanced to.
+     * 
+ * + * string destination_phase = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The destinationPhase to set. + * @return This builder for chaining. + */ + public Builder setDestinationPhase(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationPhase_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The phase to which the rollout will be advanced to.
+     * 
+ * + * string destination_phase = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDestinationPhase() { + destinationPhase_ = getDefaultInstance().getDestinationPhase(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The phase to which the rollout will be advanced to.
+     * 
+ * + * string destination_phase = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for destinationPhase to set. + * @return This builder for chaining. + */ + public Builder setDestinationPhaseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationPhase_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.AdvanceRolloutOperation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.AdvanceRolloutOperation) + private static final com.google.cloud.deploy.v1.AdvanceRolloutOperation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.AdvanceRolloutOperation(); + } + + public static com.google.cloud.deploy.v1.AdvanceRolloutOperation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AdvanceRolloutOperation 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.AdvanceRolloutOperation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutOperationOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutOperationOrBuilder.java new file mode 100644 index 000000000000..7ba9f284b810 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutOperationOrBuilder.java @@ -0,0 +1,135 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 AdvanceRolloutOperationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.AdvanceRolloutOperation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The phase of a deployment that initiated the operation.
+   * 
+ * + * string source_phase = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sourcePhase. + */ + java.lang.String getSourcePhase(); + /** + * + * + *
+   * Output only. The phase of a deployment that initiated the operation.
+   * 
+ * + * string source_phase = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for sourcePhase. + */ + com.google.protobuf.ByteString getSourcePhaseBytes(); + + /** + * + * + *
+   * Output only. How long the operation will be paused.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the wait field is set. + */ + boolean hasWait(); + /** + * + * + *
+   * Output only. How long the operation will be paused.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The wait. + */ + com.google.protobuf.Duration getWait(); + /** + * + * + *
+   * Output only. How long the operation will be paused.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.DurationOrBuilder getWaitOrBuilder(); + + /** + * + * + *
+   * Output only. The name of the rollout that initiates the `AutomationRun`.
+   * 
+ * + * string rollout = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The rollout. + */ + java.lang.String getRollout(); + /** + * + * + *
+   * Output only. The name of the rollout that initiates the `AutomationRun`.
+   * 
+ * + * string rollout = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for rollout. + */ + com.google.protobuf.ByteString getRolloutBytes(); + + /** + * + * + *
+   * Output only. The phase to which the rollout will be advanced to.
+   * 
+ * + * string destination_phase = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The destinationPhase. + */ + java.lang.String getDestinationPhase(); + /** + * + * + *
+   * Output only. The phase to which the rollout will be advanced to.
+   * 
+ * + * string destination_phase = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for destinationPhase. + */ + com.google.protobuf.ByteString getDestinationPhaseBytes(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutRequest.java index 989af9d51f7b..80178a66cc9c 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutRequest.java @@ -72,8 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * @@ -99,8 +98,7 @@ public java.lang.String getName() { * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * @@ -545,8 +543,7 @@ public Builder mergeFrom( * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -571,8 +568,7 @@ public java.lang.String getName() { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -597,8 +593,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -622,8 +617,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -643,8 +637,7 @@ public Builder clearName() { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutRequestOrBuilder.java index d72b006cea78..fa7fef674074 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutRequestOrBuilder.java @@ -28,8 +28,7 @@ public interface AdvanceRolloutRequestOrBuilder * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * @@ -44,8 +43,7 @@ public interface AdvanceRolloutRequestOrBuilder * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutRule.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutRule.java new file mode 100644 index 000000000000..12aa311aca18 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutRule.java @@ -0,0 +1,1507 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 `AdvanceRollout` automation rule will automatically advance a successful
+ * Rollout to the next phase.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AdvanceRolloutRule} + */ +public final class AdvanceRolloutRule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.AdvanceRolloutRule) + AdvanceRolloutRuleOrBuilder { + private static final long serialVersionUID = 0L; + // Use AdvanceRolloutRule.newBuilder() to construct. + private AdvanceRolloutRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AdvanceRolloutRule() { + id_ = ""; + sourcePhases_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AdvanceRolloutRule(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AdvanceRolloutRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AdvanceRolloutRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AdvanceRolloutRule.class, + com.google.cloud.deploy.v1.AdvanceRolloutRule.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+   * Required. ID of the rule. This id must be unique in the `Automation`
+   * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. ID of the rule. This id must be unique in the `Automation`
+   * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 SOURCE_PHASES_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList sourcePhases_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. Proceeds only after phase name matched any one in the list.
+   * This value must consist of lower-case letters, numbers, and hyphens,
+   * start with a letter and end with a letter or a number, and have a max
+   * length of 63 characters. In other words, it must match the following
+   * regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string source_phases = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the sourcePhases. + */ + public com.google.protobuf.ProtocolStringList getSourcePhasesList() { + return sourcePhases_; + } + /** + * + * + *
+   * Optional. Proceeds only after phase name matched any one in the list.
+   * This value must consist of lower-case letters, numbers, and hyphens,
+   * start with a letter and end with a letter or a number, and have a max
+   * length of 63 characters. In other words, it must match the following
+   * regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string source_phases = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of sourcePhases. + */ + public int getSourcePhasesCount() { + return sourcePhases_.size(); + } + /** + * + * + *
+   * Optional. Proceeds only after phase name matched any one in the list.
+   * This value must consist of lower-case letters, numbers, and hyphens,
+   * start with a letter and end with a letter or a number, and have a max
+   * length of 63 characters. In other words, it must match the following
+   * regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string source_phases = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The sourcePhases at the given index. + */ + public java.lang.String getSourcePhases(int index) { + return sourcePhases_.get(index); + } + /** + * + * + *
+   * Optional. Proceeds only after phase name matched any one in the list.
+   * This value must consist of lower-case letters, numbers, and hyphens,
+   * start with a letter and end with a letter or a number, and have a max
+   * length of 63 characters. In other words, it must match the following
+   * regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string source_phases = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the sourcePhases at the given index. + */ + public com.google.protobuf.ByteString getSourcePhasesBytes(int index) { + return sourcePhases_.getByteString(index); + } + + public static final int WAIT_FIELD_NUMBER = 3; + private com.google.protobuf.Duration wait_; + /** + * + * + *
+   * Optional. How long to wait after a rollout is finished.
+   * 
+ * + * .google.protobuf.Duration wait = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the wait field is set. + */ + @java.lang.Override + public boolean hasWait() { + return wait_ != null; + } + /** + * + * + *
+   * Optional. How long to wait after a rollout is finished.
+   * 
+ * + * .google.protobuf.Duration wait = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The wait. + */ + @java.lang.Override + public com.google.protobuf.Duration getWait() { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } + /** + * + * + *
+   * Optional. How long to wait after a rollout is finished.
+   * 
+ * + * .google.protobuf.Duration wait = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getWaitOrBuilder() { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } + + public static final int CONDITION_FIELD_NUMBER = 5; + private com.google.cloud.deploy.v1.AutomationRuleCondition condition_; + /** + * + * + *
+   * Output only. Information around the state of the Automation rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the condition field is set. + */ + @java.lang.Override + public boolean hasCondition() { + return condition_ != null; + } + /** + * + * + *
+   * Output only. Information around the state of the Automation rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The condition. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRuleCondition getCondition() { + return condition_ == null + ? com.google.cloud.deploy.v1.AutomationRuleCondition.getDefaultInstance() + : condition_; + } + /** + * + * + *
+   * Output only. Information around the state of the Automation rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRuleConditionOrBuilder getConditionOrBuilder() { + return condition_ == null + ? com.google.cloud.deploy.v1.AutomationRuleCondition.getDefaultInstance() + : condition_; + } + + 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 (wait_ != null) { + output.writeMessage(3, getWait()); + } + if (condition_ != null) { + output.writeMessage(5, getCondition()); + } + for (int i = 0; i < sourcePhases_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sourcePhases_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (wait_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getWait()); + } + if (condition_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCondition()); + } + { + int dataSize = 0; + for (int i = 0; i < sourcePhases_.size(); i++) { + dataSize += computeStringSizeNoTag(sourcePhases_.getRaw(i)); + } + size += dataSize; + size += 1 * getSourcePhasesList().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.AdvanceRolloutRule)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.AdvanceRolloutRule other = + (com.google.cloud.deploy.v1.AdvanceRolloutRule) obj; + + if (!getId().equals(other.getId())) return false; + if (!getSourcePhasesList().equals(other.getSourcePhasesList())) return false; + if (hasWait() != other.hasWait()) return false; + if (hasWait()) { + if (!getWait().equals(other.getWait())) return false; + } + if (hasCondition() != other.hasCondition()) return false; + if (hasCondition()) { + if (!getCondition().equals(other.getCondition())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (getSourcePhasesCount() > 0) { + hash = (37 * hash) + SOURCE_PHASES_FIELD_NUMBER; + hash = (53 * hash) + getSourcePhasesList().hashCode(); + } + if (hasWait()) { + hash = (37 * hash) + WAIT_FIELD_NUMBER; + hash = (53 * hash) + getWait().hashCode(); + } + if (hasCondition()) { + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.AdvanceRolloutRule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AdvanceRolloutRule 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.AdvanceRolloutRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AdvanceRolloutRule 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.AdvanceRolloutRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AdvanceRolloutRule 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.AdvanceRolloutRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AdvanceRolloutRule 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.AdvanceRolloutRule parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AdvanceRolloutRule 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.AdvanceRolloutRule 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.AdvanceRolloutRule 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.AdvanceRolloutRule 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 `AdvanceRollout` automation rule will automatically advance a successful
+   * Rollout to the next phase.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AdvanceRolloutRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.AdvanceRolloutRule) + com.google.cloud.deploy.v1.AdvanceRolloutRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AdvanceRolloutRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AdvanceRolloutRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AdvanceRolloutRule.class, + com.google.cloud.deploy.v1.AdvanceRolloutRule.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.AdvanceRolloutRule.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + sourcePhases_ = com.google.protobuf.LazyStringArrayList.emptyList(); + wait_ = null; + if (waitBuilder_ != null) { + waitBuilder_.dispose(); + waitBuilder_ = null; + } + condition_ = null; + if (conditionBuilder_ != null) { + conditionBuilder_.dispose(); + conditionBuilder_ = 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_AdvanceRolloutRule_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AdvanceRolloutRule getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.AdvanceRolloutRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AdvanceRolloutRule build() { + com.google.cloud.deploy.v1.AdvanceRolloutRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AdvanceRolloutRule buildPartial() { + com.google.cloud.deploy.v1.AdvanceRolloutRule result = + new com.google.cloud.deploy.v1.AdvanceRolloutRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.AdvanceRolloutRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + sourcePhases_.makeImmutable(); + result.sourcePhases_ = sourcePhases_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.wait_ = waitBuilder_ == null ? wait_ : waitBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.condition_ = conditionBuilder_ == null ? condition_ : conditionBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.AdvanceRolloutRule) { + return mergeFrom((com.google.cloud.deploy.v1.AdvanceRolloutRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.AdvanceRolloutRule other) { + if (other == com.google.cloud.deploy.v1.AdvanceRolloutRule.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.sourcePhases_.isEmpty()) { + if (sourcePhases_.isEmpty()) { + sourcePhases_ = other.sourcePhases_; + bitField0_ |= 0x00000002; + } else { + ensureSourcePhasesIsMutable(); + sourcePhases_.addAll(other.sourcePhases_); + } + onChanged(); + } + if (other.hasWait()) { + mergeWait(other.getWait()); + } + if (other.hasCondition()) { + mergeCondition(other.getCondition()); + } + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + input.readMessage(getWaitFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: + { + input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSourcePhasesIsMutable(); + sourcePhases_.add(s); + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * Required. ID of the rule. This id must be unique in the `Automation`
+     * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. ID of the rule. This id must be unique in the `Automation`
+     * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. ID of the rule. This id must be unique in the `Automation`
+     * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the rule. This id must be unique in the `Automation`
+     * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the rule. This id must be unique in the `Automation`
+     * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList sourcePhases_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureSourcePhasesIsMutable() { + if (!sourcePhases_.isModifiable()) { + sourcePhases_ = new com.google.protobuf.LazyStringArrayList(sourcePhases_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Optional. Proceeds only after phase name matched any one in the list.
+     * This value must consist of lower-case letters, numbers, and hyphens,
+     * start with a letter and end with a letter or a number, and have a max
+     * length of 63 characters. In other words, it must match the following
+     * regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string source_phases = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the sourcePhases. + */ + public com.google.protobuf.ProtocolStringList getSourcePhasesList() { + sourcePhases_.makeImmutable(); + return sourcePhases_; + } + /** + * + * + *
+     * Optional. Proceeds only after phase name matched any one in the list.
+     * This value must consist of lower-case letters, numbers, and hyphens,
+     * start with a letter and end with a letter or a number, and have a max
+     * length of 63 characters. In other words, it must match the following
+     * regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string source_phases = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of sourcePhases. + */ + public int getSourcePhasesCount() { + return sourcePhases_.size(); + } + /** + * + * + *
+     * Optional. Proceeds only after phase name matched any one in the list.
+     * This value must consist of lower-case letters, numbers, and hyphens,
+     * start with a letter and end with a letter or a number, and have a max
+     * length of 63 characters. In other words, it must match the following
+     * regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string source_phases = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The sourcePhases at the given index. + */ + public java.lang.String getSourcePhases(int index) { + return sourcePhases_.get(index); + } + /** + * + * + *
+     * Optional. Proceeds only after phase name matched any one in the list.
+     * This value must consist of lower-case letters, numbers, and hyphens,
+     * start with a letter and end with a letter or a number, and have a max
+     * length of 63 characters. In other words, it must match the following
+     * regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string source_phases = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the sourcePhases at the given index. + */ + public com.google.protobuf.ByteString getSourcePhasesBytes(int index) { + return sourcePhases_.getByteString(index); + } + /** + * + * + *
+     * Optional. Proceeds only after phase name matched any one in the list.
+     * This value must consist of lower-case letters, numbers, and hyphens,
+     * start with a letter and end with a letter or a number, and have a max
+     * length of 63 characters. In other words, it must match the following
+     * regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string source_phases = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The sourcePhases to set. + * @return This builder for chaining. + */ + public Builder setSourcePhases(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcePhasesIsMutable(); + sourcePhases_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Proceeds only after phase name matched any one in the list.
+     * This value must consist of lower-case letters, numbers, and hyphens,
+     * start with a letter and end with a letter or a number, and have a max
+     * length of 63 characters. In other words, it must match the following
+     * regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string source_phases = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The sourcePhases to add. + * @return This builder for chaining. + */ + public Builder addSourcePhases(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcePhasesIsMutable(); + sourcePhases_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Proceeds only after phase name matched any one in the list.
+     * This value must consist of lower-case letters, numbers, and hyphens,
+     * start with a letter and end with a letter or a number, and have a max
+     * length of 63 characters. In other words, it must match the following
+     * regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string source_phases = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The sourcePhases to add. + * @return This builder for chaining. + */ + public Builder addAllSourcePhases(java.lang.Iterable values) { + ensureSourcePhasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sourcePhases_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Proceeds only after phase name matched any one in the list.
+     * This value must consist of lower-case letters, numbers, and hyphens,
+     * start with a letter and end with a letter or a number, and have a max
+     * length of 63 characters. In other words, it must match the following
+     * regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string source_phases = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSourcePhases() { + sourcePhases_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Proceeds only after phase name matched any one in the list.
+     * This value must consist of lower-case letters, numbers, and hyphens,
+     * start with a letter and end with a letter or a number, and have a max
+     * length of 63 characters. In other words, it must match the following
+     * regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string source_phases = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the sourcePhases to add. + * @return This builder for chaining. + */ + public Builder addSourcePhasesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSourcePhasesIsMutable(); + sourcePhases_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Duration wait_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + waitBuilder_; + /** + * + * + *
+     * Optional. How long to wait after a rollout is finished.
+     * 
+ * + * .google.protobuf.Duration wait = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the wait field is set. + */ + public boolean hasWait() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. How long to wait after a rollout is finished.
+     * 
+ * + * .google.protobuf.Duration wait = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The wait. + */ + public com.google.protobuf.Duration getWait() { + if (waitBuilder_ == null) { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } else { + return waitBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. How long to wait after a rollout is finished.
+     * 
+ * + * .google.protobuf.Duration wait = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setWait(com.google.protobuf.Duration value) { + if (waitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + wait_ = value; + } else { + waitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. How long to wait after a rollout is finished.
+     * 
+ * + * .google.protobuf.Duration wait = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setWait(com.google.protobuf.Duration.Builder builderForValue) { + if (waitBuilder_ == null) { + wait_ = builderForValue.build(); + } else { + waitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. How long to wait after a rollout is finished.
+     * 
+ * + * .google.protobuf.Duration wait = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeWait(com.google.protobuf.Duration value) { + if (waitBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && wait_ != null + && wait_ != com.google.protobuf.Duration.getDefaultInstance()) { + getWaitBuilder().mergeFrom(value); + } else { + wait_ = value; + } + } else { + waitBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. How long to wait after a rollout is finished.
+     * 
+ * + * .google.protobuf.Duration wait = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearWait() { + bitField0_ = (bitField0_ & ~0x00000004); + wait_ = null; + if (waitBuilder_ != null) { + waitBuilder_.dispose(); + waitBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. How long to wait after a rollout is finished.
+     * 
+ * + * .google.protobuf.Duration wait = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.Duration.Builder getWaitBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getWaitFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. How long to wait after a rollout is finished.
+     * 
+ * + * .google.protobuf.Duration wait = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.DurationOrBuilder getWaitOrBuilder() { + if (waitBuilder_ != null) { + return waitBuilder_.getMessageOrBuilder(); + } else { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } + } + /** + * + * + *
+     * Optional. How long to wait after a rollout is finished.
+     * 
+ * + * .google.protobuf.Duration wait = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getWaitFieldBuilder() { + if (waitBuilder_ == null) { + waitBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getWait(), getParentForChildren(), isClean()); + wait_ = null; + } + return waitBuilder_; + } + + private com.google.cloud.deploy.v1.AutomationRuleCondition condition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationRuleCondition, + com.google.cloud.deploy.v1.AutomationRuleCondition.Builder, + com.google.cloud.deploy.v1.AutomationRuleConditionOrBuilder> + conditionBuilder_; + /** + * + * + *
+     * Output only. Information around the state of the Automation rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the condition field is set. + */ + public boolean hasCondition() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Information around the state of the Automation rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The condition. + */ + public com.google.cloud.deploy.v1.AutomationRuleCondition getCondition() { + if (conditionBuilder_ == null) { + return condition_ == null + ? com.google.cloud.deploy.v1.AutomationRuleCondition.getDefaultInstance() + : condition_; + } else { + return conditionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Information around the state of the Automation rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCondition(com.google.cloud.deploy.v1.AutomationRuleCondition value) { + if (conditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + } else { + conditionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Information around the state of the Automation rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCondition( + com.google.cloud.deploy.v1.AutomationRuleCondition.Builder builderForValue) { + if (conditionBuilder_ == null) { + condition_ = builderForValue.build(); + } else { + conditionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Information around the state of the Automation rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCondition(com.google.cloud.deploy.v1.AutomationRuleCondition value) { + if (conditionBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && condition_ != null + && condition_ + != com.google.cloud.deploy.v1.AutomationRuleCondition.getDefaultInstance()) { + getConditionBuilder().mergeFrom(value); + } else { + condition_ = value; + } + } else { + conditionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Information around the state of the Automation rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCondition() { + bitField0_ = (bitField0_ & ~0x00000008); + condition_ = null; + if (conditionBuilder_ != null) { + conditionBuilder_.dispose(); + conditionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Information around the state of the Automation rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.AutomationRuleCondition.Builder getConditionBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getConditionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Information around the state of the Automation rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.AutomationRuleConditionOrBuilder getConditionOrBuilder() { + if (conditionBuilder_ != null) { + return conditionBuilder_.getMessageOrBuilder(); + } else { + return condition_ == null + ? com.google.cloud.deploy.v1.AutomationRuleCondition.getDefaultInstance() + : condition_; + } + } + /** + * + * + *
+     * Output only. Information around the state of the Automation rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationRuleCondition, + com.google.cloud.deploy.v1.AutomationRuleCondition.Builder, + com.google.cloud.deploy.v1.AutomationRuleConditionOrBuilder> + getConditionFieldBuilder() { + if (conditionBuilder_ == null) { + conditionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationRuleCondition, + com.google.cloud.deploy.v1.AutomationRuleCondition.Builder, + com.google.cloud.deploy.v1.AutomationRuleConditionOrBuilder>( + getCondition(), getParentForChildren(), isClean()); + condition_ = null; + } + return conditionBuilder_; + } + + @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.AdvanceRolloutRule) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.AdvanceRolloutRule) + private static final com.google.cloud.deploy.v1.AdvanceRolloutRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.AdvanceRolloutRule(); + } + + public static com.google.cloud.deploy.v1.AdvanceRolloutRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AdvanceRolloutRule 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.AdvanceRolloutRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutRuleOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutRuleOrBuilder.java new file mode 100644 index 000000000000..61b447682177 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AdvanceRolloutRuleOrBuilder.java @@ -0,0 +1,195 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 AdvanceRolloutRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.AdvanceRolloutRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. ID of the rule. This id must be unique in the `Automation`
+   * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Required. ID of the rule. This id must be unique in the `Automation`
+   * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Optional. Proceeds only after phase name matched any one in the list.
+   * This value must consist of lower-case letters, numbers, and hyphens,
+   * start with a letter and end with a letter or a number, and have a max
+   * length of 63 characters. In other words, it must match the following
+   * regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string source_phases = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the sourcePhases. + */ + java.util.List getSourcePhasesList(); + /** + * + * + *
+   * Optional. Proceeds only after phase name matched any one in the list.
+   * This value must consist of lower-case letters, numbers, and hyphens,
+   * start with a letter and end with a letter or a number, and have a max
+   * length of 63 characters. In other words, it must match the following
+   * regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string source_phases = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of sourcePhases. + */ + int getSourcePhasesCount(); + /** + * + * + *
+   * Optional. Proceeds only after phase name matched any one in the list.
+   * This value must consist of lower-case letters, numbers, and hyphens,
+   * start with a letter and end with a letter or a number, and have a max
+   * length of 63 characters. In other words, it must match the following
+   * regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string source_phases = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The sourcePhases at the given index. + */ + java.lang.String getSourcePhases(int index); + /** + * + * + *
+   * Optional. Proceeds only after phase name matched any one in the list.
+   * This value must consist of lower-case letters, numbers, and hyphens,
+   * start with a letter and end with a letter or a number, and have a max
+   * length of 63 characters. In other words, it must match the following
+   * regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string source_phases = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the sourcePhases at the given index. + */ + com.google.protobuf.ByteString getSourcePhasesBytes(int index); + + /** + * + * + *
+   * Optional. How long to wait after a rollout is finished.
+   * 
+ * + * .google.protobuf.Duration wait = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the wait field is set. + */ + boolean hasWait(); + /** + * + * + *
+   * Optional. How long to wait after a rollout is finished.
+   * 
+ * + * .google.protobuf.Duration wait = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The wait. + */ + com.google.protobuf.Duration getWait(); + /** + * + * + *
+   * Optional. How long to wait after a rollout is finished.
+   * 
+ * + * .google.protobuf.Duration wait = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.DurationOrBuilder getWaitOrBuilder(); + + /** + * + * + *
+   * Output only. Information around the state of the Automation rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the condition field is set. + */ + boolean hasCondition(); + /** + * + * + *
+   * Output only. Information around the state of the Automation rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The condition. + */ + com.google.cloud.deploy.v1.AutomationRuleCondition getCondition(); + /** + * + * + *
+   * Output only. Information around the state of the Automation rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.AutomationRuleConditionOrBuilder getConditionOrBuilder(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequest.java index 9b64f8d61918..eecbc44b3c05 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequest.java @@ -71,8 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * @@ -98,8 +97,7 @@ public java.lang.String getName() { * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * @@ -509,8 +507,7 @@ public Builder mergeFrom( * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -535,8 +532,7 @@ public java.lang.String getName() { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -561,8 +557,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -586,8 +581,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -607,8 +601,7 @@ public Builder clearName() { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequestOrBuilder.java index 2f8fe7acf4f0..548fa5226a92 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ApproveRolloutRequestOrBuilder.java @@ -28,8 +28,7 @@ public interface ApproveRolloutRequestOrBuilder * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * @@ -44,8 +43,7 @@ public interface ApproveRolloutRequestOrBuilder * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Automation.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Automation.java new file mode 100644 index 000000000000..61762e025ee9 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Automation.java @@ -0,0 +1,3887 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * An `Automation` resource in the Cloud Deploy API.
+ *
+ * An `Automation` enables the automation of manually driven actions for
+ * a Delivery Pipeline, which includes Release promotion amongst Targets,
+ * Rollout repair and Rollout deployment strategy advancement. The intention
+ * of Automation is to reduce manual intervention in the continuous delivery
+ * process.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Automation} + */ +public final class Automation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.Automation) + AutomationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Automation.newBuilder() to construct. + private Automation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Automation() { + name_ = ""; + uid_ = ""; + description_ = ""; + etag_ = ""; + serviceAccount_ = ""; + rules_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Automation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Automation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 6: + return internalGetAnnotations(); + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Automation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Automation.class, + com.google.cloud.deploy.v1.Automation.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Name of the `Automation`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+   * Output only. Name of the `Automation`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + /** + * + * + *
+   * Output only. Unique identifier of the `Automation`.
+   * 
+ * + * 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 `Automation`.
+   * 
+ * + * 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 DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. Description of the `Automation`. Max length is 255 characters.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Description of the `Automation`. Max length is 255 characters.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time at which the automation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time at which the automation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time at which the automation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time at which the automation was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time at which the automation was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time at which the automation was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 6; + + private static final class AnnotationsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Automation_AnnotationsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+   * Optional. User annotations. These attributes can only be set and used by
+   * the user, and not by Cloud Deploy. Annotations must meet the following
+   * constraints:
+   *
+   * * Annotations are key/value pairs.
+   * * Valid annotation keys have two segments: an optional prefix and name,
+   * separated by a slash (`/`).
+   * * The name segment is required and must be 63 characters or less,
+   * beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with
+   * dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
+   * * The prefix is optional. If specified, the prefix must be a DNS subdomain:
+   * a series of DNS labels separated by dots(`.`), not longer than 253
+   * characters in total, followed by a slash (`/`).
+   *
+   * See
+   * https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set
+   * for more details.
+   * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+   * Optional. User annotations. These attributes can only be set and used by
+   * the user, and not by Cloud Deploy. Annotations must meet the following
+   * constraints:
+   *
+   * * Annotations are key/value pairs.
+   * * Valid annotation keys have two segments: an optional prefix and name,
+   * separated by a slash (`/`).
+   * * The name segment is required and must be 63 characters or less,
+   * beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with
+   * dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
+   * * The prefix is optional. If specified, the prefix must be a DNS subdomain:
+   * a series of DNS labels separated by dots(`.`), not longer than 253
+   * characters in total, followed by a slash (`/`).
+   *
+   * See
+   * https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set
+   * for more details.
+   * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+   * Optional. User annotations. These attributes can only be set and used by
+   * the user, and not by Cloud Deploy. Annotations must meet the following
+   * constraints:
+   *
+   * * Annotations are key/value pairs.
+   * * Valid annotation keys have two segments: an optional prefix and name,
+   * separated by a slash (`/`).
+   * * The name segment is required and must be 63 characters or less,
+   * beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with
+   * dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
+   * * The prefix is optional. If specified, the prefix must be a DNS subdomain:
+   * a series of DNS labels separated by dots(`.`), not longer than 253
+   * characters in total, followed by a slash (`/`).
+   *
+   * See
+   * https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set
+   * for more details.
+   * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. User annotations. These attributes can only be set and used by
+   * the user, and not by Cloud Deploy. Annotations must meet the following
+   * constraints:
+   *
+   * * Annotations are key/value pairs.
+   * * Valid annotation keys have two segments: an optional prefix and name,
+   * separated by a slash (`/`).
+   * * The name segment is required and must be 63 characters or less,
+   * beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with
+   * dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
+   * * The prefix is optional. If specified, the prefix must be a DNS subdomain:
+   * a series of DNS labels separated by dots(`.`), not longer than 253
+   * characters in total, followed by a slash (`/`).
+   *
+   * See
+   * https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set
+   * for more details.
+   * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int LABELS_FIELD_NUMBER = 7; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Automation_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. Labels are attributes that can be set and used by both the
+   * user and by Cloud Deploy. Labels must meet the following constraints:
+   *
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   * underscores, and dashes.
+   * * All characters must use UTF-8 encoding, and international characters are
+   * allowed.
+   * * Keys must start with a lowercase letter or international character.
+   * * Each resource is limited to a maximum of 64 labels.
+   *
+   * Both keys and values are additionally constrained to be <= 63 characters.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. Labels are attributes that can be set and used by both the
+   * user and by Cloud Deploy. Labels must meet the following constraints:
+   *
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   * underscores, and dashes.
+   * * All characters must use UTF-8 encoding, and international characters are
+   * allowed.
+   * * Keys must start with a lowercase letter or international character.
+   * * Each resource is limited to a maximum of 64 labels.
+   *
+   * Both keys and values are additionally constrained to be <= 63 characters.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. Labels are attributes that can be set and used by both the
+   * user and by Cloud Deploy. Labels must meet the following constraints:
+   *
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   * underscores, and dashes.
+   * * All characters must use UTF-8 encoding, and international characters are
+   * allowed.
+   * * Keys must start with a lowercase letter or international character.
+   * * Each resource is limited to a maximum of 64 labels.
+   *
+   * Both keys and values are additionally constrained to be <= 63 characters.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Labels are attributes that can be set and used by both the
+   * user and by Cloud Deploy. Labels must meet the following constraints:
+   *
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   * underscores, and dashes.
+   * * All characters must use UTF-8 encoding, and international characters are
+   * allowed.
+   * * Keys must start with a lowercase letter or international character.
+   * * Each resource is limited to a maximum of 64 labels.
+   *
+   * Both keys and values are additionally constrained to be <= 63 characters.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ETAG_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + /** + * + * + *
+   * Optional. The weak etag of the `Automation` resource.
+   * 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 = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The weak etag of the `Automation` resource.
+   * 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 = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUSPENDED_FIELD_NUMBER = 9; + private boolean suspended_ = false; + /** + * + * + *
+   * Optional. When Suspended, automation is deactivated from execution.
+   * 
+ * + * bool suspended = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The suspended. + */ + @java.lang.Override + public boolean getSuspended() { + return suspended_; + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+   * Required. Email address of the user-managed IAM service account that
+   * creates Cloud Deploy release and rollout resources.
+   * 
+ * + * string service_account = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Email address of the user-managed IAM service account that
+   * creates Cloud Deploy release and rollout resources.
+   * 
+ * + * string service_account = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SELECTOR_FIELD_NUMBER = 11; + private com.google.cloud.deploy.v1.AutomationResourceSelector selector_; + /** + * + * + *
+   * Required. Selected resources to which the automation will be applied.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationResourceSelector selector = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the selector field is set. + */ + @java.lang.Override + public boolean hasSelector() { + return selector_ != null; + } + /** + * + * + *
+   * Required. Selected resources to which the automation will be applied.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationResourceSelector selector = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The selector. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationResourceSelector getSelector() { + return selector_ == null + ? com.google.cloud.deploy.v1.AutomationResourceSelector.getDefaultInstance() + : selector_; + } + /** + * + * + *
+   * Required. Selected resources to which the automation will be applied.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationResourceSelector selector = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationResourceSelectorOrBuilder getSelectorOrBuilder() { + return selector_ == null + ? com.google.cloud.deploy.v1.AutomationResourceSelector.getDefaultInstance() + : selector_; + } + + public static final int RULES_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private java.util.List rules_; + /** + * + * + *
+   * Required. List of Automation rules associated with the Automation resource.
+   * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+   * Note: the order of the rules here is not the same as the order of
+   * execution.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getRulesList() { + return rules_; + } + /** + * + * + *
+   * Required. List of Automation rules associated with the Automation resource.
+   * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+   * Note: the order of the rules here is not the same as the order of
+   * execution.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + /** + * + * + *
+   * Required. List of Automation rules associated with the Automation resource.
+   * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+   * Note: the order of the rules here is not the same as the order of
+   * execution.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getRulesCount() { + return rules_.size(); + } + /** + * + * + *
+   * Required. List of Automation rules associated with the Automation resource.
+   * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+   * Note: the order of the rules here is not the same as the order of
+   * execution.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRule getRules(int index) { + return rules_.get(index); + } + /** + * + * + *
+   * Required. List of Automation rules associated with the Automation resource.
+   * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+   * Note: the order of the rules here is not the same as the order of
+   * execution.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRuleOrBuilder getRulesOrBuilder(int index) { + return rules_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(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(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (createTime_ != null) { + output.writeMessage(4, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(5, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 6); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, etag_); + } + if (suspended_ != false) { + output.writeBool(9, suspended_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, serviceAccount_); + } + if (selector_ != null) { + output.writeMessage(11, getSelector()); + } + for (int i = 0; i < rules_.size(); i++) { + output.writeMessage(14, rules_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(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(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetAnnotations().getMap().entrySet()) { + com.google.protobuf.MapEntry annotations__ = + AnnotationsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, annotations__); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, etag_); + } + if (suspended_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, suspended_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, serviceAccount_); + } + if (selector_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getSelector()); + } + for (int i = 0; i < rules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, rules_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.Automation)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.Automation other = (com.google.cloud.deploy.v1.Automation) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUid().equals(other.getUid())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (getSuspended() != other.getSuspended()) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (hasSelector() != other.hasSelector()) return false; + if (hasSelector()) { + if (!getSelector().equals(other.getSelector())) return false; + } + if (!getRulesList().equals(other.getRulesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetAnnotations().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotations().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().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()); + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + if (hasSelector()) { + hash = (37 * hash) + SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + getSelector().hashCode(); + } + if (getRulesCount() > 0) { + hash = (37 * hash) + RULES_FIELD_NUMBER; + hash = (53 * hash) + getRulesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.Automation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Automation 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.Automation parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Automation 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.Automation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Automation 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.Automation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Automation 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.Automation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Automation 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.Automation 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.Automation 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.Automation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An `Automation` resource in the Cloud Deploy API.
+   *
+   * An `Automation` enables the automation of manually driven actions for
+   * a Delivery Pipeline, which includes Release promotion amongst Targets,
+   * Rollout repair and Rollout deployment strategy advancement. The intention
+   * of Automation is to reduce manual intervention in the continuous delivery
+   * process.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Automation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.Automation) + com.google.cloud.deploy.v1.AutomationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Automation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 6: + return internalGetAnnotations(); + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 6: + return internalGetMutableAnnotations(); + case 7: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Automation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Automation.class, + com.google.cloud.deploy.v1.Automation.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.Automation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + uid_ = ""; + description_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableAnnotations().clear(); + internalGetMutableLabels().clear(); + etag_ = ""; + suspended_ = false; + serviceAccount_ = ""; + selector_ = null; + if (selectorBuilder_ != null) { + selectorBuilder_.dispose(); + selectorBuilder_ = null; + } + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + } else { + rules_ = null; + rulesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000800); + 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_Automation_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Automation getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.Automation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Automation build() { + com.google.cloud.deploy.v1.Automation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Automation buildPartial() { + com.google.cloud.deploy.v1.Automation result = + new com.google.cloud.deploy.v1.Automation(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.deploy.v1.Automation result) { + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000800); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.deploy.v1.Automation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.annotations_ = internalGetAnnotations(); + result.annotations_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.suspended_ = suspended_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.serviceAccount_ = serviceAccount_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.selector_ = selectorBuilder_ == null ? selector_ : selectorBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.Automation) { + return mergeFrom((com.google.cloud.deploy.v1.Automation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.Automation other) { + if (other == com.google.cloud.deploy.v1.Automation.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations()); + bitField0_ |= 0x00000020; + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000040; + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.getSuspended() != false) { + setSuspended(other.getSuspended()); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (other.hasSelector()) { + mergeSelector(other.getSelector()); + } + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000800); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000800); + rulesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRulesFieldBuilder() + : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: + { + suspended_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: + { + serviceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: + { + input.readMessage(getSelectorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 114: + { + com.google.cloud.deploy.v1.AutomationRule m = + input.readMessage( + com.google.cloud.deploy.v1.AutomationRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 114 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Name of the `Automation`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. Name of the `Automation`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. Name of the `Automation`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the `Automation`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the `Automation`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + * + * + *
+     * Output only. Unique identifier of the `Automation`.
+     * 
+ * + * 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 `Automation`.
+     * 
+ * + * 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 `Automation`.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Unique identifier of the `Automation`.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Unique identifier of the `Automation`.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. Description of the `Automation`. Max length is 255 characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Description of the `Automation`. Max length is 255 characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Description of the `Automation`. Max length is 255 characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the `Automation`. Max length is 255 characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the `Automation`. Max length is 255 characters.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + 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 automation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Time at which the automation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time at which the automation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time at which the automation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time at which the automation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time at which the automation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time at which the automation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time at which the automation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time at which the automation was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time at which the automation was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. Time at which the automation was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time at which the automation was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time at which the automation was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time at which the automation was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time at which the automation was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time at which the automation was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time at which the automation was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time at which the automation was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField annotations_; + + private com.google.protobuf.MapField + internalGetAnnotations() { + if (annotations_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationsDefaultEntryHolder.defaultEntry); + } + return annotations_; + } + + private com.google.protobuf.MapField + internalGetMutableAnnotations() { + if (annotations_ == null) { + annotations_ = + com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry); + } + if (!annotations_.isMutable()) { + annotations_ = annotations_.copy(); + } + bitField0_ |= 0x00000020; + onChanged(); + return annotations_; + } + + public int getAnnotationsCount() { + return internalGetAnnotations().getMap().size(); + } + /** + * + * + *
+     * Optional. User annotations. These attributes can only be set and used by
+     * the user, and not by Cloud Deploy. Annotations must meet the following
+     * constraints:
+     *
+     * * Annotations are key/value pairs.
+     * * Valid annotation keys have two segments: an optional prefix and name,
+     * separated by a slash (`/`).
+     * * The name segment is required and must be 63 characters or less,
+     * beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with
+     * dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
+     * * The prefix is optional. If specified, the prefix must be a DNS subdomain:
+     * a series of DNS labels separated by dots(`.`), not longer than 253
+     * characters in total, followed by a slash (`/`).
+     *
+     * See
+     * https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set
+     * for more details.
+     * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetAnnotations().getMap().containsKey(key); + } + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAnnotations() { + return getAnnotationsMap(); + } + /** + * + * + *
+     * Optional. User annotations. These attributes can only be set and used by
+     * the user, and not by Cloud Deploy. Annotations must meet the following
+     * constraints:
+     *
+     * * Annotations are key/value pairs.
+     * * Valid annotation keys have two segments: an optional prefix and name,
+     * separated by a slash (`/`).
+     * * The name segment is required and must be 63 characters or less,
+     * beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with
+     * dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
+     * * The prefix is optional. If specified, the prefix must be a DNS subdomain:
+     * a series of DNS labels separated by dots(`.`), not longer than 253
+     * characters in total, followed by a slash (`/`).
+     *
+     * See
+     * https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set
+     * for more details.
+     * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAnnotationsMap() { + return internalGetAnnotations().getMap(); + } + /** + * + * + *
+     * Optional. User annotations. These attributes can only be set and used by
+     * the user, and not by Cloud Deploy. Annotations must meet the following
+     * constraints:
+     *
+     * * Annotations are key/value pairs.
+     * * Valid annotation keys have two segments: an optional prefix and name,
+     * separated by a slash (`/`).
+     * * The name segment is required and must be 63 characters or less,
+     * beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with
+     * dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
+     * * The prefix is optional. If specified, the prefix must be a DNS subdomain:
+     * a series of DNS labels separated by dots(`.`), not longer than 253
+     * characters in total, followed by a slash (`/`).
+     *
+     * See
+     * https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set
+     * for more details.
+     * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. User annotations. These attributes can only be set and used by
+     * the user, and not by Cloud Deploy. Annotations must meet the following
+     * constraints:
+     *
+     * * Annotations are key/value pairs.
+     * * Valid annotation keys have two segments: an optional prefix and name,
+     * separated by a slash (`/`).
+     * * The name segment is required and must be 63 characters or less,
+     * beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with
+     * dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
+     * * The prefix is optional. If specified, the prefix must be a DNS subdomain:
+     * a series of DNS labels separated by dots(`.`), not longer than 253
+     * characters in total, followed by a slash (`/`).
+     *
+     * See
+     * https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set
+     * for more details.
+     * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAnnotationsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetAnnotations().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotations() { + bitField0_ = (bitField0_ & ~0x00000020); + internalGetMutableAnnotations().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. User annotations. These attributes can only be set and used by
+     * the user, and not by Cloud Deploy. Annotations must meet the following
+     * constraints:
+     *
+     * * Annotations are key/value pairs.
+     * * Valid annotation keys have two segments: an optional prefix and name,
+     * separated by a slash (`/`).
+     * * The name segment is required and must be 63 characters or less,
+     * beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with
+     * dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
+     * * The prefix is optional. If specified, the prefix must be a DNS subdomain:
+     * a series of DNS labels separated by dots(`.`), not longer than 253
+     * characters in total, followed by a slash (`/`).
+     *
+     * See
+     * https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set
+     * for more details.
+     * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAnnotations(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableAnnotations().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAnnotations() { + bitField0_ |= 0x00000020; + return internalGetMutableAnnotations().getMutableMap(); + } + /** + * + * + *
+     * Optional. User annotations. These attributes can only be set and used by
+     * the user, and not by Cloud Deploy. Annotations must meet the following
+     * constraints:
+     *
+     * * Annotations are key/value pairs.
+     * * Valid annotation keys have two segments: an optional prefix and name,
+     * separated by a slash (`/`).
+     * * The name segment is required and must be 63 characters or less,
+     * beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with
+     * dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
+     * * The prefix is optional. If specified, the prefix must be a DNS subdomain:
+     * a series of DNS labels separated by dots(`.`), not longer than 253
+     * characters in total, followed by a slash (`/`).
+     *
+     * See
+     * https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set
+     * for more details.
+     * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAnnotations(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableAnnotations().getMutableMap().put(key, value); + bitField0_ |= 0x00000020; + return this; + } + /** + * + * + *
+     * Optional. User annotations. These attributes can only be set and used by
+     * the user, and not by Cloud Deploy. Annotations must meet the following
+     * constraints:
+     *
+     * * Annotations are key/value pairs.
+     * * Valid annotation keys have two segments: an optional prefix and name,
+     * separated by a slash (`/`).
+     * * The name segment is required and must be 63 characters or less,
+     * beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with
+     * dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
+     * * The prefix is optional. If specified, the prefix must be a DNS subdomain:
+     * a series of DNS labels separated by dots(`.`), not longer than 253
+     * characters in total, followed by a slash (`/`).
+     *
+     * See
+     * https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set
+     * for more details.
+     * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllAnnotations(java.util.Map values) { + internalGetMutableAnnotations().getMutableMap().putAll(values); + bitField0_ |= 0x00000020; + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000040; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. Labels are attributes that can be set and used by both the
+     * user and by Cloud Deploy. Labels must meet the following constraints:
+     *
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     * underscores, and dashes.
+     * * All characters must use UTF-8 encoding, and international characters are
+     * allowed.
+     * * Keys must start with a lowercase letter or international character.
+     * * Each resource is limited to a maximum of 64 labels.
+     *
+     * Both keys and values are additionally constrained to be <= 63 characters.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. Labels are attributes that can be set and used by both the
+     * user and by Cloud Deploy. Labels must meet the following constraints:
+     *
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     * underscores, and dashes.
+     * * All characters must use UTF-8 encoding, and international characters are
+     * allowed.
+     * * Keys must start with a lowercase letter or international character.
+     * * Each resource is limited to a maximum of 64 labels.
+     *
+     * Both keys and values are additionally constrained to be <= 63 characters.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. Labels are attributes that can be set and used by both the
+     * user and by Cloud Deploy. Labels must meet the following constraints:
+     *
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     * underscores, and dashes.
+     * * All characters must use UTF-8 encoding, and international characters are
+     * allowed.
+     * * Keys must start with a lowercase letter or international character.
+     * * Each resource is limited to a maximum of 64 labels.
+     *
+     * Both keys and values are additionally constrained to be <= 63 characters.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Labels are attributes that can be set and used by both the
+     * user and by Cloud Deploy. Labels must meet the following constraints:
+     *
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     * underscores, and dashes.
+     * * All characters must use UTF-8 encoding, and international characters are
+     * allowed.
+     * * Keys must start with a lowercase letter or international character.
+     * * Each resource is limited to a maximum of 64 labels.
+     *
+     * Both keys and values are additionally constrained to be <= 63 characters.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Labels are attributes that can be set and used by both the
+     * user and by Cloud Deploy. Labels must meet the following constraints:
+     *
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     * underscores, and dashes.
+     * * All characters must use UTF-8 encoding, and international characters are
+     * allowed.
+     * * Keys must start with a lowercase letter or international character.
+     * * Each resource is limited to a maximum of 64 labels.
+     *
+     * Both keys and values are additionally constrained to be <= 63 characters.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000040; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. Labels are attributes that can be set and used by both the
+     * user and by Cloud Deploy. Labels must meet the following constraints:
+     *
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     * underscores, and dashes.
+     * * All characters must use UTF-8 encoding, and international characters are
+     * allowed.
+     * * Keys must start with a lowercase letter or international character.
+     * * Each resource is limited to a maximum of 64 labels.
+     *
+     * Both keys and values are additionally constrained to be <= 63 characters.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000040; + return this; + } + /** + * + * + *
+     * Optional. Labels are attributes that can be set and used by both the
+     * user and by Cloud Deploy. Labels must meet the following constraints:
+     *
+     * * Keys and values can contain only lowercase letters, numeric characters,
+     * underscores, and dashes.
+     * * All characters must use UTF-8 encoding, and international characters are
+     * allowed.
+     * * Keys must start with a lowercase letter or international character.
+     * * Each resource is limited to a maximum of 64 labels.
+     *
+     * Both keys and values are additionally constrained to be <= 63 characters.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Optional. The weak etag of the `Automation` resource.
+     * 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 = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The weak etag of the `Automation` resource.
+     * 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 = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The weak etag of the `Automation` resource.
+     * 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 = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The weak etag of the `Automation` resource.
+     * 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 = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The weak etag of the `Automation` resource.
+     * 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 = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private boolean suspended_; + /** + * + * + *
+     * Optional. When Suspended, automation is deactivated from execution.
+     * 
+ * + * bool suspended = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The suspended. + */ + @java.lang.Override + public boolean getSuspended() { + return suspended_; + } + /** + * + * + *
+     * Optional. When Suspended, automation is deactivated from execution.
+     * 
+ * + * bool suspended = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The suspended to set. + * @return This builder for chaining. + */ + public Builder setSuspended(boolean value) { + + suspended_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. When Suspended, automation is deactivated from execution.
+     * 
+ * + * bool suspended = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSuspended() { + bitField0_ = (bitField0_ & ~0x00000100); + suspended_ = false; + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * Required. Email address of the user-managed IAM service account that
+     * creates Cloud Deploy release and rollout resources.
+     * 
+ * + * string service_account = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Email address of the user-managed IAM service account that
+     * creates Cloud Deploy release and rollout resources.
+     * 
+ * + * string service_account = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Email address of the user-managed IAM service account that
+     * creates Cloud Deploy release and rollout resources.
+     * 
+ * + * string service_account = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccount_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Email address of the user-managed IAM service account that
+     * creates Cloud Deploy release and rollout resources.
+     * 
+ * + * string service_account = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + serviceAccount_ = getDefaultInstance().getServiceAccount(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Email address of the user-managed IAM service account that
+     * creates Cloud Deploy release and rollout resources.
+     * 
+ * + * string service_account = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccount_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private com.google.cloud.deploy.v1.AutomationResourceSelector selector_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationResourceSelector, + com.google.cloud.deploy.v1.AutomationResourceSelector.Builder, + com.google.cloud.deploy.v1.AutomationResourceSelectorOrBuilder> + selectorBuilder_; + /** + * + * + *
+     * Required. Selected resources to which the automation will be applied.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationResourceSelector selector = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the selector field is set. + */ + public boolean hasSelector() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Required. Selected resources to which the automation will be applied.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationResourceSelector selector = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The selector. + */ + public com.google.cloud.deploy.v1.AutomationResourceSelector getSelector() { + if (selectorBuilder_ == null) { + return selector_ == null + ? com.google.cloud.deploy.v1.AutomationResourceSelector.getDefaultInstance() + : selector_; + } else { + return selectorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Selected resources to which the automation will be applied.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationResourceSelector selector = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSelector(com.google.cloud.deploy.v1.AutomationResourceSelector value) { + if (selectorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + selector_ = value; + } else { + selectorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Selected resources to which the automation will be applied.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationResourceSelector selector = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSelector( + com.google.cloud.deploy.v1.AutomationResourceSelector.Builder builderForValue) { + if (selectorBuilder_ == null) { + selector_ = builderForValue.build(); + } else { + selectorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Selected resources to which the automation will be applied.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationResourceSelector selector = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSelector(com.google.cloud.deploy.v1.AutomationResourceSelector value) { + if (selectorBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && selector_ != null + && selector_ + != com.google.cloud.deploy.v1.AutomationResourceSelector.getDefaultInstance()) { + getSelectorBuilder().mergeFrom(value); + } else { + selector_ = value; + } + } else { + selectorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Selected resources to which the automation will be applied.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationResourceSelector selector = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSelector() { + bitField0_ = (bitField0_ & ~0x00000400); + selector_ = null; + if (selectorBuilder_ != null) { + selectorBuilder_.dispose(); + selectorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Selected resources to which the automation will be applied.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationResourceSelector selector = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.AutomationResourceSelector.Builder getSelectorBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getSelectorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Selected resources to which the automation will be applied.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationResourceSelector selector = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.AutomationResourceSelectorOrBuilder getSelectorOrBuilder() { + if (selectorBuilder_ != null) { + return selectorBuilder_.getMessageOrBuilder(); + } else { + return selector_ == null + ? com.google.cloud.deploy.v1.AutomationResourceSelector.getDefaultInstance() + : selector_; + } + } + /** + * + * + *
+     * Required. Selected resources to which the automation will be applied.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationResourceSelector selector = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationResourceSelector, + com.google.cloud.deploy.v1.AutomationResourceSelector.Builder, + com.google.cloud.deploy.v1.AutomationResourceSelectorOrBuilder> + getSelectorFieldBuilder() { + if (selectorBuilder_ == null) { + selectorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationResourceSelector, + com.google.cloud.deploy.v1.AutomationResourceSelector.Builder, + com.google.cloud.deploy.v1.AutomationResourceSelectorOrBuilder>( + getSelector(), getParentForChildren(), isClean()); + selector_ = null; + } + return selectorBuilder_; + } + + private java.util.List rules_ = + java.util.Collections.emptyList(); + + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000800) != 0)) { + rules_ = new java.util.ArrayList(rules_); + bitField0_ |= 0x00000800; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationRule, + com.google.cloud.deploy.v1.AutomationRule.Builder, + com.google.cloud.deploy.v1.AutomationRuleOrBuilder> + rulesBuilder_; + + /** + * + * + *
+     * Required. List of Automation rules associated with the Automation resource.
+     * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+     * Note: the order of the rules here is not the same as the order of
+     * execution.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. List of Automation rules associated with the Automation resource.
+     * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+     * Note: the order of the rules here is not the same as the order of
+     * execution.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. List of Automation rules associated with the Automation resource.
+     * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+     * Note: the order of the rules here is not the same as the order of
+     * execution.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.AutomationRule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. List of Automation rules associated with the Automation resource.
+     * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+     * Note: the order of the rules here is not the same as the order of
+     * execution.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRules(int index, com.google.cloud.deploy.v1.AutomationRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.set(index, value); + onChanged(); + } else { + rulesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. List of Automation rules associated with the Automation resource.
+     * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+     * Note: the order of the rules here is not the same as the order of
+     * execution.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRules( + int index, com.google.cloud.deploy.v1.AutomationRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. List of Automation rules associated with the Automation resource.
+     * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+     * Note: the order of the rules here is not the same as the order of
+     * execution.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRules(com.google.cloud.deploy.v1.AutomationRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. List of Automation rules associated with the Automation resource.
+     * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+     * Note: the order of the rules here is not the same as the order of
+     * execution.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRules(int index, com.google.cloud.deploy.v1.AutomationRule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(index, value); + onChanged(); + } else { + rulesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. List of Automation rules associated with the Automation resource.
+     * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+     * Note: the order of the rules here is not the same as the order of
+     * execution.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRules(com.google.cloud.deploy.v1.AutomationRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. List of Automation rules associated with the Automation resource.
+     * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+     * Note: the order of the rules here is not the same as the order of
+     * execution.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRules( + int index, com.google.cloud.deploy.v1.AutomationRule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. List of Automation rules associated with the Automation resource.
+     * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+     * Note: the order of the rules here is not the same as the order of
+     * execution.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllRules( + java.lang.Iterable values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. List of Automation rules associated with the Automation resource.
+     * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+     * Note: the order of the rules here is not the same as the order of
+     * execution.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. List of Automation rules associated with the Automation resource.
+     * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+     * Note: the order of the rules here is not the same as the order of
+     * execution.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. List of Automation rules associated with the Automation resource.
+     * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+     * Note: the order of the rules here is not the same as the order of
+     * execution.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.AutomationRule.Builder getRulesBuilder(int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. List of Automation rules associated with the Automation resource.
+     * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+     * Note: the order of the rules here is not the same as the order of
+     * execution.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.AutomationRuleOrBuilder getRulesOrBuilder(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. List of Automation rules associated with the Automation resource.
+     * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+     * Note: the order of the rules here is not the same as the order of
+     * execution.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + * + * + *
+     * Required. List of Automation rules associated with the Automation resource.
+     * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+     * Note: the order of the rules here is not the same as the order of
+     * execution.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.AutomationRule.Builder addRulesBuilder() { + return getRulesFieldBuilder() + .addBuilder(com.google.cloud.deploy.v1.AutomationRule.getDefaultInstance()); + } + /** + * + * + *
+     * Required. List of Automation rules associated with the Automation resource.
+     * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+     * Note: the order of the rules here is not the same as the order of
+     * execution.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.AutomationRule.Builder addRulesBuilder(int index) { + return getRulesFieldBuilder() + .addBuilder(index, com.google.cloud.deploy.v1.AutomationRule.getDefaultInstance()); + } + /** + * + * + *
+     * Required. List of Automation rules associated with the Automation resource.
+     * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+     * Note: the order of the rules here is not the same as the order of
+     * execution.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationRule, + com.google.cloud.deploy.v1.AutomationRule.Builder, + com.google.cloud.deploy.v1.AutomationRuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationRule, + com.google.cloud.deploy.v1.AutomationRule.Builder, + com.google.cloud.deploy.v1.AutomationRuleOrBuilder>( + rules_, ((bitField0_ & 0x00000800) != 0), getParentForChildren(), isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + @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.Automation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.Automation) + private static final com.google.cloud.deploy.v1.Automation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.Automation(); + } + + public static com.google.cloud.deploy.v1.Automation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Automation 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.Automation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationEvent.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationEvent.java new file mode 100644 index 000000000000..ed7dc3fd2e04 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationEvent.java @@ -0,0 +1,1142 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/automation_payload.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Payload proto for "clouddeploy.googleapis.com/automation"
+ * Platform Log event that describes the Automation related events.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AutomationEvent} + */ +public final class AutomationEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.AutomationEvent) + AutomationEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutomationEvent.newBuilder() to construct. + private AutomationEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutomationEvent() { + message_ = ""; + automation_ = ""; + pipelineUid_ = ""; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutomationEvent(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.AutomationPayloadProto + .internal_static_google_cloud_deploy_v1_AutomationEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.AutomationPayloadProto + .internal_static_google_cloud_deploy_v1_AutomationEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AutomationEvent.class, + com.google.cloud.deploy.v1.AutomationEvent.Builder.class); + } + + public static final int MESSAGE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; + /** + * + * + *
+   * Debug message for when there is an update on the AutomationRun.
+   * Provides further details about the resource creation or state change.
+   * 
+ * + * 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 there is an update on the AutomationRun.
+   * Provides further details about the resource creation or state change.
+   * 
+ * + * 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 AUTOMATION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object automation_ = ""; + /** + * + * + *
+   * The name of the `AutomationRun`.
+   * 
+ * + * string automation = 2; + * + * @return The automation. + */ + @java.lang.Override + public java.lang.String getAutomation() { + java.lang.Object ref = automation_; + 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(); + automation_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the `AutomationRun`.
+   * 
+ * + * string automation = 2; + * + * @return The bytes for automation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAutomationBytes() { + java.lang.Object ref = automation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + automation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PIPELINE_UID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + 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 TYPE_FIELD_NUMBER = 4; + private int type_ = 0; + /** + * + * + *
+   * Type of this notification, e.g. for a Pub/Sub failure.
+   * 
+ * + * .google.cloud.deploy.v1.Type type = 4; + * + * @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 = 4; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Type getType() { + com.google.cloud.deploy.v1.Type result = com.google.cloud.deploy.v1.Type.forNumber(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(automation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, automation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pipelineUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pipelineUid_); + } + if (type_ != com.google.cloud.deploy.v1.Type.TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, 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(automation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, automation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pipelineUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pipelineUid_); + } + if (type_ != com.google.cloud.deploy.v1.Type.TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, 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.AutomationEvent)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.AutomationEvent other = + (com.google.cloud.deploy.v1.AutomationEvent) obj; + + if (!getMessage().equals(other.getMessage())) return false; + if (!getAutomation().equals(other.getAutomation())) return false; + if (!getPipelineUid().equals(other.getPipelineUid())) 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) + AUTOMATION_FIELD_NUMBER; + hash = (53 * hash) + getAutomation().hashCode(); + hash = (37 * hash) + PIPELINE_UID_FIELD_NUMBER; + hash = (53 * hash) + getPipelineUid().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.AutomationEvent parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationEvent 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.AutomationEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationEvent 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.AutomationEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationEvent 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.AutomationEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AutomationEvent 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.AutomationEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AutomationEvent 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.AutomationEvent 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.AutomationEvent 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.AutomationEvent 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/automation"
+   * Platform Log event that describes the Automation related events.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AutomationEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.AutomationEvent) + com.google.cloud.deploy.v1.AutomationEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.AutomationPayloadProto + .internal_static_google_cloud_deploy_v1_AutomationEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.AutomationPayloadProto + .internal_static_google_cloud_deploy_v1_AutomationEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AutomationEvent.class, + com.google.cloud.deploy.v1.AutomationEvent.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.AutomationEvent.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + message_ = ""; + automation_ = ""; + pipelineUid_ = ""; + type_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.AutomationPayloadProto + .internal_static_google_cloud_deploy_v1_AutomationEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationEvent getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.AutomationEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationEvent build() { + com.google.cloud.deploy.v1.AutomationEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationEvent buildPartial() { + com.google.cloud.deploy.v1.AutomationEvent result = + new com.google.cloud.deploy.v1.AutomationEvent(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.AutomationEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.message_ = message_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.automation_ = automation_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pipelineUid_ = pipelineUid_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.type_ = type_; + } + } + + @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.AutomationEvent) { + return mergeFrom((com.google.cloud.deploy.v1.AutomationEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.AutomationEvent other) { + if (other == com.google.cloud.deploy.v1.AutomationEvent.getDefaultInstance()) return this; + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAutomation().isEmpty()) { + automation_ = other.automation_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPipelineUid().isEmpty()) { + pipelineUid_ = other.pipelineUid_; + bitField0_ |= 0x00000004; + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + automation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + pipelineUid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object message_ = ""; + /** + * + * + *
+     * Debug message for when there is an update on the AutomationRun.
+     * Provides further details about the resource creation or state change.
+     * 
+ * + * 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 there is an update on the AutomationRun.
+     * Provides further details about the resource creation or state change.
+     * 
+ * + * 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 there is an update on the AutomationRun.
+     * Provides further details about the resource creation or state change.
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Debug message for when there is an update on the AutomationRun.
+     * Provides further details about the resource creation or state change.
+     * 
+ * + * string message = 1; + * + * @return This builder for chaining. + */ + public Builder clearMessage() { + message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Debug message for when there is an update on the AutomationRun.
+     * Provides further details about the resource creation or state change.
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object automation_ = ""; + /** + * + * + *
+     * The name of the `AutomationRun`.
+     * 
+ * + * string automation = 2; + * + * @return The automation. + */ + public java.lang.String getAutomation() { + java.lang.Object ref = automation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + automation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the `AutomationRun`.
+     * 
+ * + * string automation = 2; + * + * @return The bytes for automation. + */ + public com.google.protobuf.ByteString getAutomationBytes() { + java.lang.Object ref = automation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + automation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the `AutomationRun`.
+     * 
+ * + * string automation = 2; + * + * @param value The automation to set. + * @return This builder for chaining. + */ + public Builder setAutomation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + automation_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the `AutomationRun`.
+     * 
+ * + * string automation = 2; + * + * @return This builder for chaining. + */ + public Builder clearAutomation() { + automation_ = getDefaultInstance().getAutomation(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the `AutomationRun`.
+     * 
+ * + * string automation = 2; + * + * @param value The bytes for automation to set. + * @return This builder for chaining. + */ + public Builder setAutomationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + automation_ = value; + bitField0_ |= 0x00000002; + 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Unique identifier of the `DeliveryPipeline`.
+     * 
+ * + * string pipeline_uid = 3; + * + * @return This builder for chaining. + */ + public Builder clearPipelineUid() { + pipelineUid_ = getDefaultInstance().getPipelineUid(); + bitField0_ = (bitField0_ & ~0x00000004); + 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Type of this notification, e.g. for a Pub/Sub failure.
+     * 
+ * + * .google.cloud.deploy.v1.Type type = 4; + * + * @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 = 4; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of this notification, e.g. for a Pub/Sub failure.
+     * 
+ * + * .google.cloud.deploy.v1.Type type = 4; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Type getType() { + com.google.cloud.deploy.v1.Type result = com.google.cloud.deploy.v1.Type.forNumber(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 = 4; + * + * @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(); + } + bitField0_ |= 0x00000008; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of this notification, e.g. for a Pub/Sub failure.
+     * 
+ * + * .google.cloud.deploy.v1.Type type = 4; + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000008); + 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.AutomationEvent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.AutomationEvent) + private static final com.google.cloud.deploy.v1.AutomationEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.AutomationEvent(); + } + + public static com.google.cloud.deploy.v1.AutomationEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutomationEvent 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.AutomationEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationEventOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationEventOrBuilder.java new file mode 100644 index 000000000000..9efa418b611b --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationEventOrBuilder.java @@ -0,0 +1,127 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/automation_payload.proto + +package com.google.cloud.deploy.v1; + +public interface AutomationEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.AutomationEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Debug message for when there is an update on the AutomationRun.
+   * Provides further details about the resource creation or state change.
+   * 
+ * + * string message = 1; + * + * @return The message. + */ + java.lang.String getMessage(); + /** + * + * + *
+   * Debug message for when there is an update on the AutomationRun.
+   * Provides further details about the resource creation or state change.
+   * 
+ * + * string message = 1; + * + * @return The bytes for message. + */ + com.google.protobuf.ByteString getMessageBytes(); + + /** + * + * + *
+   * The name of the `AutomationRun`.
+   * 
+ * + * string automation = 2; + * + * @return The automation. + */ + java.lang.String getAutomation(); + /** + * + * + *
+   * The name of the `AutomationRun`.
+   * 
+ * + * string automation = 2; + * + * @return The bytes for automation. + */ + com.google.protobuf.ByteString getAutomationBytes(); + + /** + * + * + *
+   * 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(); + + /** + * + * + *
+   * Type of this notification, e.g. for a Pub/Sub failure.
+   * 
+ * + * .google.cloud.deploy.v1.Type type = 4; + * + * @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 = 4; + * + * @return The type. + */ + com.google.cloud.deploy.v1.Type getType(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationName.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationName.java new file mode 100644 index 000000000000..a6b4970ab788 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 AutomationName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DELIVERY_PIPELINE_AUTOMATION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String deliveryPipeline; + private final String automation; + + @Deprecated + protected AutomationName() { + project = null; + location = null; + deliveryPipeline = null; + automation = null; + } + + private AutomationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + deliveryPipeline = Preconditions.checkNotNull(builder.getDeliveryPipeline()); + automation = Preconditions.checkNotNull(builder.getAutomation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeliveryPipeline() { + return deliveryPipeline; + } + + public String getAutomation() { + return automation; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AutomationName of( + String project, String location, String deliveryPipeline, String automation) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDeliveryPipeline(deliveryPipeline) + .setAutomation(automation) + .build(); + } + + public static String format( + String project, String location, String deliveryPipeline, String automation) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDeliveryPipeline(deliveryPipeline) + .setAutomation(automation) + .build() + .toString(); + } + + public static AutomationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DELIVERY_PIPELINE_AUTOMATION.validatedMatch( + formattedString, "AutomationName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("delivery_pipeline"), + matchMap.get("automation")); + } + + 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 (AutomationName 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_AUTOMATION.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 (automation != null) { + fieldMapBuilder.put("automation", automation); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DELIVERY_PIPELINE_AUTOMATION.instantiate( + "project", + project, + "location", + location, + "delivery_pipeline", + deliveryPipeline, + "automation", + automation); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + AutomationName that = ((AutomationName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.deliveryPipeline, that.deliveryPipeline) + && Objects.equals(this.automation, that.automation); + } + 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(automation); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}. + */ + public static class Builder { + private String project; + private String location; + private String deliveryPipeline; + private String automation; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeliveryPipeline() { + return deliveryPipeline; + } + + public String getAutomation() { + return automation; + } + + 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 setAutomation(String automation) { + this.automation = automation; + return this; + } + + private Builder(AutomationName automationName) { + this.project = automationName.project; + this.location = automationName.location; + this.deliveryPipeline = automationName.deliveryPipeline; + this.automation = automationName.automation; + } + + public AutomationName build() { + return new AutomationName(this); + } + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationOrBuilder.java new file mode 100644 index 000000000000..e75ec2edf9c4 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationOrBuilder.java @@ -0,0 +1,618 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 AutomationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.Automation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Name of the `Automation`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Name of the `Automation`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Unique identifier of the `Automation`.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. Unique identifier of the `Automation`.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Optional. Description of the `Automation`. Max length is 255 characters.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. Description of the `Automation`. Max length is 255 characters.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Time at which the automation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time at which the automation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time at which the automation was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time at which the automation was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time at which the automation was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time at which the automation was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. User annotations. These attributes can only be set and used by
+   * the user, and not by Cloud Deploy. Annotations must meet the following
+   * constraints:
+   *
+   * * Annotations are key/value pairs.
+   * * Valid annotation keys have two segments: an optional prefix and name,
+   * separated by a slash (`/`).
+   * * The name segment is required and must be 63 characters or less,
+   * beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with
+   * dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
+   * * The prefix is optional. If specified, the prefix must be a DNS subdomain:
+   * a series of DNS labels separated by dots(`.`), not longer than 253
+   * characters in total, followed by a slash (`/`).
+   *
+   * See
+   * https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set
+   * for more details.
+   * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAnnotationsCount(); + /** + * + * + *
+   * Optional. User annotations. These attributes can only be set and used by
+   * the user, and not by Cloud Deploy. Annotations must meet the following
+   * constraints:
+   *
+   * * Annotations are key/value pairs.
+   * * Valid annotation keys have two segments: an optional prefix and name,
+   * separated by a slash (`/`).
+   * * The name segment is required and must be 63 characters or less,
+   * beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with
+   * dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
+   * * The prefix is optional. If specified, the prefix must be a DNS subdomain:
+   * a series of DNS labels separated by dots(`.`), not longer than 253
+   * characters in total, followed by a slash (`/`).
+   *
+   * See
+   * https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set
+   * for more details.
+   * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsAnnotations(java.lang.String key); + /** Use {@link #getAnnotationsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAnnotations(); + /** + * + * + *
+   * Optional. User annotations. These attributes can only be set and used by
+   * the user, and not by Cloud Deploy. Annotations must meet the following
+   * constraints:
+   *
+   * * Annotations are key/value pairs.
+   * * Valid annotation keys have two segments: an optional prefix and name,
+   * separated by a slash (`/`).
+   * * The name segment is required and must be 63 characters or less,
+   * beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with
+   * dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
+   * * The prefix is optional. If specified, the prefix must be a DNS subdomain:
+   * a series of DNS labels separated by dots(`.`), not longer than 253
+   * characters in total, followed by a slash (`/`).
+   *
+   * See
+   * https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set
+   * for more details.
+   * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getAnnotationsMap(); + /** + * + * + *
+   * Optional. User annotations. These attributes can only be set and used by
+   * the user, and not by Cloud Deploy. Annotations must meet the following
+   * constraints:
+   *
+   * * Annotations are key/value pairs.
+   * * Valid annotation keys have two segments: an optional prefix and name,
+   * separated by a slash (`/`).
+   * * The name segment is required and must be 63 characters or less,
+   * beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with
+   * dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
+   * * The prefix is optional. If specified, the prefix must be a DNS subdomain:
+   * a series of DNS labels separated by dots(`.`), not longer than 253
+   * characters in total, followed by a slash (`/`).
+   *
+   * See
+   * https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set
+   * for more details.
+   * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getAnnotationsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. User annotations. These attributes can only be set and used by
+   * the user, and not by Cloud Deploy. Annotations must meet the following
+   * constraints:
+   *
+   * * Annotations are key/value pairs.
+   * * Valid annotation keys have two segments: an optional prefix and name,
+   * separated by a slash (`/`).
+   * * The name segment is required and must be 63 characters or less,
+   * beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with
+   * dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
+   * * The prefix is optional. If specified, the prefix must be a DNS subdomain:
+   * a series of DNS labels separated by dots(`.`), not longer than 253
+   * characters in total, followed by a slash (`/`).
+   *
+   * See
+   * https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set
+   * for more details.
+   * 
+ * + * map<string, string> annotations = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getAnnotationsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Labels are attributes that can be set and used by both the
+   * user and by Cloud Deploy. Labels must meet the following constraints:
+   *
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   * underscores, and dashes.
+   * * All characters must use UTF-8 encoding, and international characters are
+   * allowed.
+   * * Keys must start with a lowercase letter or international character.
+   * * Each resource is limited to a maximum of 64 labels.
+   *
+   * Both keys and values are additionally constrained to be <= 63 characters.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. Labels are attributes that can be set and used by both the
+   * user and by Cloud Deploy. Labels must meet the following constraints:
+   *
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   * underscores, and dashes.
+   * * All characters must use UTF-8 encoding, and international characters are
+   * allowed.
+   * * Keys must start with a lowercase letter or international character.
+   * * Each resource is limited to a maximum of 64 labels.
+   *
+   * Both keys and values are additionally constrained to be <= 63 characters.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. Labels are attributes that can be set and used by both the
+   * user and by Cloud Deploy. Labels must meet the following constraints:
+   *
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   * underscores, and dashes.
+   * * All characters must use UTF-8 encoding, and international characters are
+   * allowed.
+   * * Keys must start with a lowercase letter or international character.
+   * * Each resource is limited to a maximum of 64 labels.
+   *
+   * Both keys and values are additionally constrained to be <= 63 characters.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. Labels are attributes that can be set and used by both the
+   * user and by Cloud Deploy. Labels must meet the following constraints:
+   *
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   * underscores, and dashes.
+   * * All characters must use UTF-8 encoding, and international characters are
+   * allowed.
+   * * Keys must start with a lowercase letter or international character.
+   * * Each resource is limited to a maximum of 64 labels.
+   *
+   * Both keys and values are additionally constrained to be <= 63 characters.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Labels are attributes that can be set and used by both the
+   * user and by Cloud Deploy. Labels must meet the following constraints:
+   *
+   * * Keys and values can contain only lowercase letters, numeric characters,
+   * underscores, and dashes.
+   * * All characters must use UTF-8 encoding, and international characters are
+   * allowed.
+   * * Keys must start with a lowercase letter or international character.
+   * * Each resource is limited to a maximum of 64 labels.
+   *
+   * Both keys and values are additionally constrained to be <= 63 characters.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. The weak etag of the `Automation` resource.
+   * 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 = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Optional. The weak etag of the `Automation` resource.
+   * 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 = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. When Suspended, automation is deactivated from execution.
+   * 
+ * + * bool suspended = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The suspended. + */ + boolean getSuspended(); + + /** + * + * + *
+   * Required. Email address of the user-managed IAM service account that
+   * creates Cloud Deploy release and rollout resources.
+   * 
+ * + * string service_account = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * Required. Email address of the user-managed IAM service account that
+   * creates Cloud Deploy release and rollout resources.
+   * 
+ * + * string service_account = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * Required. Selected resources to which the automation will be applied.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationResourceSelector selector = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the selector field is set. + */ + boolean hasSelector(); + /** + * + * + *
+   * Required. Selected resources to which the automation will be applied.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationResourceSelector selector = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The selector. + */ + com.google.cloud.deploy.v1.AutomationResourceSelector getSelector(); + /** + * + * + *
+   * Required. Selected resources to which the automation will be applied.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationResourceSelector selector = 11 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.deploy.v1.AutomationResourceSelectorOrBuilder getSelectorOrBuilder(); + + /** + * + * + *
+   * Required. List of Automation rules associated with the Automation resource.
+   * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+   * Note: the order of the rules here is not the same as the order of
+   * execution.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getRulesList(); + /** + * + * + *
+   * Required. List of Automation rules associated with the Automation resource.
+   * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+   * Note: the order of the rules here is not the same as the order of
+   * execution.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.deploy.v1.AutomationRule getRules(int index); + /** + * + * + *
+   * Required. List of Automation rules associated with the Automation resource.
+   * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+   * Note: the order of the rules here is not the same as the order of
+   * execution.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getRulesCount(); + /** + * + * + *
+   * Required. List of Automation rules associated with the Automation resource.
+   * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+   * Note: the order of the rules here is not the same as the order of
+   * execution.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getRulesOrBuilderList(); + /** + * + * + *
+   * Required. List of Automation rules associated with the Automation resource.
+   * Must have at least one rule and limited to 250 rules per Delivery Pipeline.
+   * Note: the order of the rules here is not the same as the order of
+   * execution.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.AutomationRule rules = 14 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.deploy.v1.AutomationRuleOrBuilder getRulesOrBuilder(int index); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationPayloadProto.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationPayloadProto.java new file mode 100644 index 000000000000..124e445991de --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationPayloadProto.java @@ -0,0 +1,71 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/automation_payload.proto + +package com.google.cloud.deploy.v1; + +public final class AutomationPayloadProto { + private AutomationPayloadProto() {} + + 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_AutomationEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_AutomationEvent_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n/google/cloud/deploy/v1/automation_payl" + + "oad.proto\022\026google.cloud.deploy.v1\032&googl" + + "e/cloud/deploy/v1/log_enums.proto\"x\n\017Aut" + + "omationEvent\022\017\n\007message\030\001 \001(\t\022\022\n\nautomat" + + "ion\030\002 \001(\t\022\024\n\014pipeline_uid\030\003 \001(\t\022*\n\004type\030" + + "\004 \001(\0162\034.google.cloud.deploy.v1.TypeBj\n\032c" + + "om.google.cloud.deploy.v1B\026AutomationPay" + + "loadProtoP\001Z2cloud.google.com/go/deploy/" + + "apiv1/deploypb;deploypbb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.deploy.v1.LogEnumsProto.getDescriptor(), + }); + internal_static_google_cloud_deploy_v1_AutomationEvent_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_deploy_v1_AutomationEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_AutomationEvent_descriptor, + new java.lang.String[] { + "Message", "Automation", "PipelineUid", "Type", + }); + com.google.cloud.deploy.v1.LogEnumsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationResourceSelector.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationResourceSelector.java new file mode 100644 index 000000000000..2f5789d5dcb7 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationResourceSelector.java @@ -0,0 +1,938 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * AutomationResourceSelector contains the information to select the resources
+ * to which an Automation is going to be applied.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AutomationResourceSelector} + */ +public final class AutomationResourceSelector extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.AutomationResourceSelector) + AutomationResourceSelectorOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutomationResourceSelector.newBuilder() to construct. + private AutomationResourceSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutomationResourceSelector() { + targets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutomationResourceSelector(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationResourceSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationResourceSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AutomationResourceSelector.class, + com.google.cloud.deploy.v1.AutomationResourceSelector.Builder.class); + } + + public static final int TARGETS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List targets_; + /** + * + * + *
+   * Contains attributes about a target.
+   * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + @java.lang.Override + public java.util.List getTargetsList() { + return targets_; + } + /** + * + * + *
+   * Contains attributes about a target.
+   * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + @java.lang.Override + public java.util.List + getTargetsOrBuilderList() { + return targets_; + } + /** + * + * + *
+   * Contains attributes about a target.
+   * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + @java.lang.Override + public int getTargetsCount() { + return targets_.size(); + } + /** + * + * + *
+   * Contains attributes about a target.
+   * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.TargetAttribute getTargets(int index) { + return targets_.get(index); + } + /** + * + * + *
+   * Contains attributes about a target.
+   * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.TargetAttributeOrBuilder getTargetsOrBuilder(int index) { + return targets_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < targets_.size(); i++) { + output.writeMessage(1, targets_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < targets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, targets_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.AutomationResourceSelector)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.AutomationResourceSelector other = + (com.google.cloud.deploy.v1.AutomationResourceSelector) obj; + + if (!getTargetsList().equals(other.getTargetsList())) 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 (getTargetsCount() > 0) { + hash = (37 * hash) + TARGETS_FIELD_NUMBER; + hash = (53 * hash) + getTargetsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.AutomationResourceSelector parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationResourceSelector 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.AutomationResourceSelector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationResourceSelector 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.AutomationResourceSelector parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationResourceSelector 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.AutomationResourceSelector parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AutomationResourceSelector 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.AutomationResourceSelector parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AutomationResourceSelector 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.AutomationResourceSelector 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.AutomationResourceSelector 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.AutomationResourceSelector 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; + } + /** + * + * + *
+   * AutomationResourceSelector contains the information to select the resources
+   * to which an Automation is going to be applied.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AutomationResourceSelector} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.AutomationResourceSelector) + com.google.cloud.deploy.v1.AutomationResourceSelectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationResourceSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationResourceSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AutomationResourceSelector.class, + com.google.cloud.deploy.v1.AutomationResourceSelector.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.AutomationResourceSelector.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (targetsBuilder_ == null) { + targets_ = java.util.Collections.emptyList(); + } else { + targets_ = null; + targetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + 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_AutomationResourceSelector_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationResourceSelector getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.AutomationResourceSelector.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationResourceSelector build() { + com.google.cloud.deploy.v1.AutomationResourceSelector result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationResourceSelector buildPartial() { + com.google.cloud.deploy.v1.AutomationResourceSelector result = + new com.google.cloud.deploy.v1.AutomationResourceSelector(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.deploy.v1.AutomationResourceSelector result) { + if (targetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + targets_ = java.util.Collections.unmodifiableList(targets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.targets_ = targets_; + } else { + result.targets_ = targetsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.deploy.v1.AutomationResourceSelector result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.AutomationResourceSelector) { + return mergeFrom((com.google.cloud.deploy.v1.AutomationResourceSelector) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.AutomationResourceSelector other) { + if (other == com.google.cloud.deploy.v1.AutomationResourceSelector.getDefaultInstance()) + return this; + if (targetsBuilder_ == null) { + if (!other.targets_.isEmpty()) { + if (targets_.isEmpty()) { + targets_ = other.targets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTargetsIsMutable(); + targets_.addAll(other.targets_); + } + onChanged(); + } + } else { + if (!other.targets_.isEmpty()) { + if (targetsBuilder_.isEmpty()) { + targetsBuilder_.dispose(); + targetsBuilder_ = null; + targets_ = other.targets_; + bitField0_ = (bitField0_ & ~0x00000001); + targetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTargetsFieldBuilder() + : null; + } else { + targetsBuilder_.addAllMessages(other.targets_); + } + } + } + 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.TargetAttribute m = + input.readMessage( + com.google.cloud.deploy.v1.TargetAttribute.parser(), extensionRegistry); + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + targets_.add(m); + } else { + targetsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List targets_ = + java.util.Collections.emptyList(); + + private void ensureTargetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + targets_ = new java.util.ArrayList(targets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.TargetAttribute, + com.google.cloud.deploy.v1.TargetAttribute.Builder, + com.google.cloud.deploy.v1.TargetAttributeOrBuilder> + targetsBuilder_; + + /** + * + * + *
+     * Contains attributes about a target.
+     * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + public java.util.List getTargetsList() { + if (targetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(targets_); + } else { + return targetsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Contains attributes about a target.
+     * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + public int getTargetsCount() { + if (targetsBuilder_ == null) { + return targets_.size(); + } else { + return targetsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Contains attributes about a target.
+     * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + public com.google.cloud.deploy.v1.TargetAttribute getTargets(int index) { + if (targetsBuilder_ == null) { + return targets_.get(index); + } else { + return targetsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Contains attributes about a target.
+     * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + public Builder setTargets(int index, com.google.cloud.deploy.v1.TargetAttribute value) { + if (targetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetsIsMutable(); + targets_.set(index, value); + onChanged(); + } else { + targetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains attributes about a target.
+     * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + public Builder setTargets( + int index, com.google.cloud.deploy.v1.TargetAttribute.Builder builderForValue) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + targets_.set(index, builderForValue.build()); + onChanged(); + } else { + targetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains attributes about a target.
+     * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + public Builder addTargets(com.google.cloud.deploy.v1.TargetAttribute value) { + if (targetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetsIsMutable(); + targets_.add(value); + onChanged(); + } else { + targetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Contains attributes about a target.
+     * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + public Builder addTargets(int index, com.google.cloud.deploy.v1.TargetAttribute value) { + if (targetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetsIsMutable(); + targets_.add(index, value); + onChanged(); + } else { + targetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Contains attributes about a target.
+     * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + public Builder addTargets(com.google.cloud.deploy.v1.TargetAttribute.Builder builderForValue) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + targets_.add(builderForValue.build()); + onChanged(); + } else { + targetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains attributes about a target.
+     * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + public Builder addTargets( + int index, com.google.cloud.deploy.v1.TargetAttribute.Builder builderForValue) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + targets_.add(index, builderForValue.build()); + onChanged(); + } else { + targetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Contains attributes about a target.
+     * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + public Builder addAllTargets( + java.lang.Iterable values) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targets_); + onChanged(); + } else { + targetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Contains attributes about a target.
+     * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + public Builder clearTargets() { + if (targetsBuilder_ == null) { + targets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + targetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Contains attributes about a target.
+     * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + public Builder removeTargets(int index) { + if (targetsBuilder_ == null) { + ensureTargetsIsMutable(); + targets_.remove(index); + onChanged(); + } else { + targetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Contains attributes about a target.
+     * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + public com.google.cloud.deploy.v1.TargetAttribute.Builder getTargetsBuilder(int index) { + return getTargetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Contains attributes about a target.
+     * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + public com.google.cloud.deploy.v1.TargetAttributeOrBuilder getTargetsOrBuilder(int index) { + if (targetsBuilder_ == null) { + return targets_.get(index); + } else { + return targetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Contains attributes about a target.
+     * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + public java.util.List + getTargetsOrBuilderList() { + if (targetsBuilder_ != null) { + return targetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(targets_); + } + } + /** + * + * + *
+     * Contains attributes about a target.
+     * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + public com.google.cloud.deploy.v1.TargetAttribute.Builder addTargetsBuilder() { + return getTargetsFieldBuilder() + .addBuilder(com.google.cloud.deploy.v1.TargetAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * Contains attributes about a target.
+     * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + public com.google.cloud.deploy.v1.TargetAttribute.Builder addTargetsBuilder(int index) { + return getTargetsFieldBuilder() + .addBuilder(index, com.google.cloud.deploy.v1.TargetAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * Contains attributes about a target.
+     * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + public java.util.List + getTargetsBuilderList() { + return getTargetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.TargetAttribute, + com.google.cloud.deploy.v1.TargetAttribute.Builder, + com.google.cloud.deploy.v1.TargetAttributeOrBuilder> + getTargetsFieldBuilder() { + if (targetsBuilder_ == null) { + targetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.TargetAttribute, + com.google.cloud.deploy.v1.TargetAttribute.Builder, + com.google.cloud.deploy.v1.TargetAttributeOrBuilder>( + targets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + targets_ = null; + } + return targetsBuilder_; + } + + @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.AutomationResourceSelector) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.AutomationResourceSelector) + private static final com.google.cloud.deploy.v1.AutomationResourceSelector DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.AutomationResourceSelector(); + } + + public static com.google.cloud.deploy.v1.AutomationResourceSelector getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutomationResourceSelector 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.AutomationResourceSelector getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationResourceSelectorOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationResourceSelectorOrBuilder.java new file mode 100644 index 000000000000..38da90a87282 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationResourceSelectorOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 AutomationResourceSelectorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.AutomationResourceSelector) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Contains attributes about a target.
+   * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + java.util.List getTargetsList(); + /** + * + * + *
+   * Contains attributes about a target.
+   * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + com.google.cloud.deploy.v1.TargetAttribute getTargets(int index); + /** + * + * + *
+   * Contains attributes about a target.
+   * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + int getTargetsCount(); + /** + * + * + *
+   * Contains attributes about a target.
+   * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + java.util.List + getTargetsOrBuilderList(); + /** + * + * + *
+   * Contains attributes about a target.
+   * 
+ * + * repeated .google.cloud.deploy.v1.TargetAttribute targets = 1; + */ + com.google.cloud.deploy.v1.TargetAttributeOrBuilder getTargetsOrBuilder(int index); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRolloutMetadata.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRolloutMetadata.java new file mode 100644 index 000000000000..dc21a92d8d81 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRolloutMetadata.java @@ -0,0 +1,1260 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * AutomationRolloutMetadata contains Automation-related actions that
+ * were performed on a rollout.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AutomationRolloutMetadata} + */ +public final class AutomationRolloutMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.AutomationRolloutMetadata) + AutomationRolloutMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutomationRolloutMetadata.newBuilder() to construct. + private AutomationRolloutMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutomationRolloutMetadata() { + promoteAutomationRun_ = ""; + advanceAutomationRuns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + repairAutomationRuns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutomationRolloutMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationRolloutMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationRolloutMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AutomationRolloutMetadata.class, + com.google.cloud.deploy.v1.AutomationRolloutMetadata.Builder.class); + } + + public static final int PROMOTE_AUTOMATION_RUN_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object promoteAutomationRun_ = ""; + /** + * + * + *
+   * Output only. The ID of the AutomationRun initiated by a promote release
+   * rule.
+   * 
+ * + * string promote_automation_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The promoteAutomationRun. + */ + @java.lang.Override + public java.lang.String getPromoteAutomationRun() { + java.lang.Object ref = promoteAutomationRun_; + 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(); + promoteAutomationRun_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The ID of the AutomationRun initiated by a promote release
+   * rule.
+   * 
+ * + * string promote_automation_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for promoteAutomationRun. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPromoteAutomationRunBytes() { + java.lang.Object ref = promoteAutomationRun_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + promoteAutomationRun_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADVANCE_AUTOMATION_RUNS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList advanceAutomationRuns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Output only. The IDs of the AutomationRuns initiated by an advance rollout
+   * rule.
+   * 
+ * + * repeated string advance_automation_runs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the advanceAutomationRuns. + */ + public com.google.protobuf.ProtocolStringList getAdvanceAutomationRunsList() { + return advanceAutomationRuns_; + } + /** + * + * + *
+   * Output only. The IDs of the AutomationRuns initiated by an advance rollout
+   * rule.
+   * 
+ * + * repeated string advance_automation_runs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of advanceAutomationRuns. + */ + public int getAdvanceAutomationRunsCount() { + return advanceAutomationRuns_.size(); + } + /** + * + * + *
+   * Output only. The IDs of the AutomationRuns initiated by an advance rollout
+   * rule.
+   * 
+ * + * repeated string advance_automation_runs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The advanceAutomationRuns at the given index. + */ + public java.lang.String getAdvanceAutomationRuns(int index) { + return advanceAutomationRuns_.get(index); + } + /** + * + * + *
+   * Output only. The IDs of the AutomationRuns initiated by an advance rollout
+   * rule.
+   * 
+ * + * repeated string advance_automation_runs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the advanceAutomationRuns at the given index. + */ + public com.google.protobuf.ByteString getAdvanceAutomationRunsBytes(int index) { + return advanceAutomationRuns_.getByteString(index); + } + + public static final int REPAIR_AUTOMATION_RUNS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList repairAutomationRuns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Output only. The IDs of the AutomationRuns initiated by a repair rollout
+   * rule.
+   * 
+ * + * repeated string repair_automation_runs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the repairAutomationRuns. + */ + public com.google.protobuf.ProtocolStringList getRepairAutomationRunsList() { + return repairAutomationRuns_; + } + /** + * + * + *
+   * Output only. The IDs of the AutomationRuns initiated by a repair rollout
+   * rule.
+   * 
+ * + * repeated string repair_automation_runs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of repairAutomationRuns. + */ + public int getRepairAutomationRunsCount() { + return repairAutomationRuns_.size(); + } + /** + * + * + *
+   * Output only. The IDs of the AutomationRuns initiated by a repair rollout
+   * rule.
+   * 
+ * + * repeated string repair_automation_runs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The repairAutomationRuns at the given index. + */ + public java.lang.String getRepairAutomationRuns(int index) { + return repairAutomationRuns_.get(index); + } + /** + * + * + *
+   * Output only. The IDs of the AutomationRuns initiated by a repair rollout
+   * rule.
+   * 
+ * + * repeated string repair_automation_runs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the repairAutomationRuns at the given index. + */ + public com.google.protobuf.ByteString getRepairAutomationRunsBytes(int index) { + return repairAutomationRuns_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promoteAutomationRun_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, promoteAutomationRun_); + } + for (int i = 0; i < advanceAutomationRuns_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, advanceAutomationRuns_.getRaw(i)); + } + for (int i = 0; i < repairAutomationRuns_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, repairAutomationRuns_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promoteAutomationRun_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, promoteAutomationRun_); + } + { + int dataSize = 0; + for (int i = 0; i < advanceAutomationRuns_.size(); i++) { + dataSize += computeStringSizeNoTag(advanceAutomationRuns_.getRaw(i)); + } + size += dataSize; + size += 1 * getAdvanceAutomationRunsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < repairAutomationRuns_.size(); i++) { + dataSize += computeStringSizeNoTag(repairAutomationRuns_.getRaw(i)); + } + size += dataSize; + size += 1 * getRepairAutomationRunsList().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.AutomationRolloutMetadata)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.AutomationRolloutMetadata other = + (com.google.cloud.deploy.v1.AutomationRolloutMetadata) obj; + + if (!getPromoteAutomationRun().equals(other.getPromoteAutomationRun())) return false; + if (!getAdvanceAutomationRunsList().equals(other.getAdvanceAutomationRunsList())) return false; + if (!getRepairAutomationRunsList().equals(other.getRepairAutomationRunsList())) 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) + PROMOTE_AUTOMATION_RUN_FIELD_NUMBER; + hash = (53 * hash) + getPromoteAutomationRun().hashCode(); + if (getAdvanceAutomationRunsCount() > 0) { + hash = (37 * hash) + ADVANCE_AUTOMATION_RUNS_FIELD_NUMBER; + hash = (53 * hash) + getAdvanceAutomationRunsList().hashCode(); + } + if (getRepairAutomationRunsCount() > 0) { + hash = (37 * hash) + REPAIR_AUTOMATION_RUNS_FIELD_NUMBER; + hash = (53 * hash) + getRepairAutomationRunsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.AutomationRolloutMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationRolloutMetadata 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.AutomationRolloutMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationRolloutMetadata 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.AutomationRolloutMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationRolloutMetadata 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.AutomationRolloutMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AutomationRolloutMetadata 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.AutomationRolloutMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AutomationRolloutMetadata 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.AutomationRolloutMetadata 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.AutomationRolloutMetadata 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.AutomationRolloutMetadata 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; + } + /** + * + * + *
+   * AutomationRolloutMetadata contains Automation-related actions that
+   * were performed on a rollout.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AutomationRolloutMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.AutomationRolloutMetadata) + com.google.cloud.deploy.v1.AutomationRolloutMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationRolloutMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationRolloutMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AutomationRolloutMetadata.class, + com.google.cloud.deploy.v1.AutomationRolloutMetadata.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.AutomationRolloutMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + promoteAutomationRun_ = ""; + advanceAutomationRuns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + repairAutomationRuns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + 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_AutomationRolloutMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRolloutMetadata getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.AutomationRolloutMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRolloutMetadata build() { + com.google.cloud.deploy.v1.AutomationRolloutMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRolloutMetadata buildPartial() { + com.google.cloud.deploy.v1.AutomationRolloutMetadata result = + new com.google.cloud.deploy.v1.AutomationRolloutMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.AutomationRolloutMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.promoteAutomationRun_ = promoteAutomationRun_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + advanceAutomationRuns_.makeImmutable(); + result.advanceAutomationRuns_ = advanceAutomationRuns_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + repairAutomationRuns_.makeImmutable(); + result.repairAutomationRuns_ = repairAutomationRuns_; + } + } + + @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.AutomationRolloutMetadata) { + return mergeFrom((com.google.cloud.deploy.v1.AutomationRolloutMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.AutomationRolloutMetadata other) { + if (other == com.google.cloud.deploy.v1.AutomationRolloutMetadata.getDefaultInstance()) + return this; + if (!other.getPromoteAutomationRun().isEmpty()) { + promoteAutomationRun_ = other.promoteAutomationRun_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.advanceAutomationRuns_.isEmpty()) { + if (advanceAutomationRuns_.isEmpty()) { + advanceAutomationRuns_ = other.advanceAutomationRuns_; + bitField0_ |= 0x00000002; + } else { + ensureAdvanceAutomationRunsIsMutable(); + advanceAutomationRuns_.addAll(other.advanceAutomationRuns_); + } + onChanged(); + } + if (!other.repairAutomationRuns_.isEmpty()) { + if (repairAutomationRuns_.isEmpty()) { + repairAutomationRuns_ = other.repairAutomationRuns_; + bitField0_ |= 0x00000004; + } else { + ensureRepairAutomationRunsIsMutable(); + repairAutomationRuns_.addAll(other.repairAutomationRuns_); + } + 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: + { + promoteAutomationRun_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAdvanceAutomationRunsIsMutable(); + advanceAutomationRuns_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRepairAutomationRunsIsMutable(); + repairAutomationRuns_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object promoteAutomationRun_ = ""; + /** + * + * + *
+     * Output only. The ID of the AutomationRun initiated by a promote release
+     * rule.
+     * 
+ * + * string promote_automation_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The promoteAutomationRun. + */ + public java.lang.String getPromoteAutomationRun() { + java.lang.Object ref = promoteAutomationRun_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + promoteAutomationRun_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The ID of the AutomationRun initiated by a promote release
+     * rule.
+     * 
+ * + * string promote_automation_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for promoteAutomationRun. + */ + public com.google.protobuf.ByteString getPromoteAutomationRunBytes() { + java.lang.Object ref = promoteAutomationRun_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + promoteAutomationRun_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The ID of the AutomationRun initiated by a promote release
+     * rule.
+     * 
+ * + * string promote_automation_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The promoteAutomationRun to set. + * @return This builder for chaining. + */ + public Builder setPromoteAutomationRun(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + promoteAutomationRun_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ID of the AutomationRun initiated by a promote release
+     * rule.
+     * 
+ * + * string promote_automation_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPromoteAutomationRun() { + promoteAutomationRun_ = getDefaultInstance().getPromoteAutomationRun(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ID of the AutomationRun initiated by a promote release
+     * rule.
+     * 
+ * + * string promote_automation_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for promoteAutomationRun to set. + * @return This builder for chaining. + */ + public Builder setPromoteAutomationRunBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + promoteAutomationRun_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList advanceAutomationRuns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAdvanceAutomationRunsIsMutable() { + if (!advanceAutomationRuns_.isModifiable()) { + advanceAutomationRuns_ = + new com.google.protobuf.LazyStringArrayList(advanceAutomationRuns_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Output only. The IDs of the AutomationRuns initiated by an advance rollout
+     * rule.
+     * 
+ * + * + * repeated string advance_automation_runs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the advanceAutomationRuns. + */ + public com.google.protobuf.ProtocolStringList getAdvanceAutomationRunsList() { + advanceAutomationRuns_.makeImmutable(); + return advanceAutomationRuns_; + } + /** + * + * + *
+     * Output only. The IDs of the AutomationRuns initiated by an advance rollout
+     * rule.
+     * 
+ * + * + * repeated string advance_automation_runs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of advanceAutomationRuns. + */ + public int getAdvanceAutomationRunsCount() { + return advanceAutomationRuns_.size(); + } + /** + * + * + *
+     * Output only. The IDs of the AutomationRuns initiated by an advance rollout
+     * rule.
+     * 
+ * + * + * repeated string advance_automation_runs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The advanceAutomationRuns at the given index. + */ + public java.lang.String getAdvanceAutomationRuns(int index) { + return advanceAutomationRuns_.get(index); + } + /** + * + * + *
+     * Output only. The IDs of the AutomationRuns initiated by an advance rollout
+     * rule.
+     * 
+ * + * + * repeated string advance_automation_runs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the advanceAutomationRuns at the given index. + */ + public com.google.protobuf.ByteString getAdvanceAutomationRunsBytes(int index) { + return advanceAutomationRuns_.getByteString(index); + } + /** + * + * + *
+     * Output only. The IDs of the AutomationRuns initiated by an advance rollout
+     * rule.
+     * 
+ * + * + * repeated string advance_automation_runs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The advanceAutomationRuns to set. + * @return This builder for chaining. + */ + public Builder setAdvanceAutomationRuns(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdvanceAutomationRunsIsMutable(); + advanceAutomationRuns_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IDs of the AutomationRuns initiated by an advance rollout
+     * rule.
+     * 
+ * + * + * repeated string advance_automation_runs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The advanceAutomationRuns to add. + * @return This builder for chaining. + */ + public Builder addAdvanceAutomationRuns(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdvanceAutomationRunsIsMutable(); + advanceAutomationRuns_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IDs of the AutomationRuns initiated by an advance rollout
+     * rule.
+     * 
+ * + * + * repeated string advance_automation_runs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The advanceAutomationRuns to add. + * @return This builder for chaining. + */ + public Builder addAllAdvanceAutomationRuns(java.lang.Iterable values) { + ensureAdvanceAutomationRunsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, advanceAutomationRuns_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IDs of the AutomationRuns initiated by an advance rollout
+     * rule.
+     * 
+ * + * + * repeated string advance_automation_runs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearAdvanceAutomationRuns() { + advanceAutomationRuns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IDs of the AutomationRuns initiated by an advance rollout
+     * rule.
+     * 
+ * + * + * repeated string advance_automation_runs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the advanceAutomationRuns to add. + * @return This builder for chaining. + */ + public Builder addAdvanceAutomationRunsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAdvanceAutomationRunsIsMutable(); + advanceAutomationRuns_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList repairAutomationRuns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRepairAutomationRunsIsMutable() { + if (!repairAutomationRuns_.isModifiable()) { + repairAutomationRuns_ = new com.google.protobuf.LazyStringArrayList(repairAutomationRuns_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Output only. The IDs of the AutomationRuns initiated by a repair rollout
+     * rule.
+     * 
+ * + * + * repeated string repair_automation_runs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the repairAutomationRuns. + */ + public com.google.protobuf.ProtocolStringList getRepairAutomationRunsList() { + repairAutomationRuns_.makeImmutable(); + return repairAutomationRuns_; + } + /** + * + * + *
+     * Output only. The IDs of the AutomationRuns initiated by a repair rollout
+     * rule.
+     * 
+ * + * + * repeated string repair_automation_runs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of repairAutomationRuns. + */ + public int getRepairAutomationRunsCount() { + return repairAutomationRuns_.size(); + } + /** + * + * + *
+     * Output only. The IDs of the AutomationRuns initiated by a repair rollout
+     * rule.
+     * 
+ * + * + * repeated string repair_automation_runs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The repairAutomationRuns at the given index. + */ + public java.lang.String getRepairAutomationRuns(int index) { + return repairAutomationRuns_.get(index); + } + /** + * + * + *
+     * Output only. The IDs of the AutomationRuns initiated by a repair rollout
+     * rule.
+     * 
+ * + * + * repeated string repair_automation_runs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the repairAutomationRuns at the given index. + */ + public com.google.protobuf.ByteString getRepairAutomationRunsBytes(int index) { + return repairAutomationRuns_.getByteString(index); + } + /** + * + * + *
+     * Output only. The IDs of the AutomationRuns initiated by a repair rollout
+     * rule.
+     * 
+ * + * + * repeated string repair_automation_runs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The repairAutomationRuns to set. + * @return This builder for chaining. + */ + public Builder setRepairAutomationRuns(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRepairAutomationRunsIsMutable(); + repairAutomationRuns_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IDs of the AutomationRuns initiated by a repair rollout
+     * rule.
+     * 
+ * + * + * repeated string repair_automation_runs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The repairAutomationRuns to add. + * @return This builder for chaining. + */ + public Builder addRepairAutomationRuns(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRepairAutomationRunsIsMutable(); + repairAutomationRuns_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IDs of the AutomationRuns initiated by a repair rollout
+     * rule.
+     * 
+ * + * + * repeated string repair_automation_runs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The repairAutomationRuns to add. + * @return This builder for chaining. + */ + public Builder addAllRepairAutomationRuns(java.lang.Iterable values) { + ensureRepairAutomationRunsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, repairAutomationRuns_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IDs of the AutomationRuns initiated by a repair rollout
+     * rule.
+     * 
+ * + * + * repeated string repair_automation_runs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearRepairAutomationRuns() { + repairAutomationRuns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IDs of the AutomationRuns initiated by a repair rollout
+     * rule.
+     * 
+ * + * + * repeated string repair_automation_runs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the repairAutomationRuns to add. + * @return This builder for chaining. + */ + public Builder addRepairAutomationRunsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRepairAutomationRunsIsMutable(); + repairAutomationRuns_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.AutomationRolloutMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.AutomationRolloutMetadata) + private static final com.google.cloud.deploy.v1.AutomationRolloutMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.AutomationRolloutMetadata(); + } + + public static com.google.cloud.deploy.v1.AutomationRolloutMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutomationRolloutMetadata 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.AutomationRolloutMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRolloutMetadataOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRolloutMetadataOrBuilder.java new file mode 100644 index 000000000000..78e05b03e180 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRolloutMetadataOrBuilder.java @@ -0,0 +1,170 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 AutomationRolloutMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.AutomationRolloutMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The ID of the AutomationRun initiated by a promote release
+   * rule.
+   * 
+ * + * string promote_automation_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The promoteAutomationRun. + */ + java.lang.String getPromoteAutomationRun(); + /** + * + * + *
+   * Output only. The ID of the AutomationRun initiated by a promote release
+   * rule.
+   * 
+ * + * string promote_automation_run = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for promoteAutomationRun. + */ + com.google.protobuf.ByteString getPromoteAutomationRunBytes(); + + /** + * + * + *
+   * Output only. The IDs of the AutomationRuns initiated by an advance rollout
+   * rule.
+   * 
+ * + * repeated string advance_automation_runs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the advanceAutomationRuns. + */ + java.util.List getAdvanceAutomationRunsList(); + /** + * + * + *
+   * Output only. The IDs of the AutomationRuns initiated by an advance rollout
+   * rule.
+   * 
+ * + * repeated string advance_automation_runs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of advanceAutomationRuns. + */ + int getAdvanceAutomationRunsCount(); + /** + * + * + *
+   * Output only. The IDs of the AutomationRuns initiated by an advance rollout
+   * rule.
+   * 
+ * + * repeated string advance_automation_runs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The advanceAutomationRuns at the given index. + */ + java.lang.String getAdvanceAutomationRuns(int index); + /** + * + * + *
+   * Output only. The IDs of the AutomationRuns initiated by an advance rollout
+   * rule.
+   * 
+ * + * repeated string advance_automation_runs = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the advanceAutomationRuns at the given index. + */ + com.google.protobuf.ByteString getAdvanceAutomationRunsBytes(int index); + + /** + * + * + *
+   * Output only. The IDs of the AutomationRuns initiated by a repair rollout
+   * rule.
+   * 
+ * + * repeated string repair_automation_runs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the repairAutomationRuns. + */ + java.util.List getRepairAutomationRunsList(); + /** + * + * + *
+   * Output only. The IDs of the AutomationRuns initiated by a repair rollout
+   * rule.
+   * 
+ * + * repeated string repair_automation_runs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of repairAutomationRuns. + */ + int getRepairAutomationRunsCount(); + /** + * + * + *
+   * Output only. The IDs of the AutomationRuns initiated by a repair rollout
+   * rule.
+   * 
+ * + * repeated string repair_automation_runs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The repairAutomationRuns at the given index. + */ + java.lang.String getRepairAutomationRuns(int index); + /** + * + * + *
+   * Output only. The IDs of the AutomationRuns initiated by a repair rollout
+   * rule.
+   * 
+ * + * repeated string repair_automation_runs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the repairAutomationRuns at the given index. + */ + com.google.protobuf.ByteString getRepairAutomationRunsBytes(int index); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRule.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRule.java new file mode 100644 index 000000000000..3ba83eee9f19 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRule.java @@ -0,0 +1,1516 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * `AutomationRule` defines the automation activities.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AutomationRule} + */ +public final class AutomationRule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.AutomationRule) + AutomationRuleOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutomationRule.newBuilder() to construct. + private AutomationRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutomationRule() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutomationRule(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AutomationRule.class, + com.google.cloud.deploy.v1.AutomationRule.Builder.class); + } + + private int ruleCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object rule_; + + public enum RuleCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PROMOTE_RELEASE_RULE(1), + ADVANCE_ROLLOUT_RULE(2), + REPAIR_ROLLOUT_RULE(3), + RULE_NOT_SET(0); + private final int value; + + private RuleCase(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 RuleCase valueOf(int value) { + return forNumber(value); + } + + public static RuleCase forNumber(int value) { + switch (value) { + case 1: + return PROMOTE_RELEASE_RULE; + case 2: + return ADVANCE_ROLLOUT_RULE; + case 3: + return REPAIR_ROLLOUT_RULE; + case 0: + return RULE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RuleCase getRuleCase() { + return RuleCase.forNumber(ruleCase_); + } + + public static final int PROMOTE_RELEASE_RULE_FIELD_NUMBER = 1; + /** + * + * + *
+   * Optional. `PromoteReleaseRule` will automatically promote a release from
+   * the current target to a specified target.
+   * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseRule promote_release_rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the promoteReleaseRule field is set. + */ + @java.lang.Override + public boolean hasPromoteReleaseRule() { + return ruleCase_ == 1; + } + /** + * + * + *
+   * Optional. `PromoteReleaseRule` will automatically promote a release from
+   * the current target to a specified target.
+   * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseRule promote_release_rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The promoteReleaseRule. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.PromoteReleaseRule getPromoteReleaseRule() { + if (ruleCase_ == 1) { + return (com.google.cloud.deploy.v1.PromoteReleaseRule) rule_; + } + return com.google.cloud.deploy.v1.PromoteReleaseRule.getDefaultInstance(); + } + /** + * + * + *
+   * Optional. `PromoteReleaseRule` will automatically promote a release from
+   * the current target to a specified target.
+   * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseRule promote_release_rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.PromoteReleaseRuleOrBuilder getPromoteReleaseRuleOrBuilder() { + if (ruleCase_ == 1) { + return (com.google.cloud.deploy.v1.PromoteReleaseRule) rule_; + } + return com.google.cloud.deploy.v1.PromoteReleaseRule.getDefaultInstance(); + } + + public static final int ADVANCE_ROLLOUT_RULE_FIELD_NUMBER = 2; + /** + * + * + *
+   * Optional. The `AdvanceRolloutRule` will automatically advance a
+   * successful Rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutRule advance_rollout_rule = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the advanceRolloutRule field is set. + */ + @java.lang.Override + public boolean hasAdvanceRolloutRule() { + return ruleCase_ == 2; + } + /** + * + * + *
+   * Optional. The `AdvanceRolloutRule` will automatically advance a
+   * successful Rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutRule advance_rollout_rule = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The advanceRolloutRule. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AdvanceRolloutRule getAdvanceRolloutRule() { + if (ruleCase_ == 2) { + return (com.google.cloud.deploy.v1.AdvanceRolloutRule) rule_; + } + return com.google.cloud.deploy.v1.AdvanceRolloutRule.getDefaultInstance(); + } + /** + * + * + *
+   * Optional. The `AdvanceRolloutRule` will automatically advance a
+   * successful Rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutRule advance_rollout_rule = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AdvanceRolloutRuleOrBuilder getAdvanceRolloutRuleOrBuilder() { + if (ruleCase_ == 2) { + return (com.google.cloud.deploy.v1.AdvanceRolloutRule) rule_; + } + return com.google.cloud.deploy.v1.AdvanceRolloutRule.getDefaultInstance(); + } + + public static final int REPAIR_ROLLOUT_RULE_FIELD_NUMBER = 3; + /** + * + * + *
+   * Optional. The `RepairRolloutRule` will automatically repair a failed
+   * rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutRule repair_rollout_rule = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the repairRolloutRule field is set. + */ + @java.lang.Override + public boolean hasRepairRolloutRule() { + return ruleCase_ == 3; + } + /** + * + * + *
+   * Optional. The `RepairRolloutRule` will automatically repair a failed
+   * rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutRule repair_rollout_rule = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The repairRolloutRule. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RepairRolloutRule getRepairRolloutRule() { + if (ruleCase_ == 3) { + return (com.google.cloud.deploy.v1.RepairRolloutRule) rule_; + } + return com.google.cloud.deploy.v1.RepairRolloutRule.getDefaultInstance(); + } + /** + * + * + *
+   * Optional. The `RepairRolloutRule` will automatically repair a failed
+   * rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutRule repair_rollout_rule = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RepairRolloutRuleOrBuilder getRepairRolloutRuleOrBuilder() { + if (ruleCase_ == 3) { + return (com.google.cloud.deploy.v1.RepairRolloutRule) rule_; + } + return com.google.cloud.deploy.v1.RepairRolloutRule.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 (ruleCase_ == 1) { + output.writeMessage(1, (com.google.cloud.deploy.v1.PromoteReleaseRule) rule_); + } + if (ruleCase_ == 2) { + output.writeMessage(2, (com.google.cloud.deploy.v1.AdvanceRolloutRule) rule_); + } + if (ruleCase_ == 3) { + output.writeMessage(3, (com.google.cloud.deploy.v1.RepairRolloutRule) rule_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (ruleCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.deploy.v1.PromoteReleaseRule) rule_); + } + if (ruleCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.deploy.v1.AdvanceRolloutRule) rule_); + } + if (ruleCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.deploy.v1.RepairRolloutRule) rule_); + } + 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.AutomationRule)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.AutomationRule other = + (com.google.cloud.deploy.v1.AutomationRule) obj; + + if (!getRuleCase().equals(other.getRuleCase())) return false; + switch (ruleCase_) { + case 1: + if (!getPromoteReleaseRule().equals(other.getPromoteReleaseRule())) return false; + break; + case 2: + if (!getAdvanceRolloutRule().equals(other.getAdvanceRolloutRule())) return false; + break; + case 3: + if (!getRepairRolloutRule().equals(other.getRepairRolloutRule())) 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 (ruleCase_) { + case 1: + hash = (37 * hash) + PROMOTE_RELEASE_RULE_FIELD_NUMBER; + hash = (53 * hash) + getPromoteReleaseRule().hashCode(); + break; + case 2: + hash = (37 * hash) + ADVANCE_ROLLOUT_RULE_FIELD_NUMBER; + hash = (53 * hash) + getAdvanceRolloutRule().hashCode(); + break; + case 3: + hash = (37 * hash) + REPAIR_ROLLOUT_RULE_FIELD_NUMBER; + hash = (53 * hash) + getRepairRolloutRule().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.AutomationRule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationRule 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.AutomationRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationRule 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.AutomationRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationRule 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.AutomationRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AutomationRule 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.AutomationRule parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AutomationRule 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.AutomationRule 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.AutomationRule 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.AutomationRule 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; + } + /** + * + * + *
+   * `AutomationRule` defines the automation activities.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AutomationRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.AutomationRule) + com.google.cloud.deploy.v1.AutomationRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AutomationRule.class, + com.google.cloud.deploy.v1.AutomationRule.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.AutomationRule.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (promoteReleaseRuleBuilder_ != null) { + promoteReleaseRuleBuilder_.clear(); + } + if (advanceRolloutRuleBuilder_ != null) { + advanceRolloutRuleBuilder_.clear(); + } + if (repairRolloutRuleBuilder_ != null) { + repairRolloutRuleBuilder_.clear(); + } + ruleCase_ = 0; + rule_ = 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_AutomationRule_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRule getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.AutomationRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRule build() { + com.google.cloud.deploy.v1.AutomationRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRule buildPartial() { + com.google.cloud.deploy.v1.AutomationRule result = + new com.google.cloud.deploy.v1.AutomationRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.AutomationRule result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.deploy.v1.AutomationRule result) { + result.ruleCase_ = ruleCase_; + result.rule_ = this.rule_; + if (ruleCase_ == 1 && promoteReleaseRuleBuilder_ != null) { + result.rule_ = promoteReleaseRuleBuilder_.build(); + } + if (ruleCase_ == 2 && advanceRolloutRuleBuilder_ != null) { + result.rule_ = advanceRolloutRuleBuilder_.build(); + } + if (ruleCase_ == 3 && repairRolloutRuleBuilder_ != null) { + result.rule_ = repairRolloutRuleBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.AutomationRule) { + return mergeFrom((com.google.cloud.deploy.v1.AutomationRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.AutomationRule other) { + if (other == com.google.cloud.deploy.v1.AutomationRule.getDefaultInstance()) return this; + switch (other.getRuleCase()) { + case PROMOTE_RELEASE_RULE: + { + mergePromoteReleaseRule(other.getPromoteReleaseRule()); + break; + } + case ADVANCE_ROLLOUT_RULE: + { + mergeAdvanceRolloutRule(other.getAdvanceRolloutRule()); + break; + } + case REPAIR_ROLLOUT_RULE: + { + mergeRepairRolloutRule(other.getRepairRolloutRule()); + break; + } + case RULE_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( + getPromoteReleaseRuleFieldBuilder().getBuilder(), extensionRegistry); + ruleCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + getAdvanceRolloutRuleFieldBuilder().getBuilder(), extensionRegistry); + ruleCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + getRepairRolloutRuleFieldBuilder().getBuilder(), extensionRegistry); + ruleCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int ruleCase_ = 0; + private java.lang.Object rule_; + + public RuleCase getRuleCase() { + return RuleCase.forNumber(ruleCase_); + } + + public Builder clearRule() { + ruleCase_ = 0; + rule_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.PromoteReleaseRule, + com.google.cloud.deploy.v1.PromoteReleaseRule.Builder, + com.google.cloud.deploy.v1.PromoteReleaseRuleOrBuilder> + promoteReleaseRuleBuilder_; + /** + * + * + *
+     * Optional. `PromoteReleaseRule` will automatically promote a release from
+     * the current target to a specified target.
+     * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseRule promote_release_rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the promoteReleaseRule field is set. + */ + @java.lang.Override + public boolean hasPromoteReleaseRule() { + return ruleCase_ == 1; + } + /** + * + * + *
+     * Optional. `PromoteReleaseRule` will automatically promote a release from
+     * the current target to a specified target.
+     * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseRule promote_release_rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The promoteReleaseRule. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.PromoteReleaseRule getPromoteReleaseRule() { + if (promoteReleaseRuleBuilder_ == null) { + if (ruleCase_ == 1) { + return (com.google.cloud.deploy.v1.PromoteReleaseRule) rule_; + } + return com.google.cloud.deploy.v1.PromoteReleaseRule.getDefaultInstance(); + } else { + if (ruleCase_ == 1) { + return promoteReleaseRuleBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.PromoteReleaseRule.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. `PromoteReleaseRule` will automatically promote a release from
+     * the current target to a specified target.
+     * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseRule promote_release_rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPromoteReleaseRule(com.google.cloud.deploy.v1.PromoteReleaseRule value) { + if (promoteReleaseRuleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rule_ = value; + onChanged(); + } else { + promoteReleaseRuleBuilder_.setMessage(value); + } + ruleCase_ = 1; + return this; + } + /** + * + * + *
+     * Optional. `PromoteReleaseRule` will automatically promote a release from
+     * the current target to a specified target.
+     * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseRule promote_release_rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPromoteReleaseRule( + com.google.cloud.deploy.v1.PromoteReleaseRule.Builder builderForValue) { + if (promoteReleaseRuleBuilder_ == null) { + rule_ = builderForValue.build(); + onChanged(); + } else { + promoteReleaseRuleBuilder_.setMessage(builderForValue.build()); + } + ruleCase_ = 1; + return this; + } + /** + * + * + *
+     * Optional. `PromoteReleaseRule` will automatically promote a release from
+     * the current target to a specified target.
+     * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseRule promote_release_rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePromoteReleaseRule(com.google.cloud.deploy.v1.PromoteReleaseRule value) { + if (promoteReleaseRuleBuilder_ == null) { + if (ruleCase_ == 1 + && rule_ != com.google.cloud.deploy.v1.PromoteReleaseRule.getDefaultInstance()) { + rule_ = + com.google.cloud.deploy.v1.PromoteReleaseRule.newBuilder( + (com.google.cloud.deploy.v1.PromoteReleaseRule) rule_) + .mergeFrom(value) + .buildPartial(); + } else { + rule_ = value; + } + onChanged(); + } else { + if (ruleCase_ == 1) { + promoteReleaseRuleBuilder_.mergeFrom(value); + } else { + promoteReleaseRuleBuilder_.setMessage(value); + } + } + ruleCase_ = 1; + return this; + } + /** + * + * + *
+     * Optional. `PromoteReleaseRule` will automatically promote a release from
+     * the current target to a specified target.
+     * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseRule promote_release_rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPromoteReleaseRule() { + if (promoteReleaseRuleBuilder_ == null) { + if (ruleCase_ == 1) { + ruleCase_ = 0; + rule_ = null; + onChanged(); + } + } else { + if (ruleCase_ == 1) { + ruleCase_ = 0; + rule_ = null; + } + promoteReleaseRuleBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. `PromoteReleaseRule` will automatically promote a release from
+     * the current target to a specified target.
+     * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseRule promote_release_rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.deploy.v1.PromoteReleaseRule.Builder getPromoteReleaseRuleBuilder() { + return getPromoteReleaseRuleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. `PromoteReleaseRule` will automatically promote a release from
+     * the current target to a specified target.
+     * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseRule promote_release_rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.PromoteReleaseRuleOrBuilder getPromoteReleaseRuleOrBuilder() { + if ((ruleCase_ == 1) && (promoteReleaseRuleBuilder_ != null)) { + return promoteReleaseRuleBuilder_.getMessageOrBuilder(); + } else { + if (ruleCase_ == 1) { + return (com.google.cloud.deploy.v1.PromoteReleaseRule) rule_; + } + return com.google.cloud.deploy.v1.PromoteReleaseRule.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. `PromoteReleaseRule` will automatically promote a release from
+     * the current target to a specified target.
+     * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseRule promote_release_rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.PromoteReleaseRule, + com.google.cloud.deploy.v1.PromoteReleaseRule.Builder, + com.google.cloud.deploy.v1.PromoteReleaseRuleOrBuilder> + getPromoteReleaseRuleFieldBuilder() { + if (promoteReleaseRuleBuilder_ == null) { + if (!(ruleCase_ == 1)) { + rule_ = com.google.cloud.deploy.v1.PromoteReleaseRule.getDefaultInstance(); + } + promoteReleaseRuleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.PromoteReleaseRule, + com.google.cloud.deploy.v1.PromoteReleaseRule.Builder, + com.google.cloud.deploy.v1.PromoteReleaseRuleOrBuilder>( + (com.google.cloud.deploy.v1.PromoteReleaseRule) rule_, + getParentForChildren(), + isClean()); + rule_ = null; + } + ruleCase_ = 1; + onChanged(); + return promoteReleaseRuleBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AdvanceRolloutRule, + com.google.cloud.deploy.v1.AdvanceRolloutRule.Builder, + com.google.cloud.deploy.v1.AdvanceRolloutRuleOrBuilder> + advanceRolloutRuleBuilder_; + /** + * + * + *
+     * Optional. The `AdvanceRolloutRule` will automatically advance a
+     * successful Rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutRule advance_rollout_rule = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the advanceRolloutRule field is set. + */ + @java.lang.Override + public boolean hasAdvanceRolloutRule() { + return ruleCase_ == 2; + } + /** + * + * + *
+     * Optional. The `AdvanceRolloutRule` will automatically advance a
+     * successful Rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutRule advance_rollout_rule = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The advanceRolloutRule. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AdvanceRolloutRule getAdvanceRolloutRule() { + if (advanceRolloutRuleBuilder_ == null) { + if (ruleCase_ == 2) { + return (com.google.cloud.deploy.v1.AdvanceRolloutRule) rule_; + } + return com.google.cloud.deploy.v1.AdvanceRolloutRule.getDefaultInstance(); + } else { + if (ruleCase_ == 2) { + return advanceRolloutRuleBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.AdvanceRolloutRule.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. The `AdvanceRolloutRule` will automatically advance a
+     * successful Rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutRule advance_rollout_rule = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdvanceRolloutRule(com.google.cloud.deploy.v1.AdvanceRolloutRule value) { + if (advanceRolloutRuleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rule_ = value; + onChanged(); + } else { + advanceRolloutRuleBuilder_.setMessage(value); + } + ruleCase_ = 2; + return this; + } + /** + * + * + *
+     * Optional. The `AdvanceRolloutRule` will automatically advance a
+     * successful Rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutRule advance_rollout_rule = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdvanceRolloutRule( + com.google.cloud.deploy.v1.AdvanceRolloutRule.Builder builderForValue) { + if (advanceRolloutRuleBuilder_ == null) { + rule_ = builderForValue.build(); + onChanged(); + } else { + advanceRolloutRuleBuilder_.setMessage(builderForValue.build()); + } + ruleCase_ = 2; + return this; + } + /** + * + * + *
+     * Optional. The `AdvanceRolloutRule` will automatically advance a
+     * successful Rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutRule advance_rollout_rule = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAdvanceRolloutRule(com.google.cloud.deploy.v1.AdvanceRolloutRule value) { + if (advanceRolloutRuleBuilder_ == null) { + if (ruleCase_ == 2 + && rule_ != com.google.cloud.deploy.v1.AdvanceRolloutRule.getDefaultInstance()) { + rule_ = + com.google.cloud.deploy.v1.AdvanceRolloutRule.newBuilder( + (com.google.cloud.deploy.v1.AdvanceRolloutRule) rule_) + .mergeFrom(value) + .buildPartial(); + } else { + rule_ = value; + } + onChanged(); + } else { + if (ruleCase_ == 2) { + advanceRolloutRuleBuilder_.mergeFrom(value); + } else { + advanceRolloutRuleBuilder_.setMessage(value); + } + } + ruleCase_ = 2; + return this; + } + /** + * + * + *
+     * Optional. The `AdvanceRolloutRule` will automatically advance a
+     * successful Rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutRule advance_rollout_rule = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAdvanceRolloutRule() { + if (advanceRolloutRuleBuilder_ == null) { + if (ruleCase_ == 2) { + ruleCase_ = 0; + rule_ = null; + onChanged(); + } + } else { + if (ruleCase_ == 2) { + ruleCase_ = 0; + rule_ = null; + } + advanceRolloutRuleBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. The `AdvanceRolloutRule` will automatically advance a
+     * successful Rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutRule advance_rollout_rule = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.deploy.v1.AdvanceRolloutRule.Builder getAdvanceRolloutRuleBuilder() { + return getAdvanceRolloutRuleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The `AdvanceRolloutRule` will automatically advance a
+     * successful Rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutRule advance_rollout_rule = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AdvanceRolloutRuleOrBuilder getAdvanceRolloutRuleOrBuilder() { + if ((ruleCase_ == 2) && (advanceRolloutRuleBuilder_ != null)) { + return advanceRolloutRuleBuilder_.getMessageOrBuilder(); + } else { + if (ruleCase_ == 2) { + return (com.google.cloud.deploy.v1.AdvanceRolloutRule) rule_; + } + return com.google.cloud.deploy.v1.AdvanceRolloutRule.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. The `AdvanceRolloutRule` will automatically advance a
+     * successful Rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutRule advance_rollout_rule = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AdvanceRolloutRule, + com.google.cloud.deploy.v1.AdvanceRolloutRule.Builder, + com.google.cloud.deploy.v1.AdvanceRolloutRuleOrBuilder> + getAdvanceRolloutRuleFieldBuilder() { + if (advanceRolloutRuleBuilder_ == null) { + if (!(ruleCase_ == 2)) { + rule_ = com.google.cloud.deploy.v1.AdvanceRolloutRule.getDefaultInstance(); + } + advanceRolloutRuleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AdvanceRolloutRule, + com.google.cloud.deploy.v1.AdvanceRolloutRule.Builder, + com.google.cloud.deploy.v1.AdvanceRolloutRuleOrBuilder>( + (com.google.cloud.deploy.v1.AdvanceRolloutRule) rule_, + getParentForChildren(), + isClean()); + rule_ = null; + } + ruleCase_ = 2; + onChanged(); + return advanceRolloutRuleBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.RepairRolloutRule, + com.google.cloud.deploy.v1.RepairRolloutRule.Builder, + com.google.cloud.deploy.v1.RepairRolloutRuleOrBuilder> + repairRolloutRuleBuilder_; + /** + * + * + *
+     * Optional. The `RepairRolloutRule` will automatically repair a failed
+     * rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutRule repair_rollout_rule = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the repairRolloutRule field is set. + */ + @java.lang.Override + public boolean hasRepairRolloutRule() { + return ruleCase_ == 3; + } + /** + * + * + *
+     * Optional. The `RepairRolloutRule` will automatically repair a failed
+     * rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutRule repair_rollout_rule = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The repairRolloutRule. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RepairRolloutRule getRepairRolloutRule() { + if (repairRolloutRuleBuilder_ == null) { + if (ruleCase_ == 3) { + return (com.google.cloud.deploy.v1.RepairRolloutRule) rule_; + } + return com.google.cloud.deploy.v1.RepairRolloutRule.getDefaultInstance(); + } else { + if (ruleCase_ == 3) { + return repairRolloutRuleBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.RepairRolloutRule.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. The `RepairRolloutRule` will automatically repair a failed
+     * rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutRule repair_rollout_rule = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRepairRolloutRule(com.google.cloud.deploy.v1.RepairRolloutRule value) { + if (repairRolloutRuleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rule_ = value; + onChanged(); + } else { + repairRolloutRuleBuilder_.setMessage(value); + } + ruleCase_ = 3; + return this; + } + /** + * + * + *
+     * Optional. The `RepairRolloutRule` will automatically repair a failed
+     * rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutRule repair_rollout_rule = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRepairRolloutRule( + com.google.cloud.deploy.v1.RepairRolloutRule.Builder builderForValue) { + if (repairRolloutRuleBuilder_ == null) { + rule_ = builderForValue.build(); + onChanged(); + } else { + repairRolloutRuleBuilder_.setMessage(builderForValue.build()); + } + ruleCase_ = 3; + return this; + } + /** + * + * + *
+     * Optional. The `RepairRolloutRule` will automatically repair a failed
+     * rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutRule repair_rollout_rule = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRepairRolloutRule(com.google.cloud.deploy.v1.RepairRolloutRule value) { + if (repairRolloutRuleBuilder_ == null) { + if (ruleCase_ == 3 + && rule_ != com.google.cloud.deploy.v1.RepairRolloutRule.getDefaultInstance()) { + rule_ = + com.google.cloud.deploy.v1.RepairRolloutRule.newBuilder( + (com.google.cloud.deploy.v1.RepairRolloutRule) rule_) + .mergeFrom(value) + .buildPartial(); + } else { + rule_ = value; + } + onChanged(); + } else { + if (ruleCase_ == 3) { + repairRolloutRuleBuilder_.mergeFrom(value); + } else { + repairRolloutRuleBuilder_.setMessage(value); + } + } + ruleCase_ = 3; + return this; + } + /** + * + * + *
+     * Optional. The `RepairRolloutRule` will automatically repair a failed
+     * rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutRule repair_rollout_rule = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRepairRolloutRule() { + if (repairRolloutRuleBuilder_ == null) { + if (ruleCase_ == 3) { + ruleCase_ = 0; + rule_ = null; + onChanged(); + } + } else { + if (ruleCase_ == 3) { + ruleCase_ = 0; + rule_ = null; + } + repairRolloutRuleBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. The `RepairRolloutRule` will automatically repair a failed
+     * rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutRule repair_rollout_rule = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.deploy.v1.RepairRolloutRule.Builder getRepairRolloutRuleBuilder() { + return getRepairRolloutRuleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The `RepairRolloutRule` will automatically repair a failed
+     * rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutRule repair_rollout_rule = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RepairRolloutRuleOrBuilder getRepairRolloutRuleOrBuilder() { + if ((ruleCase_ == 3) && (repairRolloutRuleBuilder_ != null)) { + return repairRolloutRuleBuilder_.getMessageOrBuilder(); + } else { + if (ruleCase_ == 3) { + return (com.google.cloud.deploy.v1.RepairRolloutRule) rule_; + } + return com.google.cloud.deploy.v1.RepairRolloutRule.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. The `RepairRolloutRule` will automatically repair a failed
+     * rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutRule repair_rollout_rule = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.RepairRolloutRule, + com.google.cloud.deploy.v1.RepairRolloutRule.Builder, + com.google.cloud.deploy.v1.RepairRolloutRuleOrBuilder> + getRepairRolloutRuleFieldBuilder() { + if (repairRolloutRuleBuilder_ == null) { + if (!(ruleCase_ == 3)) { + rule_ = com.google.cloud.deploy.v1.RepairRolloutRule.getDefaultInstance(); + } + repairRolloutRuleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.RepairRolloutRule, + com.google.cloud.deploy.v1.RepairRolloutRule.Builder, + com.google.cloud.deploy.v1.RepairRolloutRuleOrBuilder>( + (com.google.cloud.deploy.v1.RepairRolloutRule) rule_, + getParentForChildren(), + isClean()); + rule_ = null; + } + ruleCase_ = 3; + onChanged(); + return repairRolloutRuleBuilder_; + } + + @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.AutomationRule) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.AutomationRule) + private static final com.google.cloud.deploy.v1.AutomationRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.AutomationRule(); + } + + public static com.google.cloud.deploy.v1.AutomationRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutomationRule 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.AutomationRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRuleCondition.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRuleCondition.java new file mode 100644 index 000000000000..4fa6dfad81a9 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRuleCondition.java @@ -0,0 +1,743 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * `AutomationRuleCondition` contains conditions relevant to an
+ * `Automation` rule.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AutomationRuleCondition} + */ +public final class AutomationRuleCondition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.AutomationRuleCondition) + AutomationRuleConditionOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutomationRuleCondition.newBuilder() to construct. + private AutomationRuleCondition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutomationRuleCondition() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutomationRuleCondition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationRuleCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationRuleCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AutomationRuleCondition.class, + com.google.cloud.deploy.v1.AutomationRuleCondition.Builder.class); + } + + public static final int TARGETS_PRESENT_CONDITION_FIELD_NUMBER = 1; + private com.google.cloud.deploy.v1.TargetsPresentCondition targetsPresentCondition_; + /** + * + * + *
+   * Optional. Details around targets enumerated in the rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the targetsPresentCondition field is set. + */ + @java.lang.Override + public boolean hasTargetsPresentCondition() { + return targetsPresentCondition_ != null; + } + /** + * + * + *
+   * Optional. Details around targets enumerated in the rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The targetsPresentCondition. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.TargetsPresentCondition getTargetsPresentCondition() { + return targetsPresentCondition_ == null + ? com.google.cloud.deploy.v1.TargetsPresentCondition.getDefaultInstance() + : targetsPresentCondition_; + } + /** + * + * + *
+   * Optional. Details around targets enumerated in the rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.TargetsPresentConditionOrBuilder + getTargetsPresentConditionOrBuilder() { + return targetsPresentCondition_ == null + ? com.google.cloud.deploy.v1.TargetsPresentCondition.getDefaultInstance() + : targetsPresentCondition_; + } + + 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 (targetsPresentCondition_ != null) { + output.writeMessage(1, getTargetsPresentCondition()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (targetsPresentCondition_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTargetsPresentCondition()); + } + 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.AutomationRuleCondition)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.AutomationRuleCondition other = + (com.google.cloud.deploy.v1.AutomationRuleCondition) obj; + + if (hasTargetsPresentCondition() != other.hasTargetsPresentCondition()) return false; + if (hasTargetsPresentCondition()) { + if (!getTargetsPresentCondition().equals(other.getTargetsPresentCondition())) 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 (hasTargetsPresentCondition()) { + hash = (37 * hash) + TARGETS_PRESENT_CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getTargetsPresentCondition().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.AutomationRuleCondition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationRuleCondition 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.AutomationRuleCondition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationRuleCondition 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.AutomationRuleCondition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationRuleCondition 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.AutomationRuleCondition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AutomationRuleCondition 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.AutomationRuleCondition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AutomationRuleCondition 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.AutomationRuleCondition 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.AutomationRuleCondition 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.AutomationRuleCondition 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; + } + /** + * + * + *
+   * `AutomationRuleCondition` contains conditions relevant to an
+   * `Automation` rule.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AutomationRuleCondition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.AutomationRuleCondition) + com.google.cloud.deploy.v1.AutomationRuleConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationRuleCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationRuleCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AutomationRuleCondition.class, + com.google.cloud.deploy.v1.AutomationRuleCondition.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.AutomationRuleCondition.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + targetsPresentCondition_ = null; + if (targetsPresentConditionBuilder_ != null) { + targetsPresentConditionBuilder_.dispose(); + targetsPresentConditionBuilder_ = 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_AutomationRuleCondition_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRuleCondition getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.AutomationRuleCondition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRuleCondition build() { + com.google.cloud.deploy.v1.AutomationRuleCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRuleCondition buildPartial() { + com.google.cloud.deploy.v1.AutomationRuleCondition result = + new com.google.cloud.deploy.v1.AutomationRuleCondition(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.AutomationRuleCondition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.targetsPresentCondition_ = + targetsPresentConditionBuilder_ == null + ? targetsPresentCondition_ + : targetsPresentConditionBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.AutomationRuleCondition) { + return mergeFrom((com.google.cloud.deploy.v1.AutomationRuleCondition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.AutomationRuleCondition other) { + if (other == com.google.cloud.deploy.v1.AutomationRuleCondition.getDefaultInstance()) + return this; + if (other.hasTargetsPresentCondition()) { + mergeTargetsPresentCondition(other.getTargetsPresentCondition()); + } + 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( + getTargetsPresentConditionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.deploy.v1.TargetsPresentCondition targetsPresentCondition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.TargetsPresentCondition, + com.google.cloud.deploy.v1.TargetsPresentCondition.Builder, + com.google.cloud.deploy.v1.TargetsPresentConditionOrBuilder> + targetsPresentConditionBuilder_; + /** + * + * + *
+     * Optional. Details around targets enumerated in the rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the targetsPresentCondition field is set. + */ + public boolean hasTargetsPresentCondition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. Details around targets enumerated in the rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The targetsPresentCondition. + */ + public com.google.cloud.deploy.v1.TargetsPresentCondition getTargetsPresentCondition() { + if (targetsPresentConditionBuilder_ == null) { + return targetsPresentCondition_ == null + ? com.google.cloud.deploy.v1.TargetsPresentCondition.getDefaultInstance() + : targetsPresentCondition_; + } else { + return targetsPresentConditionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Details around targets enumerated in the rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTargetsPresentCondition( + com.google.cloud.deploy.v1.TargetsPresentCondition value) { + if (targetsPresentConditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + targetsPresentCondition_ = value; + } else { + targetsPresentConditionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Details around targets enumerated in the rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTargetsPresentCondition( + com.google.cloud.deploy.v1.TargetsPresentCondition.Builder builderForValue) { + if (targetsPresentConditionBuilder_ == null) { + targetsPresentCondition_ = builderForValue.build(); + } else { + targetsPresentConditionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Details around targets enumerated in the rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeTargetsPresentCondition( + com.google.cloud.deploy.v1.TargetsPresentCondition value) { + if (targetsPresentConditionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && targetsPresentCondition_ != null + && targetsPresentCondition_ + != com.google.cloud.deploy.v1.TargetsPresentCondition.getDefaultInstance()) { + getTargetsPresentConditionBuilder().mergeFrom(value); + } else { + targetsPresentCondition_ = value; + } + } else { + targetsPresentConditionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Details around targets enumerated in the rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearTargetsPresentCondition() { + bitField0_ = (bitField0_ & ~0x00000001); + targetsPresentCondition_ = null; + if (targetsPresentConditionBuilder_ != null) { + targetsPresentConditionBuilder_.dispose(); + targetsPresentConditionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Details around targets enumerated in the rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.deploy.v1.TargetsPresentCondition.Builder + getTargetsPresentConditionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTargetsPresentConditionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Details around targets enumerated in the rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.deploy.v1.TargetsPresentConditionOrBuilder + getTargetsPresentConditionOrBuilder() { + if (targetsPresentConditionBuilder_ != null) { + return targetsPresentConditionBuilder_.getMessageOrBuilder(); + } else { + return targetsPresentCondition_ == null + ? com.google.cloud.deploy.v1.TargetsPresentCondition.getDefaultInstance() + : targetsPresentCondition_; + } + } + /** + * + * + *
+     * Optional. Details around targets enumerated in the rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.TargetsPresentCondition, + com.google.cloud.deploy.v1.TargetsPresentCondition.Builder, + com.google.cloud.deploy.v1.TargetsPresentConditionOrBuilder> + getTargetsPresentConditionFieldBuilder() { + if (targetsPresentConditionBuilder_ == null) { + targetsPresentConditionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.TargetsPresentCondition, + com.google.cloud.deploy.v1.TargetsPresentCondition.Builder, + com.google.cloud.deploy.v1.TargetsPresentConditionOrBuilder>( + getTargetsPresentCondition(), getParentForChildren(), isClean()); + targetsPresentCondition_ = null; + } + return targetsPresentConditionBuilder_; + } + + @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.AutomationRuleCondition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.AutomationRuleCondition) + private static final com.google.cloud.deploy.v1.AutomationRuleCondition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.AutomationRuleCondition(); + } + + public static com.google.cloud.deploy.v1.AutomationRuleCondition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutomationRuleCondition 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.AutomationRuleCondition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRuleConditionOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRuleConditionOrBuilder.java new file mode 100644 index 000000000000..04b96113bdfb --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRuleConditionOrBuilder.java @@ -0,0 +1,66 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 AutomationRuleConditionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.AutomationRuleCondition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Details around targets enumerated in the rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the targetsPresentCondition field is set. + */ + boolean hasTargetsPresentCondition(); + /** + * + * + *
+   * Optional. Details around targets enumerated in the rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The targetsPresentCondition. + */ + com.google.cloud.deploy.v1.TargetsPresentCondition getTargetsPresentCondition(); + /** + * + * + *
+   * Optional. Details around targets enumerated in the rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.TargetsPresentCondition targets_present_condition = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.deploy.v1.TargetsPresentConditionOrBuilder getTargetsPresentConditionOrBuilder(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRuleOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRuleOrBuilder.java new file mode 100644 index 000000000000..e1f37cfadc9f --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRuleOrBuilder.java @@ -0,0 +1,159 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 AutomationRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.AutomationRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. `PromoteReleaseRule` will automatically promote a release from
+   * the current target to a specified target.
+   * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseRule promote_release_rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the promoteReleaseRule field is set. + */ + boolean hasPromoteReleaseRule(); + /** + * + * + *
+   * Optional. `PromoteReleaseRule` will automatically promote a release from
+   * the current target to a specified target.
+   * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseRule promote_release_rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The promoteReleaseRule. + */ + com.google.cloud.deploy.v1.PromoteReleaseRule getPromoteReleaseRule(); + /** + * + * + *
+   * Optional. `PromoteReleaseRule` will automatically promote a release from
+   * the current target to a specified target.
+   * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseRule promote_release_rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.deploy.v1.PromoteReleaseRuleOrBuilder getPromoteReleaseRuleOrBuilder(); + + /** + * + * + *
+   * Optional. The `AdvanceRolloutRule` will automatically advance a
+   * successful Rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutRule advance_rollout_rule = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the advanceRolloutRule field is set. + */ + boolean hasAdvanceRolloutRule(); + /** + * + * + *
+   * Optional. The `AdvanceRolloutRule` will automatically advance a
+   * successful Rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutRule advance_rollout_rule = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The advanceRolloutRule. + */ + com.google.cloud.deploy.v1.AdvanceRolloutRule getAdvanceRolloutRule(); + /** + * + * + *
+   * Optional. The `AdvanceRolloutRule` will automatically advance a
+   * successful Rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutRule advance_rollout_rule = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.deploy.v1.AdvanceRolloutRuleOrBuilder getAdvanceRolloutRuleOrBuilder(); + + /** + * + * + *
+   * Optional. The `RepairRolloutRule` will automatically repair a failed
+   * rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutRule repair_rollout_rule = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the repairRolloutRule field is set. + */ + boolean hasRepairRolloutRule(); + /** + * + * + *
+   * Optional. The `RepairRolloutRule` will automatically repair a failed
+   * rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutRule repair_rollout_rule = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The repairRolloutRule. + */ + com.google.cloud.deploy.v1.RepairRolloutRule getRepairRolloutRule(); + /** + * + * + *
+   * Optional. The `RepairRolloutRule` will automatically repair a failed
+   * rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutRule repair_rollout_rule = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.deploy.v1.RepairRolloutRuleOrBuilder getRepairRolloutRuleOrBuilder(); + + com.google.cloud.deploy.v1.AutomationRule.RuleCase getRuleCase(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRun.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRun.java new file mode 100644 index 000000000000..cecf01f38b13 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRun.java @@ -0,0 +1,4680 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * An `AutomationRun` resource in the Cloud Deploy API.
+ *
+ * An `AutomationRun` represents an automation execution instance of an
+ * automation rule.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AutomationRun} + */ +public final class AutomationRun extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.AutomationRun) + AutomationRunOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutomationRun.newBuilder() to construct. + private AutomationRun(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutomationRun() { + name_ = ""; + etag_ = ""; + serviceAccount_ = ""; + targetId_ = ""; + state_ = 0; + stateDescription_ = ""; + ruleId_ = ""; + automationId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutomationRun(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationRun_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationRun_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AutomationRun.class, + com.google.cloud.deploy.v1.AutomationRun.Builder.class); + } + + /** + * + * + *
+   * Valid state of an `AutomationRun`.
+   * 
+ * + * Protobuf enum {@code google.cloud.deploy.v1.AutomationRun.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The `AutomationRun` has an unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The `AutomationRun` has succeeded.
+     * 
+ * + * SUCCEEDED = 1; + */ + SUCCEEDED(1), + /** + * + * + *
+     * The `AutomationRun` was cancelled.
+     * 
+ * + * CANCELLED = 2; + */ + CANCELLED(2), + /** + * + * + *
+     * The `AutomationRun` has failed.
+     * 
+ * + * FAILED = 3; + */ + FAILED(3), + /** + * + * + *
+     * The `AutomationRun` is in progress.
+     * 
+ * + * IN_PROGRESS = 4; + */ + IN_PROGRESS(4), + /** + * + * + *
+     * The `AutomationRun` is pending.
+     * 
+ * + * PENDING = 5; + */ + PENDING(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The `AutomationRun` has an unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The `AutomationRun` has succeeded.
+     * 
+ * + * SUCCEEDED = 1; + */ + public static final int SUCCEEDED_VALUE = 1; + /** + * + * + *
+     * The `AutomationRun` was cancelled.
+     * 
+ * + * CANCELLED = 2; + */ + public static final int CANCELLED_VALUE = 2; + /** + * + * + *
+     * The `AutomationRun` has failed.
+     * 
+ * + * FAILED = 3; + */ + public static final int FAILED_VALUE = 3; + /** + * + * + *
+     * The `AutomationRun` is in progress.
+     * 
+ * + * IN_PROGRESS = 4; + */ + public static final int IN_PROGRESS_VALUE = 4; + /** + * + * + *
+     * The `AutomationRun` is pending.
+     * 
+ * + * PENDING = 5; + */ + public static final int PENDING_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static 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 SUCCEEDED; + case 2: + return CANCELLED; + case 3: + return FAILED; + case 4: + return IN_PROGRESS; + case 5: + return PENDING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public 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.AutomationRun.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.AutomationRun.State) + } + + private int operationCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object operation_; + + public enum OperationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PROMOTE_RELEASE_OPERATION(13), + ADVANCE_ROLLOUT_OPERATION(14), + REPAIR_ROLLOUT_OPERATION(17), + OPERATION_NOT_SET(0); + private final int value; + + private OperationCase(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 OperationCase valueOf(int value) { + return forNumber(value); + } + + public static OperationCase forNumber(int value) { + switch (value) { + case 13: + return PROMOTE_RELEASE_OPERATION; + case 14: + return ADVANCE_ROLLOUT_OPERATION; + case 17: + return REPAIR_ROLLOUT_OPERATION; + case 0: + return OPERATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public OperationCase getOperationCase() { + return OperationCase.forNumber(operationCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Name of the `AutomationRun`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+   * Output only. Name of the `AutomationRun`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time at which the `AutomationRun` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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 `AutomationRun` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.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 `AutomationRun` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time at which the automationRun was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time at which the automationRun was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time at which the automationRun was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int ETAG_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + /** + * + * + *
+   * Output only. The weak etag of the `AutomationRun` resource.
+   * 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 = 4 [(.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. The weak etag of the `AutomationRun` resource.
+   * 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 = 4 [(.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; + } + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+   * Output only. Email address of the user-managed IAM service account that
+   * performs the operations against Cloud Deploy resources.
+   * 
+ * + * string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAccount. + */ + @java.lang.Override + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Email address of the user-managed IAM service account that
+   * performs the operations against Cloud Deploy resources.
+   * 
+ * + * string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTOMATION_SNAPSHOT_FIELD_NUMBER = 6; + private com.google.cloud.deploy.v1.Automation automationSnapshot_; + /** + * + * + *
+   * Output only. Snapshot of the Automation taken at AutomationRun creation
+   * time.
+   * 
+ * + * + * .google.cloud.deploy.v1.Automation automation_snapshot = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the automationSnapshot field is set. + */ + @java.lang.Override + public boolean hasAutomationSnapshot() { + return automationSnapshot_ != null; + } + /** + * + * + *
+   * Output only. Snapshot of the Automation taken at AutomationRun creation
+   * time.
+   * 
+ * + * + * .google.cloud.deploy.v1.Automation automation_snapshot = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The automationSnapshot. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Automation getAutomationSnapshot() { + return automationSnapshot_ == null + ? com.google.cloud.deploy.v1.Automation.getDefaultInstance() + : automationSnapshot_; + } + /** + * + * + *
+   * Output only. Snapshot of the Automation taken at AutomationRun creation
+   * time.
+   * 
+ * + * + * .google.cloud.deploy.v1.Automation automation_snapshot = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationOrBuilder getAutomationSnapshotOrBuilder() { + return automationSnapshot_ == null + ? com.google.cloud.deploy.v1.Automation.getDefaultInstance() + : automationSnapshot_; + } + + public static final int TARGET_ID_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object targetId_ = ""; + /** + * + * + *
+   * Output only. The ID of the target that represents the promotion stage that
+   * initiates the `AutomationRun`. The value of this field is the last segment
+   * of a target name.
+   * 
+ * + * string target_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+   * Output only. The ID of the target that represents the promotion stage that
+   * initiates the `AutomationRun`. The value of this field is the last segment
+   * of a target name.
+   * 
+ * + * string target_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 STATE_FIELD_NUMBER = 8; + private int state_ = 0; + /** + * + * + *
+   * Output only. Current state of the `AutomationRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRun.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. Current state of the `AutomationRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRun.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRun.State getState() { + com.google.cloud.deploy.v1.AutomationRun.State result = + com.google.cloud.deploy.v1.AutomationRun.State.forNumber(state_); + return result == null ? com.google.cloud.deploy.v1.AutomationRun.State.UNRECOGNIZED : result; + } + + public static final int STATE_DESCRIPTION_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object stateDescription_ = ""; + /** + * + * + *
+   * Output only. Explains the current state of the `AutomationRun`. Present
+   * only an explanation is needed.
+   * 
+ * + * string state_description = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateDescription. + */ + @java.lang.Override + public java.lang.String getStateDescription() { + java.lang.Object ref = stateDescription_; + 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(); + stateDescription_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Explains the current state of the `AutomationRun`. Present
+   * only an explanation is needed.
+   * 
+ * + * string state_description = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStateDescriptionBytes() { + java.lang.Object ref = stateDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stateDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPIRE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp expireTime_; + /** + * + * + *
+   * Output only. Time the `AutomationRun` will expire. An `AutomationRun` will
+   * expire after 14 days from its creation date.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + @java.lang.Override + public boolean hasExpireTime() { + return expireTime_ != null; + } + /** + * + * + *
+   * Output only. Time the `AutomationRun` will expire. An `AutomationRun` will
+   * expire after 14 days from its creation date.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpireTime() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + /** + * + * + *
+   * Output only. Time the `AutomationRun` will expire. An `AutomationRun` will
+   * expire after 14 days from its creation date.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + + public static final int RULE_ID_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object ruleId_ = ""; + /** + * + * + *
+   * Output only. The ID of the automation rule that initiated the operation.
+   * 
+ * + * string rule_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The ruleId. + */ + @java.lang.Override + public java.lang.String getRuleId() { + java.lang.Object ref = ruleId_; + 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(); + ruleId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The ID of the automation rule that initiated the operation.
+   * 
+ * + * string rule_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for ruleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuleIdBytes() { + java.lang.Object ref = ruleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ruleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTOMATION_ID_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private volatile java.lang.Object automationId_ = ""; + /** + * + * + *
+   * Output only. The ID of the automation that initiated the operation.
+   * 
+ * + * string automation_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The automationId. + */ + @java.lang.Override + public java.lang.String getAutomationId() { + java.lang.Object ref = automationId_; + 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(); + automationId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The ID of the automation that initiated the operation.
+   * 
+ * + * string automation_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for automationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAutomationIdBytes() { + java.lang.Object ref = automationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + automationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROMOTE_RELEASE_OPERATION_FIELD_NUMBER = 13; + /** + * + * + *
+   * Output only. Promotes a release to a specified 'Target'.
+   * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseOperation promote_release_operation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the promoteReleaseOperation field is set. + */ + @java.lang.Override + public boolean hasPromoteReleaseOperation() { + return operationCase_ == 13; + } + /** + * + * + *
+   * Output only. Promotes a release to a specified 'Target'.
+   * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseOperation promote_release_operation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The promoteReleaseOperation. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.PromoteReleaseOperation getPromoteReleaseOperation() { + if (operationCase_ == 13) { + return (com.google.cloud.deploy.v1.PromoteReleaseOperation) operation_; + } + return com.google.cloud.deploy.v1.PromoteReleaseOperation.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. Promotes a release to a specified 'Target'.
+   * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseOperation promote_release_operation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.PromoteReleaseOperationOrBuilder + getPromoteReleaseOperationOrBuilder() { + if (operationCase_ == 13) { + return (com.google.cloud.deploy.v1.PromoteReleaseOperation) operation_; + } + return com.google.cloud.deploy.v1.PromoteReleaseOperation.getDefaultInstance(); + } + + public static final int ADVANCE_ROLLOUT_OPERATION_FIELD_NUMBER = 14; + /** + * + * + *
+   * Output only. Advances a rollout to the next phase.
+   * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutOperation advance_rollout_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the advanceRolloutOperation field is set. + */ + @java.lang.Override + public boolean hasAdvanceRolloutOperation() { + return operationCase_ == 14; + } + /** + * + * + *
+   * Output only. Advances a rollout to the next phase.
+   * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutOperation advance_rollout_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The advanceRolloutOperation. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AdvanceRolloutOperation getAdvanceRolloutOperation() { + if (operationCase_ == 14) { + return (com.google.cloud.deploy.v1.AdvanceRolloutOperation) operation_; + } + return com.google.cloud.deploy.v1.AdvanceRolloutOperation.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. Advances a rollout to the next phase.
+   * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutOperation advance_rollout_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AdvanceRolloutOperationOrBuilder + getAdvanceRolloutOperationOrBuilder() { + if (operationCase_ == 14) { + return (com.google.cloud.deploy.v1.AdvanceRolloutOperation) operation_; + } + return com.google.cloud.deploy.v1.AdvanceRolloutOperation.getDefaultInstance(); + } + + public static final int REPAIR_ROLLOUT_OPERATION_FIELD_NUMBER = 17; + /** + * + * + *
+   * Output only. Repairs a failed 'Rollout'.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutOperation repair_rollout_operation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the repairRolloutOperation field is set. + */ + @java.lang.Override + public boolean hasRepairRolloutOperation() { + return operationCase_ == 17; + } + /** + * + * + *
+   * Output only. Repairs a failed 'Rollout'.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutOperation repair_rollout_operation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The repairRolloutOperation. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RepairRolloutOperation getRepairRolloutOperation() { + if (operationCase_ == 17) { + return (com.google.cloud.deploy.v1.RepairRolloutOperation) operation_; + } + return com.google.cloud.deploy.v1.RepairRolloutOperation.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. Repairs a failed 'Rollout'.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutOperation repair_rollout_operation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RepairRolloutOperationOrBuilder + getRepairRolloutOperationOrBuilder() { + if (operationCase_ == 17) { + return (com.google.cloud.deploy.v1.RepairRolloutOperation) operation_; + } + return com.google.cloud.deploy.v1.RepairRolloutOperation.getDefaultInstance(); + } + + public static final int WAIT_UNTIL_TIME_FIELD_NUMBER = 16; + private com.google.protobuf.Timestamp waitUntilTime_; + /** + * + * + *
+   * Output only. Earliest time the `AutomationRun` will attempt to resume.
+   * Wait-time is configured by `wait` in automation rule.
+   * 
+ * + * + * .google.protobuf.Timestamp wait_until_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the waitUntilTime field is set. + */ + @java.lang.Override + public boolean hasWaitUntilTime() { + return waitUntilTime_ != null; + } + /** + * + * + *
+   * Output only. Earliest time the `AutomationRun` will attempt to resume.
+   * Wait-time is configured by `wait` in automation rule.
+   * 
+ * + * + * .google.protobuf.Timestamp wait_until_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The waitUntilTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getWaitUntilTime() { + return waitUntilTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : waitUntilTime_; + } + /** + * + * + *
+   * Output only. Earliest time the `AutomationRun` will attempt to resume.
+   * Wait-time is configured by `wait` in automation rule.
+   * 
+ * + * + * .google.protobuf.Timestamp wait_until_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getWaitUntilTimeOrBuilder() { + return waitUntilTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : waitUntilTime_; + } + + 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 (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, etag_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, serviceAccount_); + } + if (automationSnapshot_ != null) { + output.writeMessage(6, getAutomationSnapshot()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, targetId_); + } + if (state_ != com.google.cloud.deploy.v1.AutomationRun.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(8, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, stateDescription_); + } + if (expireTime_ != null) { + output.writeMessage(11, getExpireTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ruleId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, ruleId_); + } + if (operationCase_ == 13) { + output.writeMessage(13, (com.google.cloud.deploy.v1.PromoteReleaseOperation) operation_); + } + if (operationCase_ == 14) { + output.writeMessage(14, (com.google.cloud.deploy.v1.AdvanceRolloutOperation) operation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(automationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, automationId_); + } + if (waitUntilTime_ != null) { + output.writeMessage(16, getWaitUntilTime()); + } + if (operationCase_ == 17) { + output.writeMessage(17, (com.google.cloud.deploy.v1.RepairRolloutOperation) operation_); + } + 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 (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, etag_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, serviceAccount_); + } + if (automationSnapshot_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getAutomationSnapshot()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, targetId_); + } + if (state_ != com.google.cloud.deploy.v1.AutomationRun.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, stateDescription_); + } + if (expireTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getExpireTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ruleId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, ruleId_); + } + if (operationCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.cloud.deploy.v1.PromoteReleaseOperation) operation_); + } + if (operationCase_ == 14) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 14, (com.google.cloud.deploy.v1.AdvanceRolloutOperation) operation_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(automationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, automationId_); + } + if (waitUntilTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getWaitUntilTime()); + } + if (operationCase_ == 17) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 17, (com.google.cloud.deploy.v1.RepairRolloutOperation) operation_); + } + 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.AutomationRun)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.AutomationRun other = (com.google.cloud.deploy.v1.AutomationRun) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getEtag().equals(other.getEtag())) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (hasAutomationSnapshot() != other.hasAutomationSnapshot()) return false; + if (hasAutomationSnapshot()) { + if (!getAutomationSnapshot().equals(other.getAutomationSnapshot())) return false; + } + if (!getTargetId().equals(other.getTargetId())) return false; + if (state_ != other.state_) return false; + if (!getStateDescription().equals(other.getStateDescription())) return false; + if (hasExpireTime() != other.hasExpireTime()) return false; + if (hasExpireTime()) { + if (!getExpireTime().equals(other.getExpireTime())) return false; + } + if (!getRuleId().equals(other.getRuleId())) return false; + if (!getAutomationId().equals(other.getAutomationId())) return false; + if (hasWaitUntilTime() != other.hasWaitUntilTime()) return false; + if (hasWaitUntilTime()) { + if (!getWaitUntilTime().equals(other.getWaitUntilTime())) return false; + } + if (!getOperationCase().equals(other.getOperationCase())) return false; + switch (operationCase_) { + case 13: + if (!getPromoteReleaseOperation().equals(other.getPromoteReleaseOperation())) return false; + break; + case 14: + if (!getAdvanceRolloutOperation().equals(other.getAdvanceRolloutOperation())) return false; + break; + case 17: + if (!getRepairRolloutOperation().equals(other.getRepairRolloutOperation())) 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(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + if (hasAutomationSnapshot()) { + hash = (37 * hash) + AUTOMATION_SNAPSHOT_FIELD_NUMBER; + hash = (53 * hash) + getAutomationSnapshot().hashCode(); + } + hash = (37 * hash) + TARGET_ID_FIELD_NUMBER; + hash = (53 * hash) + getTargetId().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + STATE_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getStateDescription().hashCode(); + if (hasExpireTime()) { + hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpireTime().hashCode(); + } + hash = (37 * hash) + RULE_ID_FIELD_NUMBER; + hash = (53 * hash) + getRuleId().hashCode(); + hash = (37 * hash) + AUTOMATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getAutomationId().hashCode(); + if (hasWaitUntilTime()) { + hash = (37 * hash) + WAIT_UNTIL_TIME_FIELD_NUMBER; + hash = (53 * hash) + getWaitUntilTime().hashCode(); + } + switch (operationCase_) { + case 13: + hash = (37 * hash) + PROMOTE_RELEASE_OPERATION_FIELD_NUMBER; + hash = (53 * hash) + getPromoteReleaseOperation().hashCode(); + break; + case 14: + hash = (37 * hash) + ADVANCE_ROLLOUT_OPERATION_FIELD_NUMBER; + hash = (53 * hash) + getAdvanceRolloutOperation().hashCode(); + break; + case 17: + hash = (37 * hash) + REPAIR_ROLLOUT_OPERATION_FIELD_NUMBER; + hash = (53 * hash) + getRepairRolloutOperation().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.AutomationRun parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationRun 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.AutomationRun parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationRun 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.AutomationRun parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationRun 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.AutomationRun parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AutomationRun 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.AutomationRun parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AutomationRun 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.AutomationRun 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.AutomationRun 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.AutomationRun prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An `AutomationRun` resource in the Cloud Deploy API.
+   *
+   * An `AutomationRun` represents an automation execution instance of an
+   * automation rule.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AutomationRun} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.AutomationRun) + com.google.cloud.deploy.v1.AutomationRunOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationRun_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_AutomationRun_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AutomationRun.class, + com.google.cloud.deploy.v1.AutomationRun.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.AutomationRun.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + etag_ = ""; + serviceAccount_ = ""; + automationSnapshot_ = null; + if (automationSnapshotBuilder_ != null) { + automationSnapshotBuilder_.dispose(); + automationSnapshotBuilder_ = null; + } + targetId_ = ""; + state_ = 0; + stateDescription_ = ""; + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + ruleId_ = ""; + automationId_ = ""; + if (promoteReleaseOperationBuilder_ != null) { + promoteReleaseOperationBuilder_.clear(); + } + if (advanceRolloutOperationBuilder_ != null) { + advanceRolloutOperationBuilder_.clear(); + } + if (repairRolloutOperationBuilder_ != null) { + repairRolloutOperationBuilder_.clear(); + } + waitUntilTime_ = null; + if (waitUntilTimeBuilder_ != null) { + waitUntilTimeBuilder_.dispose(); + waitUntilTimeBuilder_ = null; + } + operationCase_ = 0; + operation_ = 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_AutomationRun_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRun getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.AutomationRun.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRun build() { + com.google.cloud.deploy.v1.AutomationRun result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRun buildPartial() { + com.google.cloud.deploy.v1.AutomationRun result = + new com.google.cloud.deploy.v1.AutomationRun(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.AutomationRun result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.serviceAccount_ = serviceAccount_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.automationSnapshot_ = + automationSnapshotBuilder_ == null + ? automationSnapshot_ + : automationSnapshotBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.targetId_ = targetId_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.stateDescription_ = stateDescription_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.expireTime_ = expireTimeBuilder_ == null ? expireTime_ : expireTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.ruleId_ = ruleId_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.automationId_ = automationId_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.waitUntilTime_ = + waitUntilTimeBuilder_ == null ? waitUntilTime_ : waitUntilTimeBuilder_.build(); + } + } + + private void buildPartialOneofs(com.google.cloud.deploy.v1.AutomationRun result) { + result.operationCase_ = operationCase_; + result.operation_ = this.operation_; + if (operationCase_ == 13 && promoteReleaseOperationBuilder_ != null) { + result.operation_ = promoteReleaseOperationBuilder_.build(); + } + if (operationCase_ == 14 && advanceRolloutOperationBuilder_ != null) { + result.operation_ = advanceRolloutOperationBuilder_.build(); + } + if (operationCase_ == 17 && repairRolloutOperationBuilder_ != null) { + result.operation_ = repairRolloutOperationBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.AutomationRun) { + return mergeFrom((com.google.cloud.deploy.v1.AutomationRun) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.AutomationRun other) { + if (other == com.google.cloud.deploy.v1.AutomationRun.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasAutomationSnapshot()) { + mergeAutomationSnapshot(other.getAutomationSnapshot()); + } + if (!other.getTargetId().isEmpty()) { + targetId_ = other.targetId_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getStateDescription().isEmpty()) { + stateDescription_ = other.stateDescription_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasExpireTime()) { + mergeExpireTime(other.getExpireTime()); + } + if (!other.getRuleId().isEmpty()) { + ruleId_ = other.ruleId_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (!other.getAutomationId().isEmpty()) { + automationId_ = other.automationId_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (other.hasWaitUntilTime()) { + mergeWaitUntilTime(other.getWaitUntilTime()); + } + switch (other.getOperationCase()) { + case PROMOTE_RELEASE_OPERATION: + { + mergePromoteReleaseOperation(other.getPromoteReleaseOperation()); + break; + } + case ADVANCE_ROLLOUT_OPERATION: + { + mergeAdvanceRolloutOperation(other.getAdvanceRolloutOperation()); + break; + } + case REPAIR_ROLLOUT_OPERATION: + { + mergeRepairRolloutOperation(other.getRepairRolloutOperation()); + break; + } + case OPERATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + serviceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + getAutomationSnapshotFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + targetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 74: + { + stateDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 90: + { + input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 90 + case 98: + { + ruleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 98 + case 106: + { + input.readMessage( + getPromoteReleaseOperationFieldBuilder().getBuilder(), extensionRegistry); + operationCase_ = 13; + break; + } // case 106 + case 114: + { + input.readMessage( + getAdvanceRolloutOperationFieldBuilder().getBuilder(), extensionRegistry); + operationCase_ = 14; + break; + } // case 114 + case 122: + { + automationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 122 + case 130: + { + input.readMessage(getWaitUntilTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 130 + case 138: + { + input.readMessage( + getRepairRolloutOperationFieldBuilder().getBuilder(), extensionRegistry); + operationCase_ = 17; + break; + } // case 138 + 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 operationCase_ = 0; + private java.lang.Object operation_; + + public OperationCase getOperationCase() { + return OperationCase.forNumber(operationCase_); + } + + public Builder clearOperation() { + operationCase_ = 0; + operation_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Name of the `AutomationRun`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. Name of the `AutomationRun`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. Name of the `AutomationRun`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the `AutomationRun`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the `AutomationRun`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.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 `AutomationRun` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. Time at which the `AutomationRun` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 `AutomationRun` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time at which the `AutomationRun` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time at which the `AutomationRun` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time at which the `AutomationRun` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time at which the `AutomationRun` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time at which the `AutomationRun` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.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 `AutomationRun` was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time at which the automationRun was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. Time at which the automationRun was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time at which the automationRun was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time at which the automationRun was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time at which the automationRun was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time at which the automationRun was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time at which the automationRun was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time at which the automationRun was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time at which the automationRun was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Output only. The weak etag of the `AutomationRun` resource.
+     * 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 = 4 [(.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. The weak etag of the `AutomationRun` resource.
+     * 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 = 4 [(.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. The weak etag of the `AutomationRun` resource.
+     * 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 = 4 [(.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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The weak etag of the `AutomationRun` resource.
+     * 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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The weak etag of the `AutomationRun` resource.
+     * 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 = 4 [(.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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * Output only. Email address of the user-managed IAM service account that
+     * performs the operations against Cloud Deploy resources.
+     * 
+ * + * string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAccount. + */ + public java.lang.String getServiceAccount() { + java.lang.Object ref = serviceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Email address of the user-managed IAM service account that
+     * performs the operations against Cloud Deploy resources.
+     * 
+ * + * string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAccount. + */ + public com.google.protobuf.ByteString getServiceAccountBytes() { + java.lang.Object ref = serviceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Email address of the user-managed IAM service account that
+     * performs the operations against Cloud Deploy resources.
+     * 
+ * + * string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceAccount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Email address of the user-managed IAM service account that
+     * performs the operations against Cloud Deploy resources.
+     * 
+ * + * string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + serviceAccount_ = getDefaultInstance().getServiceAccount(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Email address of the user-managed IAM service account that
+     * performs the operations against Cloud Deploy resources.
+     * 
+ * + * string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for serviceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceAccount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.cloud.deploy.v1.Automation automationSnapshot_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Automation, + com.google.cloud.deploy.v1.Automation.Builder, + com.google.cloud.deploy.v1.AutomationOrBuilder> + automationSnapshotBuilder_; + /** + * + * + *
+     * Output only. Snapshot of the Automation taken at AutomationRun creation
+     * time.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation_snapshot = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the automationSnapshot field is set. + */ + public boolean hasAutomationSnapshot() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Output only. Snapshot of the Automation taken at AutomationRun creation
+     * time.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation_snapshot = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The automationSnapshot. + */ + public com.google.cloud.deploy.v1.Automation getAutomationSnapshot() { + if (automationSnapshotBuilder_ == null) { + return automationSnapshot_ == null + ? com.google.cloud.deploy.v1.Automation.getDefaultInstance() + : automationSnapshot_; + } else { + return automationSnapshotBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Snapshot of the Automation taken at AutomationRun creation
+     * time.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation_snapshot = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAutomationSnapshot(com.google.cloud.deploy.v1.Automation value) { + if (automationSnapshotBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + automationSnapshot_ = value; + } else { + automationSnapshotBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the Automation taken at AutomationRun creation
+     * time.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation_snapshot = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAutomationSnapshot( + com.google.cloud.deploy.v1.Automation.Builder builderForValue) { + if (automationSnapshotBuilder_ == null) { + automationSnapshot_ = builderForValue.build(); + } else { + automationSnapshotBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the Automation taken at AutomationRun creation
+     * time.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation_snapshot = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAutomationSnapshot(com.google.cloud.deploy.v1.Automation value) { + if (automationSnapshotBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && automationSnapshot_ != null + && automationSnapshot_ != com.google.cloud.deploy.v1.Automation.getDefaultInstance()) { + getAutomationSnapshotBuilder().mergeFrom(value); + } else { + automationSnapshot_ = value; + } + } else { + automationSnapshotBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the Automation taken at AutomationRun creation
+     * time.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation_snapshot = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAutomationSnapshot() { + bitField0_ = (bitField0_ & ~0x00000020); + automationSnapshot_ = null; + if (automationSnapshotBuilder_ != null) { + automationSnapshotBuilder_.dispose(); + automationSnapshotBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the Automation taken at AutomationRun creation
+     * time.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation_snapshot = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.Automation.Builder getAutomationSnapshotBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getAutomationSnapshotFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Snapshot of the Automation taken at AutomationRun creation
+     * time.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation_snapshot = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.AutomationOrBuilder getAutomationSnapshotOrBuilder() { + if (automationSnapshotBuilder_ != null) { + return automationSnapshotBuilder_.getMessageOrBuilder(); + } else { + return automationSnapshot_ == null + ? com.google.cloud.deploy.v1.Automation.getDefaultInstance() + : automationSnapshot_; + } + } + /** + * + * + *
+     * Output only. Snapshot of the Automation taken at AutomationRun creation
+     * time.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation_snapshot = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Automation, + com.google.cloud.deploy.v1.Automation.Builder, + com.google.cloud.deploy.v1.AutomationOrBuilder> + getAutomationSnapshotFieldBuilder() { + if (automationSnapshotBuilder_ == null) { + automationSnapshotBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Automation, + com.google.cloud.deploy.v1.Automation.Builder, + com.google.cloud.deploy.v1.AutomationOrBuilder>( + getAutomationSnapshot(), getParentForChildren(), isClean()); + automationSnapshot_ = null; + } + return automationSnapshotBuilder_; + } + + private java.lang.Object targetId_ = ""; + /** + * + * + *
+     * Output only. The ID of the target that represents the promotion stage that
+     * initiates the `AutomationRun`. The value of this field is the last segment
+     * of a target name.
+     * 
+ * + * string target_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The ID of the target that represents the promotion stage that
+     * initiates the `AutomationRun`. The value of this field is the last segment
+     * of a target name.
+     * 
+ * + * string target_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The ID of the target that represents the promotion stage that
+     * initiates the `AutomationRun`. The value of this field is the last segment
+     * of a target name.
+     * 
+ * + * string target_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ID of the target that represents the promotion stage that
+     * initiates the `AutomationRun`. The value of this field is the last segment
+     * of a target name.
+     * 
+ * + * string target_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTargetId() { + targetId_ = getDefaultInstance().getTargetId(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ID of the target that represents the promotion stage that
+     * initiates the `AutomationRun`. The value of this field is the last segment
+     * of a target name.
+     * 
+ * + * string target_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. Current state of the `AutomationRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRun.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. Current state of the `AutomationRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRun.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; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current state of the `AutomationRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRun.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRun.State getState() { + com.google.cloud.deploy.v1.AutomationRun.State result = + com.google.cloud.deploy.v1.AutomationRun.State.forNumber(state_); + return result == null ? com.google.cloud.deploy.v1.AutomationRun.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Current state of the `AutomationRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRun.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.AutomationRun.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current state of the `AutomationRun`.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRun.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000080); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object stateDescription_ = ""; + /** + * + * + *
+     * Output only. Explains the current state of the `AutomationRun`. Present
+     * only an explanation is needed.
+     * 
+ * + * string state_description = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateDescription. + */ + public java.lang.String getStateDescription() { + java.lang.Object ref = stateDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Explains the current state of the `AutomationRun`. Present
+     * only an explanation is needed.
+     * 
+ * + * string state_description = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateDescription. + */ + public com.google.protobuf.ByteString getStateDescriptionBytes() { + java.lang.Object ref = stateDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stateDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Explains the current state of the `AutomationRun`. Present
+     * only an explanation is needed.
+     * 
+ * + * string state_description = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The stateDescription to set. + * @return This builder for chaining. + */ + public Builder setStateDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + stateDescription_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Explains the current state of the `AutomationRun`. Present
+     * only an explanation is needed.
+     * 
+ * + * string state_description = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStateDescription() { + stateDescription_ = getDefaultInstance().getStateDescription(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Explains the current state of the `AutomationRun`. Present
+     * only an explanation is needed.
+     * 
+ * + * string state_description = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for stateDescription to set. + * @return This builder for chaining. + */ + public Builder setStateDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + stateDescription_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp expireTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expireTimeBuilder_; + /** + * + * + *
+     * Output only. Time the `AutomationRun` will expire. An `AutomationRun` will
+     * expire after 14 days from its creation date.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + public boolean hasExpireTime() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Output only. Time the `AutomationRun` will expire. An `AutomationRun` will
+     * expire after 14 days from its creation date.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + public com.google.protobuf.Timestamp getExpireTime() { + if (expireTimeBuilder_ == null) { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } else { + return expireTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time the `AutomationRun` will expire. An `AutomationRun` will
+     * expire after 14 days from its creation date.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expireTime_ = value; + } else { + expireTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the `AutomationRun` will expire. An `AutomationRun` will
+     * expire after 14 days from its creation date.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expireTimeBuilder_ == null) { + expireTime_ = builderForValue.build(); + } else { + expireTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the `AutomationRun` will expire. An `AutomationRun` will
+     * expire after 14 days from its creation date.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && expireTime_ != null + && expireTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExpireTimeBuilder().mergeFrom(value); + } else { + expireTime_ = value; + } + } else { + expireTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the `AutomationRun` will expire. An `AutomationRun` will
+     * expire after 14 days from its creation date.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExpireTime() { + bitField0_ = (bitField0_ & ~0x00000200); + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time the `AutomationRun` will expire. An `AutomationRun` will
+     * expire after 14 days from its creation date.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getExpireTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time the `AutomationRun` will expire. An `AutomationRun` will
+     * expire after 14 days from its creation date.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + if (expireTimeBuilder_ != null) { + return expireTimeBuilder_.getMessageOrBuilder(); + } else { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } + } + /** + * + * + *
+     * Output only. Time the `AutomationRun` will expire. An `AutomationRun` will
+     * expire after 14 days from its creation date.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpireTimeFieldBuilder() { + if (expireTimeBuilder_ == null) { + expireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpireTime(), getParentForChildren(), isClean()); + expireTime_ = null; + } + return expireTimeBuilder_; + } + + private java.lang.Object ruleId_ = ""; + /** + * + * + *
+     * Output only. The ID of the automation rule that initiated the operation.
+     * 
+ * + * string rule_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The ruleId. + */ + public java.lang.String getRuleId() { + java.lang.Object ref = ruleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ruleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The ID of the automation rule that initiated the operation.
+     * 
+ * + * string rule_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for ruleId. + */ + public com.google.protobuf.ByteString getRuleIdBytes() { + java.lang.Object ref = ruleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ruleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The ID of the automation rule that initiated the operation.
+     * 
+ * + * string rule_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The ruleId to set. + * @return This builder for chaining. + */ + public Builder setRuleId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ruleId_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ID of the automation rule that initiated the operation.
+     * 
+ * + * string rule_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRuleId() { + ruleId_ = getDefaultInstance().getRuleId(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ID of the automation rule that initiated the operation.
+     * 
+ * + * string rule_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for ruleId to set. + * @return This builder for chaining. + */ + public Builder setRuleIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ruleId_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private java.lang.Object automationId_ = ""; + /** + * + * + *
+     * Output only. The ID of the automation that initiated the operation.
+     * 
+ * + * string automation_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The automationId. + */ + public java.lang.String getAutomationId() { + java.lang.Object ref = automationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + automationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The ID of the automation that initiated the operation.
+     * 
+ * + * string automation_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for automationId. + */ + public com.google.protobuf.ByteString getAutomationIdBytes() { + java.lang.Object ref = automationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + automationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The ID of the automation that initiated the operation.
+     * 
+ * + * string automation_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The automationId to set. + * @return This builder for chaining. + */ + public Builder setAutomationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + automationId_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ID of the automation that initiated the operation.
+     * 
+ * + * string automation_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAutomationId() { + automationId_ = getDefaultInstance().getAutomationId(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ID of the automation that initiated the operation.
+     * 
+ * + * string automation_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for automationId to set. + * @return This builder for chaining. + */ + public Builder setAutomationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + automationId_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.PromoteReleaseOperation, + com.google.cloud.deploy.v1.PromoteReleaseOperation.Builder, + com.google.cloud.deploy.v1.PromoteReleaseOperationOrBuilder> + promoteReleaseOperationBuilder_; + /** + * + * + *
+     * Output only. Promotes a release to a specified 'Target'.
+     * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseOperation promote_release_operation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the promoteReleaseOperation field is set. + */ + @java.lang.Override + public boolean hasPromoteReleaseOperation() { + return operationCase_ == 13; + } + /** + * + * + *
+     * Output only. Promotes a release to a specified 'Target'.
+     * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseOperation promote_release_operation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The promoteReleaseOperation. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.PromoteReleaseOperation getPromoteReleaseOperation() { + if (promoteReleaseOperationBuilder_ == null) { + if (operationCase_ == 13) { + return (com.google.cloud.deploy.v1.PromoteReleaseOperation) operation_; + } + return com.google.cloud.deploy.v1.PromoteReleaseOperation.getDefaultInstance(); + } else { + if (operationCase_ == 13) { + return promoteReleaseOperationBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.PromoteReleaseOperation.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Promotes a release to a specified 'Target'.
+     * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseOperation promote_release_operation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPromoteReleaseOperation( + com.google.cloud.deploy.v1.PromoteReleaseOperation value) { + if (promoteReleaseOperationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operation_ = value; + onChanged(); + } else { + promoteReleaseOperationBuilder_.setMessage(value); + } + operationCase_ = 13; + return this; + } + /** + * + * + *
+     * Output only. Promotes a release to a specified 'Target'.
+     * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseOperation promote_release_operation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPromoteReleaseOperation( + com.google.cloud.deploy.v1.PromoteReleaseOperation.Builder builderForValue) { + if (promoteReleaseOperationBuilder_ == null) { + operation_ = builderForValue.build(); + onChanged(); + } else { + promoteReleaseOperationBuilder_.setMessage(builderForValue.build()); + } + operationCase_ = 13; + return this; + } + /** + * + * + *
+     * Output only. Promotes a release to a specified 'Target'.
+     * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseOperation promote_release_operation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergePromoteReleaseOperation( + com.google.cloud.deploy.v1.PromoteReleaseOperation value) { + if (promoteReleaseOperationBuilder_ == null) { + if (operationCase_ == 13 + && operation_ + != com.google.cloud.deploy.v1.PromoteReleaseOperation.getDefaultInstance()) { + operation_ = + com.google.cloud.deploy.v1.PromoteReleaseOperation.newBuilder( + (com.google.cloud.deploy.v1.PromoteReleaseOperation) operation_) + .mergeFrom(value) + .buildPartial(); + } else { + operation_ = value; + } + onChanged(); + } else { + if (operationCase_ == 13) { + promoteReleaseOperationBuilder_.mergeFrom(value); + } else { + promoteReleaseOperationBuilder_.setMessage(value); + } + } + operationCase_ = 13; + return this; + } + /** + * + * + *
+     * Output only. Promotes a release to a specified 'Target'.
+     * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseOperation promote_release_operation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPromoteReleaseOperation() { + if (promoteReleaseOperationBuilder_ == null) { + if (operationCase_ == 13) { + operationCase_ = 0; + operation_ = null; + onChanged(); + } + } else { + if (operationCase_ == 13) { + operationCase_ = 0; + operation_ = null; + } + promoteReleaseOperationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Promotes a release to a specified 'Target'.
+     * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseOperation promote_release_operation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.PromoteReleaseOperation.Builder + getPromoteReleaseOperationBuilder() { + return getPromoteReleaseOperationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Promotes a release to a specified 'Target'.
+     * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseOperation promote_release_operation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.PromoteReleaseOperationOrBuilder + getPromoteReleaseOperationOrBuilder() { + if ((operationCase_ == 13) && (promoteReleaseOperationBuilder_ != null)) { + return promoteReleaseOperationBuilder_.getMessageOrBuilder(); + } else { + if (operationCase_ == 13) { + return (com.google.cloud.deploy.v1.PromoteReleaseOperation) operation_; + } + return com.google.cloud.deploy.v1.PromoteReleaseOperation.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Promotes a release to a specified 'Target'.
+     * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseOperation promote_release_operation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.PromoteReleaseOperation, + com.google.cloud.deploy.v1.PromoteReleaseOperation.Builder, + com.google.cloud.deploy.v1.PromoteReleaseOperationOrBuilder> + getPromoteReleaseOperationFieldBuilder() { + if (promoteReleaseOperationBuilder_ == null) { + if (!(operationCase_ == 13)) { + operation_ = com.google.cloud.deploy.v1.PromoteReleaseOperation.getDefaultInstance(); + } + promoteReleaseOperationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.PromoteReleaseOperation, + com.google.cloud.deploy.v1.PromoteReleaseOperation.Builder, + com.google.cloud.deploy.v1.PromoteReleaseOperationOrBuilder>( + (com.google.cloud.deploy.v1.PromoteReleaseOperation) operation_, + getParentForChildren(), + isClean()); + operation_ = null; + } + operationCase_ = 13; + onChanged(); + return promoteReleaseOperationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AdvanceRolloutOperation, + com.google.cloud.deploy.v1.AdvanceRolloutOperation.Builder, + com.google.cloud.deploy.v1.AdvanceRolloutOperationOrBuilder> + advanceRolloutOperationBuilder_; + /** + * + * + *
+     * Output only. Advances a rollout to the next phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutOperation advance_rollout_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the advanceRolloutOperation field is set. + */ + @java.lang.Override + public boolean hasAdvanceRolloutOperation() { + return operationCase_ == 14; + } + /** + * + * + *
+     * Output only. Advances a rollout to the next phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutOperation advance_rollout_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The advanceRolloutOperation. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AdvanceRolloutOperation getAdvanceRolloutOperation() { + if (advanceRolloutOperationBuilder_ == null) { + if (operationCase_ == 14) { + return (com.google.cloud.deploy.v1.AdvanceRolloutOperation) operation_; + } + return com.google.cloud.deploy.v1.AdvanceRolloutOperation.getDefaultInstance(); + } else { + if (operationCase_ == 14) { + return advanceRolloutOperationBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.AdvanceRolloutOperation.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Advances a rollout to the next phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutOperation advance_rollout_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAdvanceRolloutOperation( + com.google.cloud.deploy.v1.AdvanceRolloutOperation value) { + if (advanceRolloutOperationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operation_ = value; + onChanged(); + } else { + advanceRolloutOperationBuilder_.setMessage(value); + } + operationCase_ = 14; + return this; + } + /** + * + * + *
+     * Output only. Advances a rollout to the next phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutOperation advance_rollout_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAdvanceRolloutOperation( + com.google.cloud.deploy.v1.AdvanceRolloutOperation.Builder builderForValue) { + if (advanceRolloutOperationBuilder_ == null) { + operation_ = builderForValue.build(); + onChanged(); + } else { + advanceRolloutOperationBuilder_.setMessage(builderForValue.build()); + } + operationCase_ = 14; + return this; + } + /** + * + * + *
+     * Output only. Advances a rollout to the next phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutOperation advance_rollout_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAdvanceRolloutOperation( + com.google.cloud.deploy.v1.AdvanceRolloutOperation value) { + if (advanceRolloutOperationBuilder_ == null) { + if (operationCase_ == 14 + && operation_ + != com.google.cloud.deploy.v1.AdvanceRolloutOperation.getDefaultInstance()) { + operation_ = + com.google.cloud.deploy.v1.AdvanceRolloutOperation.newBuilder( + (com.google.cloud.deploy.v1.AdvanceRolloutOperation) operation_) + .mergeFrom(value) + .buildPartial(); + } else { + operation_ = value; + } + onChanged(); + } else { + if (operationCase_ == 14) { + advanceRolloutOperationBuilder_.mergeFrom(value); + } else { + advanceRolloutOperationBuilder_.setMessage(value); + } + } + operationCase_ = 14; + return this; + } + /** + * + * + *
+     * Output only. Advances a rollout to the next phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutOperation advance_rollout_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAdvanceRolloutOperation() { + if (advanceRolloutOperationBuilder_ == null) { + if (operationCase_ == 14) { + operationCase_ = 0; + operation_ = null; + onChanged(); + } + } else { + if (operationCase_ == 14) { + operationCase_ = 0; + operation_ = null; + } + advanceRolloutOperationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Advances a rollout to the next phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutOperation advance_rollout_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.AdvanceRolloutOperation.Builder + getAdvanceRolloutOperationBuilder() { + return getAdvanceRolloutOperationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Advances a rollout to the next phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutOperation advance_rollout_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AdvanceRolloutOperationOrBuilder + getAdvanceRolloutOperationOrBuilder() { + if ((operationCase_ == 14) && (advanceRolloutOperationBuilder_ != null)) { + return advanceRolloutOperationBuilder_.getMessageOrBuilder(); + } else { + if (operationCase_ == 14) { + return (com.google.cloud.deploy.v1.AdvanceRolloutOperation) operation_; + } + return com.google.cloud.deploy.v1.AdvanceRolloutOperation.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Advances a rollout to the next phase.
+     * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutOperation advance_rollout_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AdvanceRolloutOperation, + com.google.cloud.deploy.v1.AdvanceRolloutOperation.Builder, + com.google.cloud.deploy.v1.AdvanceRolloutOperationOrBuilder> + getAdvanceRolloutOperationFieldBuilder() { + if (advanceRolloutOperationBuilder_ == null) { + if (!(operationCase_ == 14)) { + operation_ = com.google.cloud.deploy.v1.AdvanceRolloutOperation.getDefaultInstance(); + } + advanceRolloutOperationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AdvanceRolloutOperation, + com.google.cloud.deploy.v1.AdvanceRolloutOperation.Builder, + com.google.cloud.deploy.v1.AdvanceRolloutOperationOrBuilder>( + (com.google.cloud.deploy.v1.AdvanceRolloutOperation) operation_, + getParentForChildren(), + isClean()); + operation_ = null; + } + operationCase_ = 14; + onChanged(); + return advanceRolloutOperationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.RepairRolloutOperation, + com.google.cloud.deploy.v1.RepairRolloutOperation.Builder, + com.google.cloud.deploy.v1.RepairRolloutOperationOrBuilder> + repairRolloutOperationBuilder_; + /** + * + * + *
+     * Output only. Repairs a failed 'Rollout'.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutOperation repair_rollout_operation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the repairRolloutOperation field is set. + */ + @java.lang.Override + public boolean hasRepairRolloutOperation() { + return operationCase_ == 17; + } + /** + * + * + *
+     * Output only. Repairs a failed 'Rollout'.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutOperation repair_rollout_operation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The repairRolloutOperation. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RepairRolloutOperation getRepairRolloutOperation() { + if (repairRolloutOperationBuilder_ == null) { + if (operationCase_ == 17) { + return (com.google.cloud.deploy.v1.RepairRolloutOperation) operation_; + } + return com.google.cloud.deploy.v1.RepairRolloutOperation.getDefaultInstance(); + } else { + if (operationCase_ == 17) { + return repairRolloutOperationBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.RepairRolloutOperation.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Repairs a failed 'Rollout'.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutOperation repair_rollout_operation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRepairRolloutOperation( + com.google.cloud.deploy.v1.RepairRolloutOperation value) { + if (repairRolloutOperationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operation_ = value; + onChanged(); + } else { + repairRolloutOperationBuilder_.setMessage(value); + } + operationCase_ = 17; + return this; + } + /** + * + * + *
+     * Output only. Repairs a failed 'Rollout'.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutOperation repair_rollout_operation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRepairRolloutOperation( + com.google.cloud.deploy.v1.RepairRolloutOperation.Builder builderForValue) { + if (repairRolloutOperationBuilder_ == null) { + operation_ = builderForValue.build(); + onChanged(); + } else { + repairRolloutOperationBuilder_.setMessage(builderForValue.build()); + } + operationCase_ = 17; + return this; + } + /** + * + * + *
+     * Output only. Repairs a failed 'Rollout'.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutOperation repair_rollout_operation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeRepairRolloutOperation( + com.google.cloud.deploy.v1.RepairRolloutOperation value) { + if (repairRolloutOperationBuilder_ == null) { + if (operationCase_ == 17 + && operation_ + != com.google.cloud.deploy.v1.RepairRolloutOperation.getDefaultInstance()) { + operation_ = + com.google.cloud.deploy.v1.RepairRolloutOperation.newBuilder( + (com.google.cloud.deploy.v1.RepairRolloutOperation) operation_) + .mergeFrom(value) + .buildPartial(); + } else { + operation_ = value; + } + onChanged(); + } else { + if (operationCase_ == 17) { + repairRolloutOperationBuilder_.mergeFrom(value); + } else { + repairRolloutOperationBuilder_.setMessage(value); + } + } + operationCase_ = 17; + return this; + } + /** + * + * + *
+     * Output only. Repairs a failed 'Rollout'.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutOperation repair_rollout_operation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRepairRolloutOperation() { + if (repairRolloutOperationBuilder_ == null) { + if (operationCase_ == 17) { + operationCase_ = 0; + operation_ = null; + onChanged(); + } + } else { + if (operationCase_ == 17) { + operationCase_ = 0; + operation_ = null; + } + repairRolloutOperationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Repairs a failed 'Rollout'.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutOperation repair_rollout_operation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.RepairRolloutOperation.Builder + getRepairRolloutOperationBuilder() { + return getRepairRolloutOperationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Repairs a failed 'Rollout'.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutOperation repair_rollout_operation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RepairRolloutOperationOrBuilder + getRepairRolloutOperationOrBuilder() { + if ((operationCase_ == 17) && (repairRolloutOperationBuilder_ != null)) { + return repairRolloutOperationBuilder_.getMessageOrBuilder(); + } else { + if (operationCase_ == 17) { + return (com.google.cloud.deploy.v1.RepairRolloutOperation) operation_; + } + return com.google.cloud.deploy.v1.RepairRolloutOperation.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Repairs a failed 'Rollout'.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutOperation repair_rollout_operation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.RepairRolloutOperation, + com.google.cloud.deploy.v1.RepairRolloutOperation.Builder, + com.google.cloud.deploy.v1.RepairRolloutOperationOrBuilder> + getRepairRolloutOperationFieldBuilder() { + if (repairRolloutOperationBuilder_ == null) { + if (!(operationCase_ == 17)) { + operation_ = com.google.cloud.deploy.v1.RepairRolloutOperation.getDefaultInstance(); + } + repairRolloutOperationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.RepairRolloutOperation, + com.google.cloud.deploy.v1.RepairRolloutOperation.Builder, + com.google.cloud.deploy.v1.RepairRolloutOperationOrBuilder>( + (com.google.cloud.deploy.v1.RepairRolloutOperation) operation_, + getParentForChildren(), + isClean()); + operation_ = null; + } + operationCase_ = 17; + onChanged(); + return repairRolloutOperationBuilder_; + } + + private com.google.protobuf.Timestamp waitUntilTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + waitUntilTimeBuilder_; + /** + * + * + *
+     * Output only. Earliest time the `AutomationRun` will attempt to resume.
+     * Wait-time is configured by `wait` in automation rule.
+     * 
+ * + * + * .google.protobuf.Timestamp wait_until_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the waitUntilTime field is set. + */ + public boolean hasWaitUntilTime() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * + * + *
+     * Output only. Earliest time the `AutomationRun` will attempt to resume.
+     * Wait-time is configured by `wait` in automation rule.
+     * 
+ * + * + * .google.protobuf.Timestamp wait_until_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The waitUntilTime. + */ + public com.google.protobuf.Timestamp getWaitUntilTime() { + if (waitUntilTimeBuilder_ == null) { + return waitUntilTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : waitUntilTime_; + } else { + return waitUntilTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Earliest time the `AutomationRun` will attempt to resume.
+     * Wait-time is configured by `wait` in automation rule.
+     * 
+ * + * + * .google.protobuf.Timestamp wait_until_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setWaitUntilTime(com.google.protobuf.Timestamp value) { + if (waitUntilTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + waitUntilTime_ = value; + } else { + waitUntilTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Earliest time the `AutomationRun` will attempt to resume.
+     * Wait-time is configured by `wait` in automation rule.
+     * 
+ * + * + * .google.protobuf.Timestamp wait_until_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setWaitUntilTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (waitUntilTimeBuilder_ == null) { + waitUntilTime_ = builderForValue.build(); + } else { + waitUntilTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Earliest time the `AutomationRun` will attempt to resume.
+     * Wait-time is configured by `wait` in automation rule.
+     * 
+ * + * + * .google.protobuf.Timestamp wait_until_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeWaitUntilTime(com.google.protobuf.Timestamp value) { + if (waitUntilTimeBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && waitUntilTime_ != null + && waitUntilTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getWaitUntilTimeBuilder().mergeFrom(value); + } else { + waitUntilTime_ = value; + } + } else { + waitUntilTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Earliest time the `AutomationRun` will attempt to resume.
+     * Wait-time is configured by `wait` in automation rule.
+     * 
+ * + * + * .google.protobuf.Timestamp wait_until_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearWaitUntilTime() { + bitField0_ = (bitField0_ & ~0x00008000); + waitUntilTime_ = null; + if (waitUntilTimeBuilder_ != null) { + waitUntilTimeBuilder_.dispose(); + waitUntilTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Earliest time the `AutomationRun` will attempt to resume.
+     * Wait-time is configured by `wait` in automation rule.
+     * 
+ * + * + * .google.protobuf.Timestamp wait_until_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getWaitUntilTimeBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getWaitUntilTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Earliest time the `AutomationRun` will attempt to resume.
+     * Wait-time is configured by `wait` in automation rule.
+     * 
+ * + * + * .google.protobuf.Timestamp wait_until_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getWaitUntilTimeOrBuilder() { + if (waitUntilTimeBuilder_ != null) { + return waitUntilTimeBuilder_.getMessageOrBuilder(); + } else { + return waitUntilTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : waitUntilTime_; + } + } + /** + * + * + *
+     * Output only. Earliest time the `AutomationRun` will attempt to resume.
+     * Wait-time is configured by `wait` in automation rule.
+     * 
+ * + * + * .google.protobuf.Timestamp wait_until_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getWaitUntilTimeFieldBuilder() { + if (waitUntilTimeBuilder_ == null) { + waitUntilTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getWaitUntilTime(), getParentForChildren(), isClean()); + waitUntilTime_ = null; + } + return waitUntilTimeBuilder_; + } + + @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.AutomationRun) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.AutomationRun) + private static final com.google.cloud.deploy.v1.AutomationRun DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.AutomationRun(); + } + + public static com.google.cloud.deploy.v1.AutomationRun getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutomationRun 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.AutomationRun getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRunEvent.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRunEvent.java new file mode 100644 index 000000000000..cf3cad98b239 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRunEvent.java @@ -0,0 +1,1688 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/automationrun_payload.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Payload proto for "clouddeploy.googleapis.com/automation_run"
+ * Platform Log event that describes the AutomationRun related events.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AutomationRunEvent} + */ +public final class AutomationRunEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.AutomationRunEvent) + AutomationRunEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use AutomationRunEvent.newBuilder() to construct. + private AutomationRunEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AutomationRunEvent() { + message_ = ""; + automationRun_ = ""; + pipelineUid_ = ""; + automationId_ = ""; + ruleId_ = ""; + destinationTargetId_ = ""; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AutomationRunEvent(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.AutomationRunPayloadProto + .internal_static_google_cloud_deploy_v1_AutomationRunEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.AutomationRunPayloadProto + .internal_static_google_cloud_deploy_v1_AutomationRunEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AutomationRunEvent.class, + com.google.cloud.deploy.v1.AutomationRunEvent.Builder.class); + } + + public static final int MESSAGE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; + /** + * + * + *
+   * Debug message for when there is an update on the AutomationRun.
+   * Provides further details about the resource creation or state change.
+   * 
+ * + * 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 there is an update on the AutomationRun.
+   * Provides further details about the resource creation or state change.
+   * 
+ * + * 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 AUTOMATION_RUN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object automationRun_ = ""; + /** + * + * + *
+   * The name of the `AutomationRun`.
+   * 
+ * + * string automation_run = 2; + * + * @return The automationRun. + */ + @java.lang.Override + public java.lang.String getAutomationRun() { + java.lang.Object ref = automationRun_; + 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(); + automationRun_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the `AutomationRun`.
+   * 
+ * + * string automation_run = 2; + * + * @return The bytes for automationRun. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAutomationRunBytes() { + java.lang.Object ref = automationRun_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + automationRun_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PIPELINE_UID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + 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 AUTOMATION_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object automationId_ = ""; + /** + * + * + *
+   * Identifier of the `Automation`.
+   * 
+ * + * string automation_id = 4; + * + * @return The automationId. + */ + @java.lang.Override + public java.lang.String getAutomationId() { + java.lang.Object ref = automationId_; + 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(); + automationId_ = s; + return s; + } + } + /** + * + * + *
+   * Identifier of the `Automation`.
+   * 
+ * + * string automation_id = 4; + * + * @return The bytes for automationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAutomationIdBytes() { + java.lang.Object ref = automationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + automationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RULE_ID_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object ruleId_ = ""; + /** + * + * + *
+   * Identifier of the `Automation` rule.
+   * 
+ * + * string rule_id = 5; + * + * @return The ruleId. + */ + @java.lang.Override + public java.lang.String getRuleId() { + java.lang.Object ref = ruleId_; + 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(); + ruleId_ = s; + return s; + } + } + /** + * + * + *
+   * Identifier of the `Automation` rule.
+   * 
+ * + * string rule_id = 5; + * + * @return The bytes for ruleId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuleIdBytes() { + java.lang.Object ref = ruleId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ruleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_TARGET_ID_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object destinationTargetId_ = ""; + /** + * + * + *
+   * ID of the `Target` to which the `AutomationRun` is created.
+   * 
+ * + * string destination_target_id = 6; + * + * @return The destinationTargetId. + */ + @java.lang.Override + public java.lang.String getDestinationTargetId() { + java.lang.Object ref = destinationTargetId_; + 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(); + destinationTargetId_ = s; + return s; + } + } + /** + * + * + *
+   * ID of the `Target` to which the `AutomationRun` is created.
+   * 
+ * + * string destination_target_id = 6; + * + * @return The bytes for destinationTargetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationTargetIdBytes() { + java.lang.Object ref = destinationTargetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationTargetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 7; + 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; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Type getType() { + com.google.cloud.deploy.v1.Type result = com.google.cloud.deploy.v1.Type.forNumber(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(automationRun_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, automationRun_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pipelineUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pipelineUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(automationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, automationId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ruleId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, ruleId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationTargetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, destinationTargetId_); + } + 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(automationRun_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, automationRun_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pipelineUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pipelineUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(automationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, automationId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ruleId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, ruleId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationTargetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, destinationTargetId_); + } + 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.AutomationRunEvent)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.AutomationRunEvent other = + (com.google.cloud.deploy.v1.AutomationRunEvent) obj; + + if (!getMessage().equals(other.getMessage())) return false; + if (!getAutomationRun().equals(other.getAutomationRun())) return false; + if (!getPipelineUid().equals(other.getPipelineUid())) return false; + if (!getAutomationId().equals(other.getAutomationId())) return false; + if (!getRuleId().equals(other.getRuleId())) return false; + if (!getDestinationTargetId().equals(other.getDestinationTargetId())) 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) + AUTOMATION_RUN_FIELD_NUMBER; + hash = (53 * hash) + getAutomationRun().hashCode(); + hash = (37 * hash) + PIPELINE_UID_FIELD_NUMBER; + hash = (53 * hash) + getPipelineUid().hashCode(); + hash = (37 * hash) + AUTOMATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getAutomationId().hashCode(); + hash = (37 * hash) + RULE_ID_FIELD_NUMBER; + hash = (53 * hash) + getRuleId().hashCode(); + hash = (37 * hash) + DESTINATION_TARGET_ID_FIELD_NUMBER; + hash = (53 * hash) + getDestinationTargetId().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.AutomationRunEvent parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationRunEvent 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.AutomationRunEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationRunEvent 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.AutomationRunEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.AutomationRunEvent 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.AutomationRunEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AutomationRunEvent 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.AutomationRunEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.AutomationRunEvent 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.AutomationRunEvent 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.AutomationRunEvent 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.AutomationRunEvent 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/automation_run"
+   * Platform Log event that describes the AutomationRun related events.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.AutomationRunEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.AutomationRunEvent) + com.google.cloud.deploy.v1.AutomationRunEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.AutomationRunPayloadProto + .internal_static_google_cloud_deploy_v1_AutomationRunEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.AutomationRunPayloadProto + .internal_static_google_cloud_deploy_v1_AutomationRunEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.AutomationRunEvent.class, + com.google.cloud.deploy.v1.AutomationRunEvent.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.AutomationRunEvent.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + message_ = ""; + automationRun_ = ""; + pipelineUid_ = ""; + automationId_ = ""; + ruleId_ = ""; + destinationTargetId_ = ""; + type_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.AutomationRunPayloadProto + .internal_static_google_cloud_deploy_v1_AutomationRunEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRunEvent getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.AutomationRunEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRunEvent build() { + com.google.cloud.deploy.v1.AutomationRunEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRunEvent buildPartial() { + com.google.cloud.deploy.v1.AutomationRunEvent result = + new com.google.cloud.deploy.v1.AutomationRunEvent(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.AutomationRunEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.message_ = message_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.automationRun_ = automationRun_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pipelineUid_ = pipelineUid_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.automationId_ = automationId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.ruleId_ = ruleId_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.destinationTargetId_ = destinationTargetId_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.type_ = type_; + } + } + + @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.AutomationRunEvent) { + return mergeFrom((com.google.cloud.deploy.v1.AutomationRunEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.AutomationRunEvent other) { + if (other == com.google.cloud.deploy.v1.AutomationRunEvent.getDefaultInstance()) return this; + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAutomationRun().isEmpty()) { + automationRun_ = other.automationRun_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPipelineUid().isEmpty()) { + pipelineUid_ = other.pipelineUid_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getAutomationId().isEmpty()) { + automationId_ = other.automationId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getRuleId().isEmpty()) { + ruleId_ = other.ruleId_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDestinationTargetId().isEmpty()) { + destinationTargetId_ = other.destinationTargetId_; + bitField0_ |= 0x00000020; + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + automationRun_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + pipelineUid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + automationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + ruleId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + destinationTargetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000040; + 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 int bitField0_; + + private java.lang.Object message_ = ""; + /** + * + * + *
+     * Debug message for when there is an update on the AutomationRun.
+     * Provides further details about the resource creation or state change.
+     * 
+ * + * 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 there is an update on the AutomationRun.
+     * Provides further details about the resource creation or state change.
+     * 
+ * + * 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 there is an update on the AutomationRun.
+     * Provides further details about the resource creation or state change.
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Debug message for when there is an update on the AutomationRun.
+     * Provides further details about the resource creation or state change.
+     * 
+ * + * string message = 1; + * + * @return This builder for chaining. + */ + public Builder clearMessage() { + message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Debug message for when there is an update on the AutomationRun.
+     * Provides further details about the resource creation or state change.
+     * 
+ * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object automationRun_ = ""; + /** + * + * + *
+     * The name of the `AutomationRun`.
+     * 
+ * + * string automation_run = 2; + * + * @return The automationRun. + */ + public java.lang.String getAutomationRun() { + java.lang.Object ref = automationRun_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + automationRun_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the `AutomationRun`.
+     * 
+ * + * string automation_run = 2; + * + * @return The bytes for automationRun. + */ + public com.google.protobuf.ByteString getAutomationRunBytes() { + java.lang.Object ref = automationRun_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + automationRun_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the `AutomationRun`.
+     * 
+ * + * string automation_run = 2; + * + * @param value The automationRun to set. + * @return This builder for chaining. + */ + public Builder setAutomationRun(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + automationRun_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the `AutomationRun`.
+     * 
+ * + * string automation_run = 2; + * + * @return This builder for chaining. + */ + public Builder clearAutomationRun() { + automationRun_ = getDefaultInstance().getAutomationRun(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the `AutomationRun`.
+     * 
+ * + * string automation_run = 2; + * + * @param value The bytes for automationRun to set. + * @return This builder for chaining. + */ + public Builder setAutomationRunBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + automationRun_ = value; + bitField0_ |= 0x00000002; + 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Unique identifier of the `DeliveryPipeline`.
+     * 
+ * + * string pipeline_uid = 3; + * + * @return This builder for chaining. + */ + public Builder clearPipelineUid() { + pipelineUid_ = getDefaultInstance().getPipelineUid(); + bitField0_ = (bitField0_ & ~0x00000004); + 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object automationId_ = ""; + /** + * + * + *
+     * Identifier of the `Automation`.
+     * 
+ * + * string automation_id = 4; + * + * @return The automationId. + */ + public java.lang.String getAutomationId() { + java.lang.Object ref = automationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + automationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Identifier of the `Automation`.
+     * 
+ * + * string automation_id = 4; + * + * @return The bytes for automationId. + */ + public com.google.protobuf.ByteString getAutomationIdBytes() { + java.lang.Object ref = automationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + automationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Identifier of the `Automation`.
+     * 
+ * + * string automation_id = 4; + * + * @param value The automationId to set. + * @return This builder for chaining. + */ + public Builder setAutomationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + automationId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Identifier of the `Automation`.
+     * 
+ * + * string automation_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearAutomationId() { + automationId_ = getDefaultInstance().getAutomationId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Identifier of the `Automation`.
+     * 
+ * + * string automation_id = 4; + * + * @param value The bytes for automationId to set. + * @return This builder for chaining. + */ + public Builder setAutomationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + automationId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object ruleId_ = ""; + /** + * + * + *
+     * Identifier of the `Automation` rule.
+     * 
+ * + * string rule_id = 5; + * + * @return The ruleId. + */ + public java.lang.String getRuleId() { + java.lang.Object ref = ruleId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ruleId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Identifier of the `Automation` rule.
+     * 
+ * + * string rule_id = 5; + * + * @return The bytes for ruleId. + */ + public com.google.protobuf.ByteString getRuleIdBytes() { + java.lang.Object ref = ruleId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ruleId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Identifier of the `Automation` rule.
+     * 
+ * + * string rule_id = 5; + * + * @param value The ruleId to set. + * @return This builder for chaining. + */ + public Builder setRuleId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ruleId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Identifier of the `Automation` rule.
+     * 
+ * + * string rule_id = 5; + * + * @return This builder for chaining. + */ + public Builder clearRuleId() { + ruleId_ = getDefaultInstance().getRuleId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Identifier of the `Automation` rule.
+     * 
+ * + * string rule_id = 5; + * + * @param value The bytes for ruleId to set. + * @return This builder for chaining. + */ + public Builder setRuleIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ruleId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object destinationTargetId_ = ""; + /** + * + * + *
+     * ID of the `Target` to which the `AutomationRun` is created.
+     * 
+ * + * string destination_target_id = 6; + * + * @return The destinationTargetId. + */ + public java.lang.String getDestinationTargetId() { + java.lang.Object ref = destinationTargetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationTargetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * ID of the `Target` to which the `AutomationRun` is created.
+     * 
+ * + * string destination_target_id = 6; + * + * @return The bytes for destinationTargetId. + */ + public com.google.protobuf.ByteString getDestinationTargetIdBytes() { + java.lang.Object ref = destinationTargetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationTargetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * ID of the `Target` to which the `AutomationRun` is created.
+     * 
+ * + * string destination_target_id = 6; + * + * @param value The destinationTargetId to set. + * @return This builder for chaining. + */ + public Builder setDestinationTargetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationTargetId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the `Target` to which the `AutomationRun` is created.
+     * 
+ * + * string destination_target_id = 6; + * + * @return This builder for chaining. + */ + public Builder clearDestinationTargetId() { + destinationTargetId_ = getDefaultInstance().getDestinationTargetId(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the `Target` to which the `AutomationRun` is created.
+     * 
+ * + * string destination_target_id = 6; + * + * @param value The bytes for destinationTargetId to set. + * @return This builder for chaining. + */ + public Builder setDestinationTargetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationTargetId_ = value; + bitField0_ |= 0x00000020; + 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; + bitField0_ |= 0x00000040; + 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() { + com.google.cloud.deploy.v1.Type result = com.google.cloud.deploy.v1.Type.forNumber(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(); + } + bitField0_ |= 0x00000040; + 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() { + bitField0_ = (bitField0_ & ~0x00000040); + 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.AutomationRunEvent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.AutomationRunEvent) + private static final com.google.cloud.deploy.v1.AutomationRunEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.AutomationRunEvent(); + } + + public static com.google.cloud.deploy.v1.AutomationRunEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AutomationRunEvent 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.AutomationRunEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRunEventOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRunEventOrBuilder.java new file mode 100644 index 000000000000..a2ceeee77acd --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRunEventOrBuilder.java @@ -0,0 +1,202 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/automationrun_payload.proto + +package com.google.cloud.deploy.v1; + +public interface AutomationRunEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.AutomationRunEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Debug message for when there is an update on the AutomationRun.
+   * Provides further details about the resource creation or state change.
+   * 
+ * + * string message = 1; + * + * @return The message. + */ + java.lang.String getMessage(); + /** + * + * + *
+   * Debug message for when there is an update on the AutomationRun.
+   * Provides further details about the resource creation or state change.
+   * 
+ * + * string message = 1; + * + * @return The bytes for message. + */ + com.google.protobuf.ByteString getMessageBytes(); + + /** + * + * + *
+   * The name of the `AutomationRun`.
+   * 
+ * + * string automation_run = 2; + * + * @return The automationRun. + */ + java.lang.String getAutomationRun(); + /** + * + * + *
+   * The name of the `AutomationRun`.
+   * 
+ * + * string automation_run = 2; + * + * @return The bytes for automationRun. + */ + com.google.protobuf.ByteString getAutomationRunBytes(); + + /** + * + * + *
+   * 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(); + + /** + * + * + *
+   * Identifier of the `Automation`.
+   * 
+ * + * string automation_id = 4; + * + * @return The automationId. + */ + java.lang.String getAutomationId(); + /** + * + * + *
+   * Identifier of the `Automation`.
+   * 
+ * + * string automation_id = 4; + * + * @return The bytes for automationId. + */ + com.google.protobuf.ByteString getAutomationIdBytes(); + + /** + * + * + *
+   * Identifier of the `Automation` rule.
+   * 
+ * + * string rule_id = 5; + * + * @return The ruleId. + */ + java.lang.String getRuleId(); + /** + * + * + *
+   * Identifier of the `Automation` rule.
+   * 
+ * + * string rule_id = 5; + * + * @return The bytes for ruleId. + */ + com.google.protobuf.ByteString getRuleIdBytes(); + + /** + * + * + *
+   * ID of the `Target` to which the `AutomationRun` is created.
+   * 
+ * + * string destination_target_id = 6; + * + * @return The destinationTargetId. + */ + java.lang.String getDestinationTargetId(); + /** + * + * + *
+   * ID of the `Target` to which the `AutomationRun` is created.
+   * 
+ * + * string destination_target_id = 6; + * + * @return The bytes for destinationTargetId. + */ + com.google.protobuf.ByteString getDestinationTargetIdBytes(); + + /** + * + * + *
+   * 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/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRunName.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRunName.java new file mode 100644 index 000000000000..bdeba828c301 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRunName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 AutomationRunName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DELIVERY_PIPELINE_AUTOMATION_RUN = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String deliveryPipeline; + private final String automationRun; + + @Deprecated + protected AutomationRunName() { + project = null; + location = null; + deliveryPipeline = null; + automationRun = null; + } + + private AutomationRunName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + deliveryPipeline = Preconditions.checkNotNull(builder.getDeliveryPipeline()); + automationRun = Preconditions.checkNotNull(builder.getAutomationRun()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeliveryPipeline() { + return deliveryPipeline; + } + + public String getAutomationRun() { + return automationRun; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AutomationRunName of( + String project, String location, String deliveryPipeline, String automationRun) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDeliveryPipeline(deliveryPipeline) + .setAutomationRun(automationRun) + .build(); + } + + public static String format( + String project, String location, String deliveryPipeline, String automationRun) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDeliveryPipeline(deliveryPipeline) + .setAutomationRun(automationRun) + .build() + .toString(); + } + + public static AutomationRunName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DELIVERY_PIPELINE_AUTOMATION_RUN.validatedMatch( + formattedString, "AutomationRunName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("delivery_pipeline"), + matchMap.get("automation_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 (AutomationRunName 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_AUTOMATION_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 (automationRun != null) { + fieldMapBuilder.put("automation_run", automationRun); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DELIVERY_PIPELINE_AUTOMATION_RUN.instantiate( + "project", + project, + "location", + location, + "delivery_pipeline", + deliveryPipeline, + "automation_run", + automationRun); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + AutomationRunName that = ((AutomationRunName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.deliveryPipeline, that.deliveryPipeline) + && Objects.equals(this.automationRun, that.automationRun); + } + 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(automationRun); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}. + */ + public static class Builder { + private String project; + private String location; + private String deliveryPipeline; + private String automationRun; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDeliveryPipeline() { + return deliveryPipeline; + } + + public String getAutomationRun() { + return automationRun; + } + + 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 setAutomationRun(String automationRun) { + this.automationRun = automationRun; + return this; + } + + private Builder(AutomationRunName automationRunName) { + this.project = automationRunName.project; + this.location = automationRunName.location; + this.deliveryPipeline = automationRunName.deliveryPipeline; + this.automationRun = automationRunName.automationRun; + } + + public AutomationRunName build() { + return new AutomationRunName(this); + } + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRunOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRunOrBuilder.java new file mode 100644 index 000000000000..9f7fb92b63ac --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRunOrBuilder.java @@ -0,0 +1,575 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 AutomationRunOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.AutomationRun) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Name of the `AutomationRun`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Name of the `AutomationRun`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Time at which the `AutomationRun` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time at which the `AutomationRun` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time at which the `AutomationRun` was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time at which the automationRun was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time at which the automationRun was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time at which the automationRun was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The weak etag of the `AutomationRun` resource.
+   * 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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Output only. The weak etag of the `AutomationRun` resource.
+   * 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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Output only. Email address of the user-managed IAM service account that
+   * performs the operations against Cloud Deploy resources.
+   * 
+ * + * string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * Output only. Email address of the user-managed IAM service account that
+   * performs the operations against Cloud Deploy resources.
+   * 
+ * + * string service_account = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * Output only. Snapshot of the Automation taken at AutomationRun creation
+   * time.
+   * 
+ * + * + * .google.cloud.deploy.v1.Automation automation_snapshot = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the automationSnapshot field is set. + */ + boolean hasAutomationSnapshot(); + /** + * + * + *
+   * Output only. Snapshot of the Automation taken at AutomationRun creation
+   * time.
+   * 
+ * + * + * .google.cloud.deploy.v1.Automation automation_snapshot = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The automationSnapshot. + */ + com.google.cloud.deploy.v1.Automation getAutomationSnapshot(); + /** + * + * + *
+   * Output only. Snapshot of the Automation taken at AutomationRun creation
+   * time.
+   * 
+ * + * + * .google.cloud.deploy.v1.Automation automation_snapshot = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.AutomationOrBuilder getAutomationSnapshotOrBuilder(); + + /** + * + * + *
+   * Output only. The ID of the target that represents the promotion stage that
+   * initiates the `AutomationRun`. The value of this field is the last segment
+   * of a target name.
+   * 
+ * + * string target_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The targetId. + */ + java.lang.String getTargetId(); + /** + * + * + *
+   * Output only. The ID of the target that represents the promotion stage that
+   * initiates the `AutomationRun`. The value of this field is the last segment
+   * of a target name.
+   * 
+ * + * string target_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for targetId. + */ + com.google.protobuf.ByteString getTargetIdBytes(); + + /** + * + * + *
+   * Output only. Current state of the `AutomationRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRun.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. Current state of the `AutomationRun`.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRun.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.deploy.v1.AutomationRun.State getState(); + + /** + * + * + *
+   * Output only. Explains the current state of the `AutomationRun`. Present
+   * only an explanation is needed.
+   * 
+ * + * string state_description = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateDescription. + */ + java.lang.String getStateDescription(); + /** + * + * + *
+   * Output only. Explains the current state of the `AutomationRun`. Present
+   * only an explanation is needed.
+   * 
+ * + * string state_description = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateDescription. + */ + com.google.protobuf.ByteString getStateDescriptionBytes(); + + /** + * + * + *
+   * Output only. Time the `AutomationRun` will expire. An `AutomationRun` will
+   * expire after 14 days from its creation date.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + boolean hasExpireTime(); + /** + * + * + *
+   * Output only. Time the `AutomationRun` will expire. An `AutomationRun` will
+   * expire after 14 days from its creation date.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + com.google.protobuf.Timestamp getExpireTime(); + /** + * + * + *
+   * Output only. Time the `AutomationRun` will expire. An `AutomationRun` will
+   * expire after 14 days from its creation date.
+   * 
+ * + * .google.protobuf.Timestamp expire_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The ID of the automation rule that initiated the operation.
+   * 
+ * + * string rule_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The ruleId. + */ + java.lang.String getRuleId(); + /** + * + * + *
+   * Output only. The ID of the automation rule that initiated the operation.
+   * 
+ * + * string rule_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for ruleId. + */ + com.google.protobuf.ByteString getRuleIdBytes(); + + /** + * + * + *
+   * Output only. The ID of the automation that initiated the operation.
+   * 
+ * + * string automation_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The automationId. + */ + java.lang.String getAutomationId(); + /** + * + * + *
+   * Output only. The ID of the automation that initiated the operation.
+   * 
+ * + * string automation_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for automationId. + */ + com.google.protobuf.ByteString getAutomationIdBytes(); + + /** + * + * + *
+   * Output only. Promotes a release to a specified 'Target'.
+   * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseOperation promote_release_operation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the promoteReleaseOperation field is set. + */ + boolean hasPromoteReleaseOperation(); + /** + * + * + *
+   * Output only. Promotes a release to a specified 'Target'.
+   * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseOperation promote_release_operation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The promoteReleaseOperation. + */ + com.google.cloud.deploy.v1.PromoteReleaseOperation getPromoteReleaseOperation(); + /** + * + * + *
+   * Output only. Promotes a release to a specified 'Target'.
+   * 
+ * + * + * .google.cloud.deploy.v1.PromoteReleaseOperation promote_release_operation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.PromoteReleaseOperationOrBuilder getPromoteReleaseOperationOrBuilder(); + + /** + * + * + *
+   * Output only. Advances a rollout to the next phase.
+   * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutOperation advance_rollout_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the advanceRolloutOperation field is set. + */ + boolean hasAdvanceRolloutOperation(); + /** + * + * + *
+   * Output only. Advances a rollout to the next phase.
+   * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutOperation advance_rollout_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The advanceRolloutOperation. + */ + com.google.cloud.deploy.v1.AdvanceRolloutOperation getAdvanceRolloutOperation(); + /** + * + * + *
+   * Output only. Advances a rollout to the next phase.
+   * 
+ * + * + * .google.cloud.deploy.v1.AdvanceRolloutOperation advance_rollout_operation = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.AdvanceRolloutOperationOrBuilder getAdvanceRolloutOperationOrBuilder(); + + /** + * + * + *
+   * Output only. Repairs a failed 'Rollout'.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutOperation repair_rollout_operation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the repairRolloutOperation field is set. + */ + boolean hasRepairRolloutOperation(); + /** + * + * + *
+   * Output only. Repairs a failed 'Rollout'.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutOperation repair_rollout_operation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The repairRolloutOperation. + */ + com.google.cloud.deploy.v1.RepairRolloutOperation getRepairRolloutOperation(); + /** + * + * + *
+   * Output only. Repairs a failed 'Rollout'.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairRolloutOperation repair_rollout_operation = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.RepairRolloutOperationOrBuilder getRepairRolloutOperationOrBuilder(); + + /** + * + * + *
+   * Output only. Earliest time the `AutomationRun` will attempt to resume.
+   * Wait-time is configured by `wait` in automation rule.
+   * 
+ * + * + * .google.protobuf.Timestamp wait_until_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the waitUntilTime field is set. + */ + boolean hasWaitUntilTime(); + /** + * + * + *
+   * Output only. Earliest time the `AutomationRun` will attempt to resume.
+   * Wait-time is configured by `wait` in automation rule.
+   * 
+ * + * + * .google.protobuf.Timestamp wait_until_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The waitUntilTime. + */ + com.google.protobuf.Timestamp getWaitUntilTime(); + /** + * + * + *
+   * Output only. Earliest time the `AutomationRun` will attempt to resume.
+   * Wait-time is configured by `wait` in automation rule.
+   * 
+ * + * + * .google.protobuf.Timestamp wait_until_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getWaitUntilTimeOrBuilder(); + + com.google.cloud.deploy.v1.AutomationRun.OperationCase getOperationCase(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRunPayloadProto.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRunPayloadProto.java new file mode 100644 index 000000000000..b4de0a8c102b --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/AutomationRunPayloadProto.java @@ -0,0 +1,79 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/automationrun_payload.proto + +package com.google.cloud.deploy.v1; + +public final class AutomationRunPayloadProto { + private AutomationRunPayloadProto() {} + + 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_AutomationRunEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_AutomationRunEvent_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n2google/cloud/deploy/v1/automationrun_p" + + "ayload.proto\022\026google.cloud.deploy.v1\032&go" + + "ogle/cloud/deploy/v1/log_enums.proto\"\306\001\n" + + "\022AutomationRunEvent\022\017\n\007message\030\001 \001(\t\022\026\n\016" + + "automation_run\030\002 \001(\t\022\024\n\014pipeline_uid\030\003 \001" + + "(\t\022\025\n\rautomation_id\030\004 \001(\t\022\017\n\007rule_id\030\005 \001" + + "(\t\022\035\n\025destination_target_id\030\006 \001(\t\022*\n\004typ" + + "e\030\007 \001(\0162\034.google.cloud.deploy.v1.TypeBm\n" + + "\032com.google.cloud.deploy.v1B\031AutomationR" + + "unPayloadProtoP\001Z2cloud.google.com/go/de" + + "ploy/apiv1/deploypb;deploypbb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.deploy.v1.LogEnumsProto.getDescriptor(), + }); + internal_static_google_cloud_deploy_v1_AutomationRunEvent_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_deploy_v1_AutomationRunEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_AutomationRunEvent_descriptor, + new java.lang.String[] { + "Message", + "AutomationRun", + "PipelineUid", + "AutomationId", + "RuleId", + "DestinationTargetId", + "Type", + }); + com.google.cloud.deploy.v1.LogEnumsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/BackoffMode.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/BackoffMode.java new file mode 100644 index 000000000000..9fa7aa5287b9 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/BackoffMode.java @@ -0,0 +1,176 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 pattern of how wait time is increased.
+ * 
+ * + * Protobuf enum {@code google.cloud.deploy.v1.BackoffMode} + */ +public enum BackoffMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * No WaitMode is specified.
+   * 
+ * + * BACKOFF_MODE_UNSPECIFIED = 0; + */ + BACKOFF_MODE_UNSPECIFIED(0), + /** + * + * + *
+   * Increases the wait time linearly.
+   * 
+ * + * BACKOFF_MODE_LINEAR = 1; + */ + BACKOFF_MODE_LINEAR(1), + /** + * + * + *
+   * Increases the wait time exponentially.
+   * 
+ * + * BACKOFF_MODE_EXPONENTIAL = 2; + */ + BACKOFF_MODE_EXPONENTIAL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * No WaitMode is specified.
+   * 
+ * + * BACKOFF_MODE_UNSPECIFIED = 0; + */ + public static final int BACKOFF_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Increases the wait time linearly.
+   * 
+ * + * BACKOFF_MODE_LINEAR = 1; + */ + public static final int BACKOFF_MODE_LINEAR_VALUE = 1; + /** + * + * + *
+   * Increases the wait time exponentially.
+   * 
+ * + * BACKOFF_MODE_EXPONENTIAL = 2; + */ + public static final int BACKOFF_MODE_EXPONENTIAL_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BackoffMode 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 BackoffMode forNumber(int value) { + switch (value) { + case 0: + return BACKOFF_MODE_UNSPECIFIED; + case 1: + return BACKOFF_MODE_LINEAR; + case 2: + return BACKOFF_MODE_EXPONENTIAL; + 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 BackoffMode findValueByNumber(int number) { + return BackoffMode.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.CloudDeployProto.getDescriptor().getEnumTypes().get(1); + } + + private static final BackoffMode[] VALUES = values(); + + public static BackoffMode 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 BackoffMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.deploy.v1.BackoffMode) +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CanaryDeployment.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CanaryDeployment.java index d842d6d7ff61..3a378382c002 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CanaryDeployment.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CanaryDeployment.java @@ -144,7 +144,7 @@ public boolean getVerify() { * *
    * Optional. Configuration for the predeploy job of the first phase. If this
-   * is not configured, predeploy job will not be present.
+   * is not configured, there will be no predeploy job for this phase.
    * 
* * @@ -162,7 +162,7 @@ public boolean hasPredeploy() { * *
    * Optional. Configuration for the predeploy job of the first phase. If this
-   * is not configured, predeploy job will not be present.
+   * is not configured, there will be no predeploy job for this phase.
    * 
* * @@ -182,7 +182,7 @@ public com.google.cloud.deploy.v1.Predeploy getPredeploy() { * *
    * Optional. Configuration for the predeploy job of the first phase. If this
-   * is not configured, predeploy job will not be present.
+   * is not configured, there will be no predeploy job for this phase.
    * 
* * @@ -203,7 +203,7 @@ public com.google.cloud.deploy.v1.PredeployOrBuilder getPredeployOrBuilder() { * *
    * Optional. Configuration for the postdeploy job of the last phase. If this
-   * is not configured, postdeploy job will not be present.
+   * is not configured, there will be no postdeploy job for this phase.
    * 
* * @@ -221,7 +221,7 @@ public boolean hasPostdeploy() { * *
    * Optional. Configuration for the postdeploy job of the last phase. If this
-   * is not configured, postdeploy job will not be present.
+   * is not configured, there will be no postdeploy job for this phase.
    * 
* * @@ -241,7 +241,7 @@ public com.google.cloud.deploy.v1.Postdeploy getPostdeploy() { * *
    * Optional. Configuration for the postdeploy job of the last phase. If this
-   * is not configured, postdeploy job will not be present.
+   * is not configured, there will be no postdeploy job for this phase.
    * 
* * @@ -926,7 +926,7 @@ public Builder clearVerify() { * *
      * Optional. Configuration for the predeploy job of the first phase. If this
-     * is not configured, predeploy job will not be present.
+     * is not configured, there will be no predeploy job for this phase.
      * 
* * @@ -943,7 +943,7 @@ public boolean hasPredeploy() { * *
      * Optional. Configuration for the predeploy job of the first phase. If this
-     * is not configured, predeploy job will not be present.
+     * is not configured, there will be no predeploy job for this phase.
      * 
* * @@ -966,7 +966,7 @@ public com.google.cloud.deploy.v1.Predeploy getPredeploy() { * *
      * Optional. Configuration for the predeploy job of the first phase. If this
-     * is not configured, predeploy job will not be present.
+     * is not configured, there will be no predeploy job for this phase.
      * 
* * @@ -991,7 +991,7 @@ public Builder setPredeploy(com.google.cloud.deploy.v1.Predeploy value) { * *
      * Optional. Configuration for the predeploy job of the first phase. If this
-     * is not configured, predeploy job will not be present.
+     * is not configured, there will be no predeploy job for this phase.
      * 
* * @@ -1013,7 +1013,7 @@ public Builder setPredeploy(com.google.cloud.deploy.v1.Predeploy.Builder builder * *
      * Optional. Configuration for the predeploy job of the first phase. If this
-     * is not configured, predeploy job will not be present.
+     * is not configured, there will be no predeploy job for this phase.
      * 
* * @@ -1041,7 +1041,7 @@ public Builder mergePredeploy(com.google.cloud.deploy.v1.Predeploy value) { * *
      * Optional. Configuration for the predeploy job of the first phase. If this
-     * is not configured, predeploy job will not be present.
+     * is not configured, there will be no predeploy job for this phase.
      * 
* * @@ -1063,7 +1063,7 @@ public Builder clearPredeploy() { * *
      * Optional. Configuration for the predeploy job of the first phase. If this
-     * is not configured, predeploy job will not be present.
+     * is not configured, there will be no predeploy job for this phase.
      * 
* * @@ -1080,7 +1080,7 @@ public com.google.cloud.deploy.v1.Predeploy.Builder getPredeployBuilder() { * *
      * Optional. Configuration for the predeploy job of the first phase. If this
-     * is not configured, predeploy job will not be present.
+     * is not configured, there will be no predeploy job for this phase.
      * 
* * @@ -1101,7 +1101,7 @@ public com.google.cloud.deploy.v1.PredeployOrBuilder getPredeployOrBuilder() { * *
      * Optional. Configuration for the predeploy job of the first phase. If this
-     * is not configured, predeploy job will not be present.
+     * is not configured, there will be no predeploy job for this phase.
      * 
* * @@ -1136,7 +1136,7 @@ public com.google.cloud.deploy.v1.PredeployOrBuilder getPredeployOrBuilder() { * *
      * Optional. Configuration for the postdeploy job of the last phase. If this
-     * is not configured, postdeploy job will not be present.
+     * is not configured, there will be no postdeploy job for this phase.
      * 
* * @@ -1153,7 +1153,7 @@ public boolean hasPostdeploy() { * *
      * Optional. Configuration for the postdeploy job of the last phase. If this
-     * is not configured, postdeploy job will not be present.
+     * is not configured, there will be no postdeploy job for this phase.
      * 
* * @@ -1176,7 +1176,7 @@ public com.google.cloud.deploy.v1.Postdeploy getPostdeploy() { * *
      * Optional. Configuration for the postdeploy job of the last phase. If this
-     * is not configured, postdeploy job will not be present.
+     * is not configured, there will be no postdeploy job for this phase.
      * 
* * @@ -1201,7 +1201,7 @@ public Builder setPostdeploy(com.google.cloud.deploy.v1.Postdeploy value) { * *
      * Optional. Configuration for the postdeploy job of the last phase. If this
-     * is not configured, postdeploy job will not be present.
+     * is not configured, there will be no postdeploy job for this phase.
      * 
* * @@ -1223,7 +1223,7 @@ public Builder setPostdeploy(com.google.cloud.deploy.v1.Postdeploy.Builder build * *
      * Optional. Configuration for the postdeploy job of the last phase. If this
-     * is not configured, postdeploy job will not be present.
+     * is not configured, there will be no postdeploy job for this phase.
      * 
* * @@ -1251,7 +1251,7 @@ public Builder mergePostdeploy(com.google.cloud.deploy.v1.Postdeploy value) { * *
      * Optional. Configuration for the postdeploy job of the last phase. If this
-     * is not configured, postdeploy job will not be present.
+     * is not configured, there will be no postdeploy job for this phase.
      * 
* * @@ -1273,7 +1273,7 @@ public Builder clearPostdeploy() { * *
      * Optional. Configuration for the postdeploy job of the last phase. If this
-     * is not configured, postdeploy job will not be present.
+     * is not configured, there will be no postdeploy job for this phase.
      * 
* * @@ -1290,7 +1290,7 @@ public com.google.cloud.deploy.v1.Postdeploy.Builder getPostdeployBuilder() { * *
      * Optional. Configuration for the postdeploy job of the last phase. If this
-     * is not configured, postdeploy job will not be present.
+     * is not configured, there will be no postdeploy job for this phase.
      * 
* * @@ -1311,7 +1311,7 @@ public com.google.cloud.deploy.v1.PostdeployOrBuilder getPostdeployOrBuilder() { * *
      * Optional. Configuration for the postdeploy job of the last phase. If this
-     * is not configured, postdeploy job will not be present.
+     * is not configured, there will be no postdeploy job for this phase.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CanaryDeploymentOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CanaryDeploymentOrBuilder.java index f680fcfaa2d8..859fcfc4e143 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CanaryDeploymentOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CanaryDeploymentOrBuilder.java @@ -85,7 +85,7 @@ public interface CanaryDeploymentOrBuilder * *
    * Optional. Configuration for the predeploy job of the first phase. If this
-   * is not configured, predeploy job will not be present.
+   * is not configured, there will be no predeploy job for this phase.
    * 
* * @@ -100,7 +100,7 @@ public interface CanaryDeploymentOrBuilder * *
    * Optional. Configuration for the predeploy job of the first phase. If this
-   * is not configured, predeploy job will not be present.
+   * is not configured, there will be no predeploy job for this phase.
    * 
* * @@ -115,7 +115,7 @@ public interface CanaryDeploymentOrBuilder * *
    * Optional. Configuration for the predeploy job of the first phase. If this
-   * is not configured, predeploy job will not be present.
+   * is not configured, there will be no predeploy job for this phase.
    * 
* * @@ -129,7 +129,7 @@ public interface CanaryDeploymentOrBuilder * *
    * Optional. Configuration for the postdeploy job of the last phase. If this
-   * is not configured, postdeploy job will not be present.
+   * is not configured, there will be no postdeploy job for this phase.
    * 
* * @@ -144,7 +144,7 @@ public interface CanaryDeploymentOrBuilder * *
    * Optional. Configuration for the postdeploy job of the last phase. If this
-   * is not configured, postdeploy job will not be present.
+   * is not configured, there will be no postdeploy job for this phase.
    * 
* * @@ -159,7 +159,7 @@ public interface CanaryDeploymentOrBuilder * *
    * Optional. Configuration for the postdeploy job of the last phase. If this
-   * is not configured, postdeploy job will not be present.
+   * is not configured, there will be no postdeploy job for this phase.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelAutomationRunRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelAutomationRunRequest.java new file mode 100644 index 000000000000..bbe2b099a379 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelAutomationRunRequest.java @@ -0,0 +1,646 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 `CancelAutomationRun`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.CancelAutomationRunRequest} + */ +public final class CancelAutomationRunRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.CancelAutomationRunRequest) + CancelAutomationRunRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CancelAutomationRunRequest.newBuilder() to construct. + private CancelAutomationRunRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CancelAutomationRunRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CancelAutomationRunRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CancelAutomationRunRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CancelAutomationRunRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.CancelAutomationRunRequest.class, + com.google.cloud.deploy.v1.CancelAutomationRunRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the `AutomationRun`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+   * 
+ * + * + * 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 `AutomationRun`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+   * 
+ * + * + * 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.CancelAutomationRunRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.CancelAutomationRunRequest other = + (com.google.cloud.deploy.v1.CancelAutomationRunRequest) 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.CancelAutomationRunRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CancelAutomationRunRequest 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.CancelAutomationRunRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CancelAutomationRunRequest 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.CancelAutomationRunRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CancelAutomationRunRequest 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.CancelAutomationRunRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CancelAutomationRunRequest 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.CancelAutomationRunRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CancelAutomationRunRequest 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.CancelAutomationRunRequest 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.CancelAutomationRunRequest 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.CancelAutomationRunRequest 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 `CancelAutomationRun`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.CancelAutomationRunRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.CancelAutomationRunRequest) + com.google.cloud.deploy.v1.CancelAutomationRunRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CancelAutomationRunRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CancelAutomationRunRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.CancelAutomationRunRequest.class, + com.google.cloud.deploy.v1.CancelAutomationRunRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.CancelAutomationRunRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CancelAutomationRunRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CancelAutomationRunRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.CancelAutomationRunRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CancelAutomationRunRequest build() { + com.google.cloud.deploy.v1.CancelAutomationRunRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CancelAutomationRunRequest buildPartial() { + com.google.cloud.deploy.v1.CancelAutomationRunRequest result = + new com.google.cloud.deploy.v1.CancelAutomationRunRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.CancelAutomationRunRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.CancelAutomationRunRequest) { + return mergeFrom((com.google.cloud.deploy.v1.CancelAutomationRunRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.CancelAutomationRunRequest other) { + if (other == com.google.cloud.deploy.v1.CancelAutomationRunRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the `AutomationRun`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+     * 
+ * + * + * 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 `AutomationRun`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+     * 
+ * + * + * 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 `AutomationRun`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the `AutomationRun`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the `AutomationRun`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.CancelAutomationRunRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.CancelAutomationRunRequest) + private static final com.google.cloud.deploy.v1.CancelAutomationRunRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.CancelAutomationRunRequest(); + } + + public static com.google.cloud.deploy.v1.CancelAutomationRunRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CancelAutomationRunRequest 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.CancelAutomationRunRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelAutomationRunRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelAutomationRunRequestOrBuilder.java new file mode 100644 index 000000000000..f32ded6204c4 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelAutomationRunRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 CancelAutomationRunRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.CancelAutomationRunRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the `AutomationRun`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the `AutomationRun`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelAutomationRunResponse.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelAutomationRunResponse.java new file mode 100644 index 000000000000..70aef67f8249 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelAutomationRunResponse.java @@ -0,0 +1,432 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 `CancelAutomationRun`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.CancelAutomationRunResponse} + */ +public final class CancelAutomationRunResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.CancelAutomationRunResponse) + CancelAutomationRunResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CancelAutomationRunResponse.newBuilder() to construct. + private CancelAutomationRunResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CancelAutomationRunResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CancelAutomationRunResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CancelAutomationRunResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CancelAutomationRunResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.CancelAutomationRunResponse.class, + com.google.cloud.deploy.v1.CancelAutomationRunResponse.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.CancelAutomationRunResponse)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.CancelAutomationRunResponse other = + (com.google.cloud.deploy.v1.CancelAutomationRunResponse) 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.CancelAutomationRunResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CancelAutomationRunResponse 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.CancelAutomationRunResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CancelAutomationRunResponse 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.CancelAutomationRunResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CancelAutomationRunResponse 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.CancelAutomationRunResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CancelAutomationRunResponse 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.CancelAutomationRunResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CancelAutomationRunResponse 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.CancelAutomationRunResponse 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.CancelAutomationRunResponse 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.CancelAutomationRunResponse 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 `CancelAutomationRun`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.CancelAutomationRunResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.CancelAutomationRunResponse) + com.google.cloud.deploy.v1.CancelAutomationRunResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CancelAutomationRunResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CancelAutomationRunResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.CancelAutomationRunResponse.class, + com.google.cloud.deploy.v1.CancelAutomationRunResponse.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.CancelAutomationRunResponse.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_CancelAutomationRunResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CancelAutomationRunResponse getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.CancelAutomationRunResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CancelAutomationRunResponse build() { + com.google.cloud.deploy.v1.CancelAutomationRunResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CancelAutomationRunResponse buildPartial() { + com.google.cloud.deploy.v1.CancelAutomationRunResponse result = + new com.google.cloud.deploy.v1.CancelAutomationRunResponse(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.CancelAutomationRunResponse) { + return mergeFrom((com.google.cloud.deploy.v1.CancelAutomationRunResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.CancelAutomationRunResponse other) { + if (other == com.google.cloud.deploy.v1.CancelAutomationRunResponse.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.CancelAutomationRunResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.CancelAutomationRunResponse) + private static final com.google.cloud.deploy.v1.CancelAutomationRunResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.CancelAutomationRunResponse(); + } + + public static com.google.cloud.deploy.v1.CancelAutomationRunResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CancelAutomationRunResponse 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.CancelAutomationRunResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelAutomationRunResponseOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelAutomationRunResponseOrBuilder.java new file mode 100644 index 000000000000..91f8d2771a47 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelAutomationRunResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 CancelAutomationRunResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.CancelAutomationRunResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelRolloutRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelRolloutRequest.java index 6a624ac47108..6c7ecdb79402 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelRolloutRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelRolloutRequest.java @@ -71,8 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * @@ -98,8 +97,7 @@ public java.lang.String getName() { * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * @@ -469,8 +467,7 @@ public Builder mergeFrom( * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -495,8 +492,7 @@ public java.lang.String getName() { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -521,8 +517,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -546,8 +541,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -567,8 +561,7 @@ public Builder clearName() { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelRolloutRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelRolloutRequestOrBuilder.java index 194b7bef67fb..a428e45a15de 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelRolloutRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CancelRolloutRequestOrBuilder.java @@ -28,8 +28,7 @@ public interface CancelRolloutRequestOrBuilder * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * @@ -44,8 +43,7 @@ public interface CancelRolloutRequestOrBuilder * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployProto.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployProto.java index b0375f402506..0ffc802729e6 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployProto.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudDeployProto.java @@ -151,6 +151,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_deploy_v1_DeleteDeliveryPipelineRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_deploy_v1_DeleteDeliveryPipelineRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_RollbackTargetConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_RollbackTargetConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_RollbackTargetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_RollbackTargetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_RollbackTargetResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_RollbackTargetResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_deploy_v1_Target_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -219,6 +231,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_deploy_v1_DeleteTargetRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_deploy_v1_DeleteTargetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_TargetAttribute_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_TargetAttribute_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_TargetAttribute_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_TargetAttribute_LabelsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_deploy_v1_Release_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -327,6 +347,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r 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_AutomationRolloutMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_AutomationRolloutMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_deploy_v1_Phase_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -495,6 +519,130 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_deploy_v1_GetConfigRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_deploy_v1_GetConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Automation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Automation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Automation_AnnotationsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Automation_AnnotationsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Automation_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Automation_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_AutomationResourceSelector_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_AutomationResourceSelector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_AutomationRule_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_AutomationRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_PromoteReleaseRule_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_PromoteReleaseRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_AdvanceRolloutRule_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_AdvanceRolloutRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_RepairRolloutRule_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_RepairRolloutRule_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_RepairMode_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_RepairMode_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Retry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Retry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_Rollback_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_Rollback_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_AutomationRuleCondition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_AutomationRuleCondition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_CreateAutomationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_CreateAutomationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_UpdateAutomationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_UpdateAutomationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_DeleteAutomationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_DeleteAutomationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_ListAutomationsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_ListAutomationsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_ListAutomationsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_ListAutomationsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_GetAutomationRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_GetAutomationRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_AutomationRun_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_AutomationRun_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_PromoteReleaseOperation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_PromoteReleaseOperation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_AdvanceRolloutOperation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_AdvanceRolloutOperation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_RepairRolloutOperation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_RepairRolloutOperation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_RepairPhase_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_RepairPhase_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_RetryPhase_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_RetryPhase_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_RetryAttempt_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_RetryAttempt_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_RollbackAttempt_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_RollbackAttempt_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_ListAutomationRunsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_ListAutomationRunsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_ListAutomationRunsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_ListAutomationRunsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_GetAutomationRunRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_GetAutomationRunRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_CancelAutomationRunRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_CancelAutomationRunRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_deploy_v1_CancelAutomationRunResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_CancelAutomationRunResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -635,588 +783,826 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/DeliveryPipeline\022\030\n\nrequest_id\030\002 \001(\tB\004\342" + "A\001\001\022\033\n\rallow_missing\030\003 \001(\010B\004\342A\001\001\022\033\n\rvali" + "date_only\030\004 \001(\010B\004\342A\001\001\022\023\n\005force\030\006 \001(\010B\004\342A" - + "\001\001\022\022\n\004etag\030\005 \001(\tB\004\342A\001\001\"\303\010\n\006Target\022\022\n\004nam" - + "e\030\001 \001(\tB\004\342A\001\001\022\027\n\ttarget_id\030\002 \001(\tB\004\342A\001\003\022\021" - + "\n\003uid\030\003 \001(\tB\004\342A\001\003\022\031\n\013description\030\004 \001(\tB\004" - + "\342A\001\001\022J\n\013annotations\030\005 \003(\0132/.google.cloud" - + ".deploy.v1.Target.AnnotationsEntryB\004\342A\001\001" - + "\022@\n\006labels\030\006 \003(\0132*.google.cloud.deploy.v" - + "1.Target.LabelsEntryB\004\342A\001\001\022\036\n\020require_ap" - + "proval\030\r \001(\010B\004\342A\001\001\0225\n\013create_time\030\010 \001(\0132" - + "\032.google.protobuf.TimestampB\004\342A\001\003\0225\n\013upd" - + "ate_time\030\t \001(\0132\032.google.protobuf.Timesta" - + "mpB\004\342A\001\003\0227\n\003gke\030\017 \001(\0132\".google.cloud.dep" - + "loy.v1.GkeClusterB\004\342A\001\001H\000\022E\n\016anthos_clus" - + "ter\030\021 \001(\0132%.google.cloud.deploy.v1.Antho" - + "sClusterB\004\342A\001\001H\000\022=\n\003run\030\022 \001(\0132(.google.c" - + "loud.deploy.v1.CloudRunLocationB\004\342A\001\001H\000\022" - + "A\n\014multi_target\030\023 \001(\0132#.google.cloud.dep" - + "loy.v1.MultiTargetB\004\342A\001\001H\000\022\022\n\004etag\030\014 \001(\t" - + "B\004\342A\001\001\022B\n\021execution_configs\030\020 \003(\0132\'.goog" - + "le.cloud.deploy.v1.ExecutionConfig\022U\n\021de" - + "ploy_parameters\030\024 \003(\01324.google.cloud.dep" - + "loy.v1.Target.DeployParametersEntryB\004\342A\001" - + "\001\0322\n\020AnnotationsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" - + "lue\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\0327\n\025DeployParameters" - + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:`\352" - + "A]\n!clouddeploy.googleapis.com/Target\0228p" - + "rojects/{project}/locations/{location}/t" - + "argets/{target}B\023\n\021deployment_target\"\326\004\n" - + "\017ExecutionConfig\022W\n\006usages\030\001 \003(\0162A.googl" - + "e.cloud.deploy.v1.ExecutionConfig.Execut" - + "ionEnvironmentUsageB\004\342A\001\002\022A\n\014default_poo" - + "l\030\002 \001(\0132#.google.cloud.deploy.v1.Default" - + "PoolB\004\342A\001\001H\000\022A\n\014private_pool\030\003 \001(\0132#.goo" - + "gle.cloud.deploy.v1.PrivatePoolB\004\342A\001\001H\000\022" - + "B\n\013worker_pool\030\004 \001(\tB-\342A\001\001\372A&\n$cloudbuil" - + "d.googleapis.com/WorkerPool\022\035\n\017service_a" - + "ccount\030\005 \001(\tB\004\342A\001\001\022\036\n\020artifact_storage\030\006" - + " \001(\tB\004\342A\001\001\022:\n\021execution_timeout\030\007 \001(\0132\031." - + "google.protobuf.DurationB\004\342A\001\001\"\213\001\n\031Execu" - + "tionEnvironmentUsage\022+\n\'EXECUTION_ENVIRO" - + "NMENT_USAGE_UNSPECIFIED\020\000\022\n\n\006RENDER\020\001\022\n\n" - + "\006DEPLOY\020\002\022\n\n\006VERIFY\020\003\022\r\n\tPREDEPLOY\020\004\022\016\n\n" - + "POSTDEPLOY\020\005B\027\n\025execution_environment\"L\n" - + "\013DefaultPool\022\035\n\017service_account\030\001 \001(\tB\004\342" - + "A\001\001\022\036\n\020artifact_storage\030\002 \001(\tB\004\342A\001\001\"\220\001\n\013" - + "PrivatePool\022B\n\013worker_pool\030\001 \001(\tB-\342A\001\002\372A" - + "&\n$cloudbuild.googleapis.com/WorkerPool\022" - + "\035\n\017service_account\030\002 \001(\tB\004\342A\001\001\022\036\n\020artifa" - + "ct_storage\030\003 \001(\tB\004\342A\001\001\"_\n\nGkeCluster\0226\n\007" - + "cluster\030\001 \001(\tB%\372A\"\n container.googleapis" - + ".com/Cluster\022\031\n\013internal_ip\030\002 \001(\010B\004\342A\001\001\"" - + "J\n\rAnthosCluster\0229\n\nmembership\030\001 \001(\tB%\372A" - + "\"\n gkehub.googleapis.com/Membership\"P\n\020C" - + "loudRunLocation\022<\n\010location\030\001 \001(\tB*\342A\001\002\372" - + "A#\n!locations.googleapis.com/Location\"\'\n" - + "\013MultiTarget\022\030\n\ntarget_ids\030\001 \003(\tB\004\342A\001\002\"\261" - + "\001\n\022ListTargetsRequest\022:\n\006parent\030\001 \001(\tB*\342" - + "A\001\002\372A#\022!clouddeploy.googleapis.com/Targe" - + "t\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token" - + "\030\003 \001(\tB\004\342A\001\001\022\024\n\006filter\030\004 \001(\tB\004\342A\001\001\022\026\n\010or" - + "der_by\030\005 \001(\tB\004\342A\001\001\"t\n\023ListTargetsRespons" - + "e\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\013u" - + "nreachable\030\003 \003(\t\"L\n\020GetTargetRequest\0228\n\004" + + "\001\001\022\022\n\004etag\030\005 \001(\tB\004\342A\001\001\"o\n\024RollbackTarget" + + "Config\0226\n\007rollout\030\001 \001(\0132\037.google.cloud.d" + + "eploy.v1.RolloutB\004\342A\001\001\022\037\n\021starting_phase" + + "_id\030\002 \001(\tB\004\342A\001\001\"\266\002\n\025RollbackTargetReques" + + "t\022B\n\004name\030\001 \001(\tB4\342A\001\002\372A-\n+clouddeploy.go" + + "ogleapis.com/DeliveryPipeline\022\027\n\ttarget_" + + "id\030\002 \001(\tB\004\342A\001\002\022\030\n\nrollout_id\030\003 \001(\tB\004\342A\001\002" + + "\022\030\n\nrelease_id\030\004 \001(\tB\004\342A\001\001\022\"\n\024rollout_to" + + "_roll_back\030\005 \001(\tB\004\342A\001\001\022K\n\017rollback_confi" + + "g\030\006 \001(\0132,.google.cloud.deploy.v1.Rollbac" + + "kTargetConfigB\004\342A\001\001\022\033\n\rvalidate_only\030\007 \001" + + "(\010B\004\342A\001\001\"_\n\026RollbackTargetResponse\022E\n\017ro" + + "llback_config\030\001 \001(\0132,.google.cloud.deplo" + + "y.v1.RollbackTargetConfig\"\303\010\n\006Target\022\022\n\004" + + "name\030\001 \001(\tB\004\342A\001\001\022\027\n\ttarget_id\030\002 \001(\tB\004\342A\001" + + "\003\022\021\n\003uid\030\003 \001(\tB\004\342A\001\003\022\031\n\013description\030\004 \001(" + + "\tB\004\342A\001\001\022J\n\013annotations\030\005 \003(\0132/.google.cl" + + "oud.deploy.v1.Target.AnnotationsEntryB\004\342" + + "A\001\001\022@\n\006labels\030\006 \003(\0132*.google.cloud.deplo" + + "y.v1.Target.LabelsEntryB\004\342A\001\001\022\036\n\020require" + + "_approval\030\r \001(\010B\004\342A\001\001\0225\n\013create_time\030\010 \001" + + "(\0132\032.google.protobuf.TimestampB\004\342A\001\003\0225\n\013" + + "update_time\030\t \001(\0132\032.google.protobuf.Time" + + "stampB\004\342A\001\003\0227\n\003gke\030\017 \001(\0132\".google.cloud." + + "deploy.v1.GkeClusterB\004\342A\001\001H\000\022E\n\016anthos_c" + + "luster\030\021 \001(\0132%.google.cloud.deploy.v1.An" + + "thosClusterB\004\342A\001\001H\000\022=\n\003run\030\022 \001(\0132(.googl" + + "e.cloud.deploy.v1.CloudRunLocationB\004\342A\001\001" + + "H\000\022A\n\014multi_target\030\023 \001(\0132#.google.cloud." + + "deploy.v1.MultiTargetB\004\342A\001\001H\000\022\022\n\004etag\030\014 " + + "\001(\tB\004\342A\001\001\022B\n\021execution_configs\030\020 \003(\0132\'.g" + + "oogle.cloud.deploy.v1.ExecutionConfig\022U\n" + + "\021deploy_parameters\030\024 \003(\01324.google.cloud." + + "deploy.v1.Target.DeployParametersEntryB\004" + + "\342A\001\001\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\0327\n\025DeployParamet" + + "ersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + + ":`\352A]\n!clouddeploy.googleapis.com/Target" + + "\0228projects/{project}/locations/{location" + + "}/targets/{target}B\023\n\021deployment_target\"" + + "\326\004\n\017ExecutionConfig\022W\n\006usages\030\001 \003(\0162A.go" + + "ogle.cloud.deploy.v1.ExecutionConfig.Exe" + + "cutionEnvironmentUsageB\004\342A\001\002\022A\n\014default_" + + "pool\030\002 \001(\0132#.google.cloud.deploy.v1.Defa" + + "ultPoolB\004\342A\001\001H\000\022A\n\014private_pool\030\003 \001(\0132#." + + "google.cloud.deploy.v1.PrivatePoolB\004\342A\001\001" + + "H\000\022B\n\013worker_pool\030\004 \001(\tB-\342A\001\001\372A&\n$cloudb" + + "uild.googleapis.com/WorkerPool\022\035\n\017servic" + + "e_account\030\005 \001(\tB\004\342A\001\001\022\036\n\020artifact_storag" + + "e\030\006 \001(\tB\004\342A\001\001\022:\n\021execution_timeout\030\007 \001(\013" + + "2\031.google.protobuf.DurationB\004\342A\001\001\"\213\001\n\031Ex" + + "ecutionEnvironmentUsage\022+\n\'EXECUTION_ENV" + + "IRONMENT_USAGE_UNSPECIFIED\020\000\022\n\n\006RENDER\020\001" + + "\022\n\n\006DEPLOY\020\002\022\n\n\006VERIFY\020\003\022\r\n\tPREDEPLOY\020\004\022" + + "\016\n\nPOSTDEPLOY\020\005B\027\n\025execution_environment" + + "\"L\n\013DefaultPool\022\035\n\017service_account\030\001 \001(\t" + + "B\004\342A\001\001\022\036\n\020artifact_storage\030\002 \001(\tB\004\342A\001\001\"\220" + + "\001\n\013PrivatePool\022B\n\013worker_pool\030\001 \001(\tB-\342A\001" + + "\002\372A&\n$cloudbuild.googleapis.com/WorkerPo" + + "ol\022\035\n\017service_account\030\002 \001(\tB\004\342A\001\001\022\036\n\020art" + + "ifact_storage\030\003 \001(\tB\004\342A\001\001\"_\n\nGkeCluster\022" + + "6\n\007cluster\030\001 \001(\tB%\372A\"\n container.googlea" + + "pis.com/Cluster\022\031\n\013internal_ip\030\002 \001(\010B\004\342A" + + "\001\001\"J\n\rAnthosCluster\0229\n\nmembership\030\001 \001(\tB" + + "%\372A\"\n gkehub.googleapis.com/Membership\"P" + + "\n\020CloudRunLocation\022<\n\010location\030\001 \001(\tB*\342A" + + "\001\002\372A#\n!locations.googleapis.com/Location" + + "\"\'\n\013MultiTarget\022\030\n\ntarget_ids\030\001 \003(\tB\004\342A\001" + + "\002\"\261\001\n\022ListTargetsRequest\022:\n\006parent\030\001 \001(\t" + + "B*\342A\001\002\372A#\022!clouddeploy.googleapis.com/Ta" + + "rget\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_to" + + "ken\030\003 \001(\tB\004\342A\001\001\022\024\n\006filter\030\004 \001(\tB\004\342A\001\001\022\026\n" + + "\010order_by\030\005 \001(\tB\004\342A\001\001\"t\n\023ListTargetsResp" + + "onse\022/\n\007targets\030\001 \003(\0132\036.google.cloud.dep" + + "loy.v1.Target\022\027\n\017next_page_token\030\002 \001(\t\022\023" + + "\n\013unreachable\030\003 \003(\t\"L\n\020GetTargetRequest\022" + + "8\n\004name\030\001 \001(\tB*\342A\001\002\372A#\n!clouddeploy.goog" + + "leapis.com/Target\"\327\001\n\023CreateTargetReques" + + "t\022:\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\022!clouddeploy." + + "googleapis.com/Target\022\027\n\ttarget_id\030\002 \001(\t" + + "B\004\342A\001\002\0224\n\006target\030\003 \001(\0132\036.google.cloud.de" + + "ploy.v1.TargetB\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(\t" + + "B\004\342A\001\001\022\033\n\rvalidate_only\030\005 \001(\010B\004\342A\001\001\"\326\001\n\023" + + "UpdateTargetRequest\0225\n\013update_mask\030\001 \001(\013" + + "2\032.google.protobuf.FieldMaskB\004\342A\001\002\0224\n\006ta" + + "rget\030\002 \001(\0132\036.google.cloud.deploy.v1.Targ" + + "etB\004\342A\001\002\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\022\033\n\ral" + + "low_missing\030\004 \001(\010B\004\342A\001\001\022\033\n\rvalidate_only" + + "\030\005 \001(\010B\004\342A\001\001\"\267\001\n\023DeleteTargetRequest\0228\n\004" + "name\030\001 \001(\tB*\342A\001\002\372A#\n!clouddeploy.googlea" - + "pis.com/Target\"\327\001\n\023CreateTargetRequest\022:" - + "\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\022!clouddeploy.goo" - + "gleapis.com/Target\022\027\n\ttarget_id\030\002 \001(\tB\004\342" - + "A\001\002\0224\n\006target\030\003 \001(\0132\036.google.cloud.deplo" - + "y.v1.TargetB\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(\tB\004\342" - + "A\001\001\022\033\n\rvalidate_only\030\005 \001(\010B\004\342A\001\001\"\326\001\n\023Upd" - + "ateTargetRequest\0225\n\013update_mask\030\001 \001(\0132\032." - + "google.protobuf.FieldMaskB\004\342A\001\002\0224\n\006targe" - + "t\030\002 \001(\0132\036.google.cloud.deploy.v1.TargetB" - + "\004\342A\001\002\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\022\033\n\rallow" - + "_missing\030\004 \001(\010B\004\342A\001\001\022\033\n\rvalidate_only\030\005 " - + "\001(\010B\004\342A\001\001\"\267\001\n\023DeleteTargetRequest\0228\n\004nam" - + "e\030\001 \001(\tB*\342A\001\002\372A#\n!clouddeploy.googleapis" - + ".com/Target\022\030\n\nrequest_id\030\002 \001(\tB\004\342A\001\001\022\033\n" - + "\rallow_missing\030\003 \001(\010B\004\342A\001\001\022\033\n\rvalidate_o" - + "nly\030\004 \001(\010B\004\342A\001\001\022\022\n\004etag\030\005 \001(\tB\004\342A\001\001\"\377\025\n\007" - + "Release\022\022\n\004name\030\001 \001(\tB\004\342A\001\001\022\021\n\003uid\030\002 \001(\t" - + "B\004\342A\001\003\022\023\n\013description\030\003 \001(\t\022E\n\013annotatio" - + "ns\030\004 \003(\01320.google.cloud.deploy.v1.Releas" - + "e.AnnotationsEntry\022;\n\006labels\030\005 \003(\0132+.goo" - + "gle.cloud.deploy.v1.Release.LabelsEntry\022" - + "\027\n\tabandoned\030\027 \001(\010B\004\342A\001\003\0225\n\013create_time\030" - + "\006 \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\022" - + ";\n\021render_start_time\030\007 \001(\0132\032.google.prot" - + "obuf.TimestampB\004\342A\001\003\0229\n\017render_end_time\030" - + "\010 \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\022" - + "\033\n\023skaffold_config_uri\030\021 \001(\t\022\034\n\024skaffold" - + "_config_path\030\t \001(\t\022>\n\017build_artifacts\030\n " - + "\003(\0132%.google.cloud.deploy.v1.BuildArtifa" - + "ct\022R\n\032delivery_pipeline_snapshot\030\013 \001(\0132(" - + ".google.cloud.deploy.v1.DeliveryPipeline" - + "B\004\342A\001\003\022>\n\020target_snapshots\030\014 \003(\0132\036.googl" - + "e.cloud.deploy.v1.TargetB\004\342A\001\003\022G\n\014render" - + "_state\030\r \001(\0162+.google.cloud.deploy.v1.Re" - + "lease.RenderStateB\004\342A\001\003\022\014\n\004etag\030\020 \001(\t\022\030\n" - + "\020skaffold_version\030\023 \001(\t\022T\n\020target_artifa" - + "cts\030\024 \003(\01324.google.cloud.deploy.v1.Relea" - + "se.TargetArtifactsEntryB\004\342A\001\003\022P\n\016target_" - + "renders\030\026 \003(\01322.google.cloud.deploy.v1.R" - + "elease.TargetRendersEntryB\004\342A\001\003\022I\n\tcondi" - + "tion\030\030 \001(\01320.google.cloud.deploy.v1.Rele" - + "ase.ReleaseConditionB\004\342A\001\003\022V\n\021deploy_par" - + "ameters\030\031 \003(\01325.google.cloud.deploy.v1.R" - + "elease.DeployParametersEntryB\004\342A\001\001\032\355\004\n\014T" - + "argetRender\022A\n\017rendering_build\030\001 \001(\tB(\342A" - + "\001\003\372A!\n\037cloudbuild.googleapis.com/Build\022]" - + "\n\017rendering_state\030\002 \001(\0162>.google.cloud.d" - + "eploy.v1.Release.TargetRender.TargetRend" - + "erStateB\004\342A\001\003\022>\n\010metadata\030\006 \001(\0132&.google" - + ".cloud.deploy.v1.RenderMetadataB\004\342A\001\003\022V\n" - + "\rfailure_cause\030\004 \001(\01629.google.cloud.depl" - + "oy.v1.Release.TargetRender.FailureCauseB" - + "\004\342A\001\003\022\035\n\017failure_message\030\005 \001(\tB\004\342A\001\003\"d\n\021" - + "TargetRenderState\022#\n\037TARGET_RENDER_STATE" + + "pis.com/Target\022\030\n\nrequest_id\030\002 \001(\tB\004\342A\001\001" + + "\022\033\n\rallow_missing\030\003 \001(\010B\004\342A\001\001\022\033\n\rvalidat" + + "e_only\030\004 \001(\010B\004\342A\001\001\022\022\n\004etag\030\005 \001(\tB\004\342A\001\001\"\221" + + "\001\n\017TargetAttribute\022\n\n\002id\030\001 \001(\t\022C\n\006labels" + + "\030\002 \003(\01323.google.cloud.deploy.v1.TargetAt" + + "tribute.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\242\026\n\007Release\022\022" + + "\n\004name\030\001 \001(\tB\004\342A\001\001\022\021\n\003uid\030\002 \001(\tB\004\342A\001\003\022\023\n" + + "\013description\030\003 \001(\t\022E\n\013annotations\030\004 \003(\0132" + + "0.google.cloud.deploy.v1.Release.Annotat" + + "ionsEntry\022;\n\006labels\030\005 \003(\0132+.google.cloud" + + ".deploy.v1.Release.LabelsEntry\022\027\n\tabando" + + "ned\030\027 \001(\010B\004\342A\001\003\0225\n\013create_time\030\006 \001(\0132\032.g" + + "oogle.protobuf.TimestampB\004\342A\001\003\022;\n\021render" + + "_start_time\030\007 \001(\0132\032.google.protobuf.Time" + + "stampB\004\342A\001\003\0229\n\017render_end_time\030\010 \001(\0132\032.g" + + "oogle.protobuf.TimestampB\004\342A\001\003\022\033\n\023skaffo" + + "ld_config_uri\030\021 \001(\t\022\034\n\024skaffold_config_p" + + "ath\030\t \001(\t\022>\n\017build_artifacts\030\n \003(\0132%.goo" + + "gle.cloud.deploy.v1.BuildArtifact\022R\n\032del" + + "ivery_pipeline_snapshot\030\013 \001(\0132(.google.c" + + "loud.deploy.v1.DeliveryPipelineB\004\342A\001\003\022>\n" + + "\020target_snapshots\030\014 \003(\0132\036.google.cloud.d" + + "eploy.v1.TargetB\004\342A\001\003\022G\n\014render_state\030\r " + + "\001(\0162+.google.cloud.deploy.v1.Release.Ren" + + "derStateB\004\342A\001\003\022\014\n\004etag\030\020 \001(\t\022\030\n\020skaffold" + + "_version\030\023 \001(\t\022T\n\020target_artifacts\030\024 \003(\013" + + "24.google.cloud.deploy.v1.Release.Target" + + "ArtifactsEntryB\004\342A\001\003\022P\n\016target_renders\030\026" + + " \003(\01322.google.cloud.deploy.v1.Release.Ta" + + "rgetRendersEntryB\004\342A\001\003\022I\n\tcondition\030\030 \001(" + + "\01320.google.cloud.deploy.v1.Release.Relea" + + "seConditionB\004\342A\001\003\022V\n\021deploy_parameters\030\031" + + " \003(\01325.google.cloud.deploy.v1.Release.De" + + "ployParametersEntryB\004\342A\001\001\032\220\005\n\014TargetRend" + + "er\022A\n\017rendering_build\030\001 \001(\tB(\342A\001\003\372A!\n\037cl" + + "oudbuild.googleapis.com/Build\022]\n\017renderi" + + "ng_state\030\002 \001(\0162>.google.cloud.deploy.v1." + + "Release.TargetRender.TargetRenderStateB\004" + + "\342A\001\003\022>\n\010metadata\030\006 \001(\0132&.google.cloud.de" + + "ploy.v1.RenderMetadataB\004\342A\001\003\022V\n\rfailure_" + + "cause\030\004 \001(\01629.google.cloud.deploy.v1.Rel" + + "ease.TargetRender.FailureCauseB\004\342A\001\003\022\035\n\017" + + "failure_message\030\005 \001(\tB\004\342A\001\003\"d\n\021TargetRen" + + "derState\022#\n\037TARGET_RENDER_STATE_UNSPECIF" + + "IED\020\000\022\r\n\tSUCCEEDED\020\001\022\n\n\006FAILED\020\002\022\017\n\013IN_P" + + "ROGRESS\020\003\"\300\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\036\n\032CLOUD_BU" + + "ILD_REQUEST_FAILED\020\003\022!\n\035VERIFICATION_CON" + + "FIG_NOT_FOUND\020\004\022\033\n\027CUSTOM_ACTION_NOT_FOU" + + "ND\020\005\032\'\n\025ReleaseReadyCondition\022\016\n\006status\030" + + "\001 \001(\010\032\362\001\n\032SkaffoldSupportedCondition\022\016\n\006" + + "status\030\001 \001(\010\022L\n\026skaffold_support_state\030\002" + + " \001(\0162,.google.cloud.deploy.v1.SkaffoldSu" + + "pportState\0229\n\025maintenance_mode_time\030\003 \001(" + + "\0132\032.google.protobuf.Timestamp\022;\n\027support" + + "_expiration_time\030\004 \001(\0132\032.google.protobuf" + + ".Timestamp\032\314\001\n\020ReleaseCondition\022V\n\027relea" + + "se_ready_condition\030\001 \001(\01325.google.cloud." + + "deploy.v1.Release.ReleaseReadyCondition\022" + + "`\n\034skaffold_supported_condition\030\002 \001(\0132:." + + "google.cloud.deploy.v1.Release.SkaffoldS" + + "upportedCondition\0322\n\020AnnotationsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032-\n\013LabelsE" + + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032^\n\024" + + "TargetArtifactsEntry\022\013\n\003key\030\001 \001(\t\0225\n\005val" + + "ue\030\002 \001(\0132&.google.cloud.deploy.v1.Target" + + "Artifact:\0028\001\032b\n\022TargetRendersEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022;\n\005value\030\002 \001(\0132,.google.cloud.de" + + "ploy.v1.Release.TargetRender:\0028\001\0327\n\025Depl" + + "oyParametersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\001\"W\n\013RenderState\022\034\n\030RENDER_STATE" + "_UNSPECIFIED\020\000\022\r\n\tSUCCEEDED\020\001\022\n\n\006FAILED\020" - + "\002\022\017\n\013IN_PROGRESS\020\003\"\235\001\n\014FailureCause\022\035\n\031F" - + "AILURE_CAUSE_UNSPECIFIED\020\000\022\033\n\027CLOUD_BUIL" - + "D_UNAVAILABLE\020\001\022\024\n\020EXECUTION_FAILED\020\002\022\036\n" - + "\032CLOUD_BUILD_REQUEST_FAILED\020\003\022\033\n\027CUSTOM_" - + "ACTION_NOT_FOUND\020\005\032\'\n\025ReleaseReadyCondit" - + "ion\022\016\n\006status\030\001 \001(\010\032\362\001\n\032SkaffoldSupporte" - + "dCondition\022\016\n\006status\030\001 \001(\010\022L\n\026skaffold_s" - + "upport_state\030\002 \001(\0162,.google.cloud.deploy" - + ".v1.SkaffoldSupportState\0229\n\025maintenance_" - + "mode_time\030\003 \001(\0132\032.google.protobuf.Timest" - + "amp\022;\n\027support_expiration_time\030\004 \001(\0132\032.g" - + "oogle.protobuf.Timestamp\032\314\001\n\020ReleaseCond" - + "ition\022V\n\027release_ready_condition\030\001 \001(\01325" - + ".google.cloud.deploy.v1.Release.ReleaseR" - + "eadyCondition\022`\n\034skaffold_supported_cond" - + "ition\030\002 \001(\0132:.google.cloud.deploy.v1.Rel" - + "ease.SkaffoldSupportedCondition\0322\n\020Annot" - + "ationsEntry\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\032^\n\024TargetArtifactsEntry\022\013\n\003ke" - + "y\030\001 \001(\t\0225\n\005value\030\002 \001(\0132&.google.cloud.de" - + "ploy.v1.TargetArtifact:\0028\001\032b\n\022TargetRend" - + "ersEntry\022\013\n\003key\030\001 \001(\t\022;\n\005value\030\002 \001(\0132,.g" - + "oogle.cloud.deploy.v1.Release.TargetRend" - + "er:\0028\001\0327\n\025DeployParametersEntry\022\013\n\003key\030\001" - + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"W\n\013RenderState\022\034" - + "\n\030RENDER_STATE_UNSPECIFIED\020\000\022\r\n\tSUCCEEDE" - + "D\020\001\022\n\n\006FAILED\020\002\022\017\n\013IN_PROGRESS\020\003:\212\001\352A\206\001\n" - + "\"clouddeploy.googleapis.com/Release\022`pro" + + "\002\022\017\n\013IN_PROGRESS\020\003:\212\001\352A\206\001\n\"clouddeploy.g" + + "oogleapis.com/Release\022`projects/{project" + + "}/locations/{location}/deliveryPipelines" + + "/{delivery_pipeline}/releases/{release}\"" + + "+\n\rBuildArtifact\022\r\n\005image\030\003 \001(\t\022\013\n\003tag\030\002" + + " \001(\t\"\262\003\n\016TargetArtifact\022\034\n\014artifact_uri\030" + + "\004 \001(\tB\004\342A\001\003H\000\022\"\n\024skaffold_config_path\030\002 " + + "\001(\tB\004\342A\001\003\022\033\n\rmanifest_path\030\003 \001(\tB\004\342A\001\003\022Y" + + "\n\017phase_artifacts\030\005 \003(\0132:.google.cloud.d" + + "eploy.v1.TargetArtifact.PhaseArtifactsEn" + + "tryB\004\342A\001\003\032r\n\rPhaseArtifact\022\"\n\024skaffold_c" + + "onfig_path\030\001 \001(\tB\004\342A\001\003\022\033\n\rmanifest_path\030" + + "\003 \001(\tB\004\342A\001\003\022 \n\022job_manifests_path\030\004 \001(\tB" + + "\004\342A\001\003\032k\n\023PhaseArtifactsEntry\022\013\n\003key\030\001 \001(" + + "\t\022C\n\005value\030\002 \001(\01324.google.cloud.deploy.v" + + "1.TargetArtifact.PhaseArtifact:\0028\001B\005\n\003ur" + + "i\"J\n\016DeployArtifact\022\032\n\014artifact_uri\030\001 \001(" + + "\tB\004\342A\001\003\022\034\n\016manifest_paths\030\002 \003(\tB\004\342A\001\003\"N\n" + + "\026CloudRunRenderMetadata\0224\n\007service\030\001 \001(\t" + + "B#\342A\001\003\372A\034\n\032run.googleapis.com/Service\"Y\n" + + "\016RenderMetadata\022G\n\tcloud_run\030\001 \001(\0132..goo" + + "gle.cloud.deploy.v1.CloudRunRenderMetada" + + "taB\004\342A\001\003\"\274\001\n\023ListReleasesRequest\022D\n\006pare" + + "nt\030\001 \001(\tB4\342A\001\002\372A-\n+clouddeploy.googleapi" + + "s.com/DeliveryPipeline\022\027\n\tpage_size\030\002 \001(" + + "\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\022\024\n\006fil" + + "ter\030\004 \001(\tB\004\342A\001\001\022\026\n\010order_by\030\005 \001(\tB\004\342A\001\001\"" + + "w\n\024ListReleasesResponse\0221\n\010releases\030\001 \003(" + + "\0132\037.google.cloud.deploy.v1.Release\022\027\n\017ne" + + "xt_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t" + + "\"N\n\021GetReleaseRequest\0229\n\004name\030\001 \001(\tB+\342A\001" + + "\002\372A$\n\"clouddeploy.googleapis.com/Release" + + "\"\345\001\n\024CreateReleaseRequest\022D\n\006parent\030\001 \001(" + + "\tB4\342A\001\002\372A-\n+clouddeploy.googleapis.com/D" + + "eliveryPipeline\022\030\n\nrelease_id\030\002 \001(\tB\004\342A\001" + + "\002\0226\n\007release\030\003 \001(\0132\037.google.cloud.deploy" + + ".v1.ReleaseB\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(\tB\004\342" + + "A\001\001\022\033\n\rvalidate_only\030\005 \001(\010B\004\342A\001\001\"\325\016\n\007Rol" + + "lout\022\022\n\004name\030\001 \001(\tB\004\342A\001\001\022\021\n\003uid\030\002 \001(\tB\004\342" + + "A\001\003\022\023\n\013description\030\003 \001(\t\022E\n\013annotations\030" + + "\004 \003(\01320.google.cloud.deploy.v1.Rollout.A" + + "nnotationsEntry\022;\n\006labels\030\005 \003(\0132+.google" + + ".cloud.deploy.v1.Rollout.LabelsEntry\0225\n\013" + + "create_time\030\006 \001(\0132\032.google.protobuf.Time" + + "stampB\004\342A\001\003\0226\n\014approve_time\030\007 \001(\0132\032.goog" + + "le.protobuf.TimestampB\004\342A\001\003\0226\n\014enqueue_t" + + "ime\030\010 \001(\0132\032.google.protobuf.TimestampB\004\342" + + "A\001\003\022;\n\021deploy_start_time\030\t \001(\0132\032.google." + + "protobuf.TimestampB\004\342A\001\003\0229\n\017deploy_end_t" + + "ime\030\n \001(\0132\032.google.protobuf.TimestampB\004\342" + + "A\001\003\022\027\n\ttarget_id\030\022 \001(\tB\004\342A\001\002\022K\n\016approval" + + "_state\030\014 \001(\0162-.google.cloud.deploy.v1.Ro" + + "llout.ApprovalStateB\004\342A\001\003\022:\n\005state\030\r \001(\016" + + "2%.google.cloud.deploy.v1.Rollout.StateB" + + "\004\342A\001\003\022\034\n\016failure_reason\030\016 \001(\tB\004\342A\001\003\022A\n\017d" + + "eploying_build\030\021 \001(\tB(\342A\001\003\372A!\n\037cloudbuil" + + "d.googleapis.com/Build\022\014\n\004etag\030\020 \001(\t\022P\n\024" + + "deploy_failure_cause\030\023 \001(\0162,.google.clou" + + "d.deploy.v1.Rollout.FailureCauseB\004\342A\001\003\0223" + + "\n\006phases\030\027 \003(\0132\035.google.cloud.deploy.v1." + + "PhaseB\004\342A\001\003\0228\n\010metadata\030\030 \001(\0132 .google.c" + + "loud.deploy.v1.MetadataB\004\342A\001\003\022 \n\022control" + + "ler_rollout\030\031 \001(\tB\004\342A\001\003\022!\n\023rollback_of_r" + + "ollout\030\032 \001(\tB\004\342A\001\003\022%\n\027rolled_back_by_rol" + + "louts\030\033 \003(\tB\004\342A\001\003\0322\n\020AnnotationsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032-\n\013LabelsE" + + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"{\n\r" + + "ApprovalState\022\036\n\032APPROVAL_STATE_UNSPECIF" + + "IED\020\000\022\022\n\016NEEDS_APPROVAL\020\001\022\032\n\026DOES_NOT_NE" + + "ED_APPROVAL\020\002\022\014\n\010APPROVED\020\003\022\014\n\010REJECTED\020" + + "\004\"\304\001\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\r\n\tSU" + + "CCEEDED\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\021APPROVAL_REJECTE" + + "D\020\005\022\013\n\007PENDING\020\006\022\023\n\017PENDING_RELEASE\020\007\022\016\n" + + "\nCANCELLING\020\010\022\r\n\tCANCELLED\020\t\022\n\n\006HALTED\020\n" + + "\"\345\001\n\014FailureCause\022\035\n\031FAILURE_CAUSE_UNSPE" + + "CIFIED\020\000\022\033\n\027CLOUD_BUILD_UNAVAILABLE\020\001\022\024\n" + + "\020EXECUTION_FAILED\020\002\022\025\n\021DEADLINE_EXCEEDED" + + "\020\003\022\022\n\016RELEASE_FAILED\020\004\022\025\n\021RELEASE_ABANDO" + + "NED\020\005\022!\n\035VERIFICATION_CONFIG_NOT_FOUND\020\006" + + "\022\036\n\032CLOUD_BUILD_REQUEST_FAILED\020\007:\235\001\352A\231\001\n" + + "\"clouddeploy.googleapis.com/Rollout\022spro" + "jects/{project}/locations/{location}/del" + "iveryPipelines/{delivery_pipeline}/relea" - + "ses/{release}\"+\n\rBuildArtifact\022\r\n\005image\030" - + "\003 \001(\t\022\013\n\003tag\030\002 \001(\t\"\262\003\n\016TargetArtifact\022\034\n" - + "\014artifact_uri\030\004 \001(\tB\004\342A\001\003H\000\022\"\n\024skaffold_" - + "config_path\030\002 \001(\tB\004\342A\001\003\022\033\n\rmanifest_path" - + "\030\003 \001(\tB\004\342A\001\003\022Y\n\017phase_artifacts\030\005 \003(\0132:." - + "google.cloud.deploy.v1.TargetArtifact.Ph" - + "aseArtifactsEntryB\004\342A\001\003\032r\n\rPhaseArtifact" - + "\022\"\n\024skaffold_config_path\030\001 \001(\tB\004\342A\001\003\022\033\n\r" - + "manifest_path\030\003 \001(\tB\004\342A\001\003\022 \n\022job_manifes" - + "ts_path\030\004 \001(\tB\004\342A\001\003\032k\n\023PhaseArtifactsEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022C\n\005value\030\002 \001(\01324.google." - + "cloud.deploy.v1.TargetArtifact.PhaseArti" - + "fact:\0028\001B\005\n\003uri\"J\n\016DeployArtifact\022\032\n\014art" - + "ifact_uri\030\001 \001(\tB\004\342A\001\003\022\034\n\016manifest_paths\030" - + "\002 \003(\tB\004\342A\001\003\"N\n\026CloudRunRenderMetadata\0224\n" - + "\007service\030\001 \001(\tB#\342A\001\003\372A\034\n\032run.googleapis." - + "com/Service\"Y\n\016RenderMetadata\022G\n\tcloud_r" - + "un\030\001 \001(\0132..google.cloud.deploy.v1.CloudR" - + "unRenderMetadataB\004\342A\001\003\"\274\001\n\023ListReleasesR" - + "equest\022D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-\n+cloudde" - + "ploy.googleapis.com/DeliveryPipeline\022\027\n\t" - + "page_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(" - + "\tB\004\342A\001\001\022\024\n\006filter\030\004 \001(\tB\004\342A\001\001\022\026\n\010order_b" - + "y\030\005 \001(\tB\004\342A\001\001\"w\n\024ListReleasesResponse\0221\n" - + "\010releases\030\001 \003(\0132\037.google.cloud.deploy.v1" - + ".Release\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unr" - + "eachable\030\003 \003(\t\"N\n\021GetReleaseRequest\0229\n\004n" - + "ame\030\001 \001(\tB+\342A\001\002\372A$\n\"clouddeploy.googleap" - + "is.com/Release\"\345\001\n\024CreateReleaseRequest\022" - + "D\n\006parent\030\001 \001(\tB4\342A\001\002\372A-\n+clouddeploy.go" - + "ogleapis.com/DeliveryPipeline\022\030\n\nrelease" - + "_id\030\002 \001(\tB\004\342A\001\002\0226\n\007release\030\003 \001(\0132\037.googl" - + "e.cloud.deploy.v1.ReleaseB\004\342A\001\002\022\030\n\nreque" - + "st_id\030\004 \001(\tB\004\342A\001\001\022\033\n\rvalidate_only\030\005 \001(\010" - + "B\004\342A\001\001\"\213\016\n\007Rollout\022\022\n\004name\030\001 \001(\tB\004\342A\001\001\022\021" - + "\n\003uid\030\002 \001(\tB\004\342A\001\003\022\023\n\013description\030\003 \001(\t\022E" - + "\n\013annotations\030\004 \003(\01320.google.cloud.deplo" - + "y.v1.Rollout.AnnotationsEntry\022;\n\006labels\030" - + "\005 \003(\0132+.google.cloud.deploy.v1.Rollout.L" - + "abelsEntry\0225\n\013create_time\030\006 \001(\0132\032.google" - + ".protobuf.TimestampB\004\342A\001\003\0226\n\014approve_tim" - + "e\030\007 \001(\0132\032.google.protobuf.TimestampB\004\342A\001" - + "\003\0226\n\014enqueue_time\030\010 \001(\0132\032.google.protobu" - + "f.TimestampB\004\342A\001\003\022;\n\021deploy_start_time\030\t" - + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\0229" - + "\n\017deploy_end_time\030\n \001(\0132\032.google.protobu" - + "f.TimestampB\004\342A\001\003\022\027\n\ttarget_id\030\022 \001(\tB\004\342A" - + "\001\002\022K\n\016approval_state\030\014 \001(\0162-.google.clou" - + "d.deploy.v1.Rollout.ApprovalStateB\004\342A\001\003\022" - + ":\n\005state\030\r \001(\0162%.google.cloud.deploy.v1." - + "Rollout.StateB\004\342A\001\003\022\034\n\016failure_reason\030\016 " - + "\001(\tB\004\342A\001\003\022A\n\017deploying_build\030\021 \001(\tB(\342A\001\003" - + "\372A!\n\037cloudbuild.googleapis.com/Build\022\014\n\004" - + "etag\030\020 \001(\t\022P\n\024deploy_failure_cause\030\023 \001(\016" - + "2,.google.cloud.deploy.v1.Rollout.Failur" - + "eCauseB\004\342A\001\003\0223\n\006phases\030\027 \003(\0132\035.google.cl" - + "oud.deploy.v1.PhaseB\004\342A\001\003\0228\n\010metadata\030\030 " - + "\001(\0132 .google.cloud.deploy.v1.MetadataB\004\342" - + "A\001\003\022 \n\022controller_rollout\030\031 \001(\tB\004\342A\001\003\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\"{\n\rApprovalState\022\036\n\032APP" - + "ROVAL_STATE_UNSPECIFIED\020\000\022\022\n\016NEEDS_APPRO" - + "VAL\020\001\022\032\n\026DOES_NOT_NEED_APPROVAL\020\002\022\014\n\010APP" - + "ROVED\020\003\022\014\n\010REJECTED\020\004\"\304\001\n\005State\022\025\n\021STATE" - + "_UNSPECIFIED\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\021APPROVAL_REJECTED\020\005\022\013\n\007PENDING\020\006\022\023\n\017" - + "PENDING_RELEASE\020\007\022\016\n\nCANCELLING\020\010\022\r\n\tCAN" - + "CELLED\020\t\022\n\n\006HALTED\020\n\"\345\001\n\014FailureCause\022\035\n" - + "\031FAILURE_CAUSE_UNSPECIFIED\020\000\022\033\n\027CLOUD_BU" - + "ILD_UNAVAILABLE\020\001\022\024\n\020EXECUTION_FAILED\020\002\022" - + "\025\n\021DEADLINE_EXCEEDED\020\003\022\022\n\016RELEASE_FAILED" - + "\020\004\022\025\n\021RELEASE_ABANDONED\020\005\022!\n\035VERIFICATIO" - + "N_CONFIG_NOT_FOUND\020\006\022\036\n\032CLOUD_BUILD_REQU" - + "EST_FAILED\020\007:\235\001\352A\231\001\n\"clouddeploy.googlea" - + "pis.com/Rollout\022sprojects/{project}/loca" - + "tions/{location}/deliveryPipelines/{deli" - + "very_pipeline}/releases/{release}/rollou" - + "ts/{rollout}\"M\n\010Metadata\022A\n\tcloud_run\030\001 " - + "\001(\0132(.google.cloud.deploy.v1.CloudRunMet" - + "adataB\004\342A\001\003\"Y\n\024DeployJobRunMetadata\022A\n\tc" - + "loud_run\030\001 \001(\0132(.google.cloud.deploy.v1." - + "CloudRunMetadataB\004\342A\001\003\"|\n\020CloudRunMetada" - + "ta\0224\n\007service\030\001 \001(\tB#\342A\001\003\372A\034\n\032run.google" - + "apis.com/Service\022\032\n\014service_urls\030\002 \003(\tB\004" - + "\342A\001\003\022\026\n\010revision\030\003 \001(\tB\004\342A\001\003\"\201\003\n\005Phase\022\020" - + "\n\002id\030\001 \001(\tB\004\342A\001\003\0228\n\005state\030\003 \001(\0162#.google" - + ".cloud.deploy.v1.Phase.StateB\004\342A\001\003\022\032\n\014sk" - + "ip_message\030\006 \001(\tB\004\342A\001\003\022G\n\017deployment_job" - + "s\030\004 \001(\0132&.google.cloud.deploy.v1.Deploym" - + "entJobsB\004\342A\001\003H\000\022L\n\022child_rollout_jobs\030\005 " - + "\001(\0132(.google.cloud.deploy.v1.ChildRollou" - + "tJobsB\004\342A\001\003H\000\"q\n\005State\022\025\n\021STATE_UNSPECIF" - + "IED\020\000\022\013\n\007PENDING\020\001\022\017\n\013IN_PROGRESS\020\002\022\r\n\tS" - + "UCCEEDED\020\003\022\n\n\006FAILED\020\004\022\013\n\007ABORTED\020\005\022\013\n\007S" - + "KIPPED\020\006B\006\n\004jobs\"\363\001\n\016DeploymentJobs\0225\n\nd" - + "eploy_job\030\001 \001(\0132\033.google.cloud.deploy.v1" - + ".JobB\004\342A\001\003\0225\n\nverify_job\030\002 \001(\0132\033.google." - + "cloud.deploy.v1.JobB\004\342A\001\003\0228\n\rpredeploy_j" - + "ob\030\003 \001(\0132\033.google.cloud.deploy.v1.JobB\004\342" - + "A\001\003\0229\n\016postdeploy_job\030\004 \001(\0132\033.google.clo" - + "ud.deploy.v1.JobB\004\342A\001\003\"\223\001\n\020ChildRolloutJ" - + "obs\022>\n\023create_rollout_jobs\030\001 \003(\0132\033.googl" - + "e.cloud.deploy.v1.JobB\004\342A\001\003\022?\n\024advance_r" - + "ollout_jobs\030\002 \003(\0132\033.google.cloud.deploy." - + "v1.JobB\004\342A\001\003\"\201\006\n\003Job\022\020\n\002id\030\001 \001(\tB\004\342A\001\003\0226" - + "\n\005state\030\002 \001(\0162!.google.cloud.deploy.v1.J" - + "ob.StateB\004\342A\001\003\022\032\n\014skip_message\030\010 \001(\tB\004\342A" - + "\001\003\022;\n\007job_run\030\003 \001(\tB*\342A\001\003\372A#\n!clouddeplo" - + "y.googleapis.com/JobRun\022=\n\ndeploy_job\030\004 " - + "\001(\0132!.google.cloud.deploy.v1.DeployJobB\004" - + "\342A\001\003H\000\022=\n\nverify_job\030\005 \001(\0132!.google.clou" - + "d.deploy.v1.VerifyJobB\004\342A\001\003H\000\022C\n\rpredepl" - + "oy_job\030\t \001(\0132$.google.cloud.deploy.v1.Pr" - + "edeployJobB\004\342A\001\003H\000\022E\n\016postdeploy_job\030\n \001" - + "(\0132%.google.cloud.deploy.v1.PostdeployJo" - + "bB\004\342A\001\003H\000\022W\n\030create_child_rollout_job\030\006 ", - "\001(\0132-.google.cloud.deploy.v1.CreateChild" - + "RolloutJobB\004\342A\001\003H\000\022Y\n\031advance_child_roll" - + "out_job\030\007 \001(\0132..google.cloud.deploy.v1.A" - + "dvanceChildRolloutJobB\004\342A\001\003H\000\"\214\001\n\005State\022" - + "\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007PENDING\020\001\022\014\n\010D" - + "ISABLED\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\006\022\013\n\007SKIPPED\020\007\022" - + "\013\n\007IGNORED\020\010B\n\n\010job_type\"\013\n\tDeployJob\"\013\n" - + "\tVerifyJob\"%\n\014PredeployJob\022\025\n\007actions\030\001 " - + "\003(\tB\004\342A\001\003\"&\n\rPostdeployJob\022\025\n\007actions\030\001 " - + "\003(\tB\004\342A\001\003\"\027\n\025CreateChildRolloutJob\"\030\n\026Ad" - + "vanceChildRolloutJob\"\263\001\n\023ListRolloutsReq" - + "uest\022;\n\006parent\030\001 \001(\tB+\342A\001\002\372A$\n\"clouddepl" - + "oy.googleapis.com/Release\022\027\n\tpage_size\030\002" - + " \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\022\024\n\006" - + "filter\030\004 \001(\tB\004\342A\001\001\022\026\n\010order_by\030\005 \001(\tB\004\342A" - + "\001\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\013unreachable\030\003 " - + "\003(\t\"N\n\021GetRolloutRequest\0229\n\004name\030\001 \001(\tB+" - + "\342A\001\002\372A$\n\"clouddeploy.googleapis.com/Roll" - + "out\"\375\001\n\024CreateRolloutRequest\022;\n\006parent\030\001" - + " \001(\tB+\342A\001\002\372A$\n\"clouddeploy.googleapis.co" - + "m/Release\022\030\n\nrollout_id\030\002 \001(\tB\004\342A\001\002\0226\n\007r" - + "ollout\030\003 \001(\0132\037.google.cloud.deploy.v1.Ro" - + "lloutB\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\022\033\n" - + "\rvalidate_only\030\005 \001(\010B\004\342A\001\001\022\037\n\021starting_p" - + "hase_id\030\007 \001(\tB\004\342A\001\001\"\207\002\n\021OperationMetadat" - + "a\0225\n\013create_time\030\001 \001(\0132\032.google.protobuf" - + ".TimestampB\004\342A\001\003\0222\n\010end_time\030\002 \001(\0132\032.goo" - + "gle.protobuf.TimestampB\004\342A\001\003\022\024\n\006target\030\003" - + " \001(\tB\004\342A\001\003\022\022\n\004verb\030\004 \001(\tB\004\342A\001\003\022\034\n\016status" - + "_message\030\005 \001(\tB\004\342A\001\003\022$\n\026requested_cancel" - + "lation\030\006 \001(\010B\004\342A\001\003\022\031\n\013api_version\030\007 \001(\tB" - + "\004\342A\001\003\"j\n\025ApproveRolloutRequest\0229\n\004name\030\001" - + " \001(\tB+\342A\001\002\372A$\n\"clouddeploy.googleapis.co" - + "m/Rollout\022\026\n\010approved\030\002 \001(\010B\004\342A\001\002\"\030\n\026App" - + "roveRolloutResponse\"j\n\025AdvanceRolloutReq" - + "uest\0229\n\004name\030\001 \001(\tB+\342A\001\002\372A$\n\"clouddeploy" - + ".googleapis.com/Rollout\022\026\n\010phase_id\030\002 \001(" - + "\tB\004\342A\001\002\"\030\n\026AdvanceRolloutResponse\"Q\n\024Can" - + "celRolloutRequest\0229\n\004name\030\001 \001(\tB+\342A\001\002\372A$" - + "\n\"clouddeploy.googleapis.com/Rollout\"\027\n\025" - + "CancelRolloutResponse\"~\n\020IgnoreJobReques" - + "t\022<\n\007rollout\030\001 \001(\tB+\342A\001\002\372A$\n\"clouddeploy" - + ".googleapis.com/Rollout\022\026\n\010phase_id\030\002 \001(" - + "\tB\004\342A\001\002\022\024\n\006job_id\030\003 \001(\tB\004\342A\001\002\"\023\n\021IgnoreJ" - + "obResponse\"}\n\017RetryJobRequest\022<\n\007rollout" + + "ses/{release}/rollouts/{rollout}\"\232\001\n\010Met" + + "adata\022A\n\tcloud_run\030\001 \001(\0132(.google.cloud." + + "deploy.v1.CloudRunMetadataB\004\342A\001\003\022K\n\nauto" + + "mation\030\002 \001(\01321.google.cloud.deploy.v1.Au" + + "tomationRolloutMetadataB\004\342A\001\003\"Y\n\024DeployJ" + + "obRunMetadata\022A\n\tcloud_run\030\001 \001(\0132(.googl" + + "e.cloud.deploy.v1.CloudRunMetadataB\004\342A\001\003" + + "\"\252\001\n\020CloudRunMetadata\0224\n\007service\030\001 \001(\tB#" + + "\342A\001\003\372A\034\n\032run.googleapis.com/Service\022\032\n\014s" + + "ervice_urls\030\002 \003(\tB\004\342A\001\003\022\026\n\010revision\030\003 \001(" + + "\tB\004\342A\001\003\022,\n\003job\030\004 \001(\tB\037\342A\001\003\372A\030\n\026run.googl" + + "eapis.com/Job\"\216\001\n\031AutomationRolloutMetad" + + "ata\022$\n\026promote_automation_run\030\001 \001(\tB\004\342A\001" + + "\003\022%\n\027advance_automation_runs\030\002 \003(\tB\004\342A\001\003" + + "\022$\n\026repair_automation_runs\030\003 \003(\tB\004\342A\001\003\"\201" + + "\003\n\005Phase\022\020\n\002id\030\001 \001(\tB\004\342A\001\003\0228\n\005state\030\003 \001(" + + "\0162#.google.cloud.deploy.v1.Phase.StateB\004" + + "\342A\001\003\022\032\n\014skip_message\030\006 \001(\tB\004\342A\001\003\022G\n\017depl" + + "oyment_jobs\030\004 \001(\0132&.google.cloud.deploy." + + "v1.DeploymentJobsB\004\342A\001\003H\000\022L\n\022child_rollo", + "ut_jobs\030\005 \001(\0132(.google.cloud.deploy.v1.C" + + "hildRolloutJobsB\004\342A\001\003H\000\"q\n\005State\022\025\n\021STAT" + + "E_UNSPECIFIED\020\000\022\013\n\007PENDING\020\001\022\017\n\013IN_PROGR" + + "ESS\020\002\022\r\n\tSUCCEEDED\020\003\022\n\n\006FAILED\020\004\022\013\n\007ABOR" + + "TED\020\005\022\013\n\007SKIPPED\020\006B\006\n\004jobs\"\363\001\n\016Deploymen" + + "tJobs\0225\n\ndeploy_job\030\001 \001(\0132\033.google.cloud" + + ".deploy.v1.JobB\004\342A\001\003\0225\n\nverify_job\030\002 \001(\013" + + "2\033.google.cloud.deploy.v1.JobB\004\342A\001\003\0228\n\rp" + + "redeploy_job\030\003 \001(\0132\033.google.cloud.deploy" + + ".v1.JobB\004\342A\001\003\0229\n\016postdeploy_job\030\004 \001(\0132\033." + + "google.cloud.deploy.v1.JobB\004\342A\001\003\"\223\001\n\020Chi" + + "ldRolloutJobs\022>\n\023create_rollout_jobs\030\001 \003" + + "(\0132\033.google.cloud.deploy.v1.JobB\004\342A\001\003\022?\n" + + "\024advance_rollout_jobs\030\002 \003(\0132\033.google.clo" + + "ud.deploy.v1.JobB\004\342A\001\003\"\201\006\n\003Job\022\020\n\002id\030\001 \001" + + "(\tB\004\342A\001\003\0226\n\005state\030\002 \001(\0162!.google.cloud.d" + + "eploy.v1.Job.StateB\004\342A\001\003\022\032\n\014skip_message" + + "\030\010 \001(\tB\004\342A\001\003\022;\n\007job_run\030\003 \001(\tB*\342A\001\003\372A#\n!" + + "clouddeploy.googleapis.com/JobRun\022=\n\ndep" + + "loy_job\030\004 \001(\0132!.google.cloud.deploy.v1.D" + + "eployJobB\004\342A\001\003H\000\022=\n\nverify_job\030\005 \001(\0132!.g" + + "oogle.cloud.deploy.v1.VerifyJobB\004\342A\001\003H\000\022" + + "C\n\rpredeploy_job\030\t \001(\0132$.google.cloud.de" + + "ploy.v1.PredeployJobB\004\342A\001\003H\000\022E\n\016postdepl" + + "oy_job\030\n \001(\0132%.google.cloud.deploy.v1.Po" + + "stdeployJobB\004\342A\001\003H\000\022W\n\030create_child_roll" + + "out_job\030\006 \001(\0132-.google.cloud.deploy.v1.C" + + "reateChildRolloutJobB\004\342A\001\003H\000\022Y\n\031advance_" + + "child_rollout_job\030\007 \001(\0132..google.cloud.d" + + "eploy.v1.AdvanceChildRolloutJobB\004\342A\001\003H\000\"" + + "\214\001\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007PEND" + + "ING\020\001\022\014\n\010DISABLED\020\002\022\017\n\013IN_PROGRESS\020\003\022\r\n\t" + + "SUCCEEDED\020\004\022\n\n\006FAILED\020\005\022\013\n\007ABORTED\020\006\022\013\n\007" + + "SKIPPED\020\007\022\013\n\007IGNORED\020\010B\n\n\010job_type\"\013\n\tDe" + + "ployJob\"\013\n\tVerifyJob\"%\n\014PredeployJob\022\025\n\007" + + "actions\030\001 \003(\tB\004\342A\001\003\"&\n\rPostdeployJob\022\025\n\007" + + "actions\030\001 \003(\tB\004\342A\001\003\"\027\n\025CreateChildRollou" + + "tJob\"\030\n\026AdvanceChildRolloutJob\"\263\001\n\023ListR" + + "olloutsRequest\022;\n\006parent\030\001 \001(\tB+\342A\001\002\372A$\n" + + "\"clouddeploy.googleapis.com/Release\022\027\n\tp" + + "age_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\t" + + "B\004\342A\001\001\022\024\n\006filter\030\004 \001(\tB\004\342A\001\001\022\026\n\010order_by" + + "\030\005 \001(\tB\004\342A\001\001\"w\n\024ListRolloutsResponse\0221\n\010" + + "rollouts\030\001 \003(\0132\037.google.cloud.deploy.v1." + + "Rollout\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unre" + + "achable\030\003 \003(\t\"N\n\021GetRolloutRequest\0229\n\004na" + + "me\030\001 \001(\tB+\342A\001\002\372A$\n\"clouddeploy.googleapi" + + "s.com/Rollout\"\375\001\n\024CreateRolloutRequest\022;" + + "\n\006parent\030\001 \001(\tB+\342A\001\002\372A$\n\"clouddeploy.goo" + + "gleapis.com/Release\022\030\n\nrollout_id\030\002 \001(\tB" + + "\004\342A\001\002\0226\n\007rollout\030\003 \001(\0132\037.google.cloud.de" + + "ploy.v1.RolloutB\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(" + + "\tB\004\342A\001\001\022\033\n\rvalidate_only\030\005 \001(\010B\004\342A\001\001\022\037\n\021" + + "starting_phase_id\030\007 \001(\tB\004\342A\001\001\"\207\002\n\021Operat" + + "ionMetadata\0225\n\013create_time\030\001 \001(\0132\032.googl" + + "e.protobuf.TimestampB\004\342A\001\003\0222\n\010end_time\030\002" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\022\024" + + "\n\006target\030\003 \001(\tB\004\342A\001\003\022\022\n\004verb\030\004 \001(\tB\004\342A\001\003" + + "\022\034\n\016status_message\030\005 \001(\tB\004\342A\001\003\022$\n\026reques" + + "ted_cancellation\030\006 \001(\010B\004\342A\001\003\022\031\n\013api_vers" + + "ion\030\007 \001(\tB\004\342A\001\003\"j\n\025ApproveRolloutRequest" + + "\0229\n\004name\030\001 \001(\tB+\342A\001\002\372A$\n\"clouddeploy.goo" + + "gleapis.com/Rollout\022\026\n\010approved\030\002 \001(\010B\004\342" + + "A\001\002\"\030\n\026ApproveRolloutResponse\"j\n\025Advance" + + "RolloutRequest\0229\n\004name\030\001 \001(\tB+\342A\001\002\372A$\n\"c" + + "louddeploy.googleapis.com/Rollout\022\026\n\010pha" + + "se_id\030\002 \001(\tB\004\342A\001\002\"\030\n\026AdvanceRolloutRespo" + + "nse\"Q\n\024CancelRolloutRequest\0229\n\004name\030\001 \001(" + + "\tB+\342A\001\002\372A$\n\"clouddeploy.googleapis.com/R" + + "ollout\"\027\n\025CancelRolloutResponse\"~\n\020Ignor" + + "eJobRequest\022<\n\007rollout\030\001 \001(\tB+\342A\001\002\372A$\n\"c" + + "louddeploy.googleapis.com/Rollout\022\026\n\010pha" + + "se_id\030\002 \001(\tB\004\342A\001\002\022\024\n\006job_id\030\003 \001(\tB\004\342A\001\002\"" + + "\023\n\021IgnoreJobResponse\"}\n\017RetryJobRequest\022" + + "<\n\007rollout\030\001 \001(\tB+\342A\001\002\372A$\n\"clouddeploy.g" + + "oogleapis.com/Rollout\022\026\n\010phase_id\030\002 \001(\tB" + + "\004\342A\001\002\022\024\n\006job_id\030\003 \001(\tB\004\342A\001\002\"\022\n\020RetryJobR" + + "esponse\"R\n\025AbandonReleaseRequest\0229\n\004name" + "\030\001 \001(\tB+\342A\001\002\372A$\n\"clouddeploy.googleapis." - + "com/Rollout\022\026\n\010phase_id\030\002 \001(\tB\004\342A\001\002\022\024\n\006j" - + "ob_id\030\003 \001(\tB\004\342A\001\002\"\022\n\020RetryJobResponse\"R\n" - + "\025AbandonReleaseRequest\0229\n\004name\030\001 \001(\tB+\342A" - + "\001\002\372A$\n\"clouddeploy.googleapis.com/Releas" - + "e\"\030\n\026AbandonReleaseResponse\"\337\010\n\006JobRun\022\022" - + "\n\004name\030\001 \001(\tB\004\342A\001\001\022\021\n\003uid\030\002 \001(\tB\004\342A\001\003\022\026\n" - + "\010phase_id\030\003 \001(\tB\004\342A\001\003\022\024\n\006job_id\030\004 \001(\tB\004\342" - + "A\001\003\0225\n\013create_time\030\005 \001(\0132\032.google.protob" - + "uf.TimestampB\004\342A\001\003\0224\n\nstart_time\030\006 \001(\0132\032" - + ".google.protobuf.TimestampB\004\342A\001\003\0222\n\010end_" - + "time\030\007 \001(\0132\032.google.protobuf.TimestampB\004" - + "\342A\001\003\0229\n\005state\030\010 \001(\0162$.google.cloud.deplo" - + "y.v1.JobRun.StateB\004\342A\001\003\022D\n\016deploy_job_ru" - + "n\030\t \001(\0132$.google.cloud.deploy.v1.DeployJ" - + "obRunB\004\342A\001\003H\000\022D\n\016verify_job_run\030\n \001(\0132$." - + "google.cloud.deploy.v1.VerifyJobRunB\004\342A\001" - + "\003H\000\022J\n\021predeploy_job_run\030\016 \001(\0132\'.google." - + "cloud.deploy.v1.PredeployJobRunB\004\342A\001\003H\000\022" - + "L\n\022postdeploy_job_run\030\017 \001(\0132(.google.clo" - + "ud.deploy.v1.PostdeployJobRunB\004\342A\001\003H\000\022^\n" - + "\034create_child_rollout_job_run\030\014 \001(\01320.go" - + "ogle.cloud.deploy.v1.CreateChildRolloutJ" - + "obRunB\004\342A\001\003H\000\022`\n\035advance_child_rollout_j" - + "ob_run\030\r \001(\01321.google.cloud.deploy.v1.Ad" - + "vanceChildRolloutJobRunB\004\342A\001\003H\000\022\022\n\004etag\030" - + "\013 \001(\tB\004\342A\001\003\"k\n\005State\022\025\n\021STATE_UNSPECIFIE" - + "D\020\000\022\017\n\013IN_PROGRESS\020\001\022\r\n\tSUCCEEDED\020\002\022\n\n\006F" - + "AILED\020\003\022\017\n\013TERMINATING\020\004\022\016\n\nTERMINATED\020\005" - + ":\257\001\352A\253\001\n!clouddeploy.googleapis.com/JobR" - + "un\022\205\001projects/{project}/locations/{locat" - + "ion}/deliveryPipelines/{delivery_pipelin" - + "e}/releases/{release}/rollouts/{rollout}" - + "/jobRuns/{job_run}B\t\n\007job_run\"\370\003\n\014Deploy" - + "JobRun\0227\n\005build\030\001 \001(\tB(\342A\001\003\372A!\n\037cloudbui" - + "ld.googleapis.com/Build\022N\n\rfailure_cause" - + "\030\002 \001(\01621.google.cloud.deploy.v1.DeployJo" - + "bRun.FailureCauseB\004\342A\001\003\022\035\n\017failure_messa" - + "ge\030\003 \001(\tB\004\342A\001\003\022D\n\010metadata\030\004 \001(\0132,.googl" - + "e.cloud.deploy.v1.DeployJobRunMetadataB\004" - + "\342A\001\003\022>\n\010artifact\030\005 \001(\0132&.google.cloud.de" - + "ploy.v1.DeployArtifactB\004\342A\001\003\"\271\001\n\014Failure" - + "Cause\022\035\n\031FAILURE_CAUSE_UNSPECIFIED\020\000\022\033\n\027" - + "CLOUD_BUILD_UNAVAILABLE\020\001\022\024\n\020EXECUTION_F" - + "AILED\020\002\022\025\n\021DEADLINE_EXCEEDED\020\003\022 \n\034MISSIN" - + "G_RESOURCES_FOR_CANARY\020\004\022\036\n\032CLOUD_BUILD_" - + "REQUEST_FAILED\020\005\"\255\003\n\014VerifyJobRun\0227\n\005bui" - + "ld\030\001 \001(\tB(\342A\001\003\372A!\n\037cloudbuild.googleapis" - + ".com/Build\022\032\n\014artifact_uri\030\002 \001(\tB\004\342A\001\003\022\034" - + "\n\016event_log_path\030\003 \001(\tB\004\342A\001\003\022N\n\rfailure_" - + "cause\030\004 \001(\01621.google.cloud.deploy.v1.Ver" - + "ifyJobRun.FailureCauseB\004\342A\001\003\022\035\n\017failure_" - + "message\030\005 \001(\tB\004\342A\001\003\"\272\001\n\014FailureCause\022\035\n\031" - + "FAILURE_CAUSE_UNSPECIFIED\020\000\022\033\n\027CLOUD_BUI" - + "LD_UNAVAILABLE\020\001\022\024\n\020EXECUTION_FAILED\020\002\022\025" - + "\n\021DEADLINE_EXCEEDED\020\003\022!\n\035VERIFICATION_CO" - + "NFIG_NOT_FOUND\020\004\022\036\n\032CLOUD_BUILD_REQUEST_" - + "FAILED\020\005\"\326\002\n\017PredeployJobRun\0227\n\005build\030\001 " - + "\001(\tB(\342A\001\003\372A!\n\037cloudbuild.googleapis.com/" - + "Build\022Q\n\rfailure_cause\030\002 \001(\01624.google.cl" - + "oud.deploy.v1.PredeployJobRun.FailureCau" - + "seB\004\342A\001\003\022\035\n\017failure_message\030\003 \001(\tB\004\342A\001\003\"" - + "\227\001\n\014FailureCause\022\035\n\031FAILURE_CAUSE_UNSPEC" - + "IFIED\020\000\022\033\n\027CLOUD_BUILD_UNAVAILABLE\020\001\022\024\n\020" - + "EXECUTION_FAILED\020\002\022\025\n\021DEADLINE_EXCEEDED\020" - + "\003\022\036\n\032CLOUD_BUILD_REQUEST_FAILED\020\004\"\330\002\n\020Po" - + "stdeployJobRun\0227\n\005build\030\001 \001(\tB(\342A\001\003\372A!\n\037" - + "cloudbuild.googleapis.com/Build\022R\n\rfailu" - + "re_cause\030\002 \001(\01625.google.cloud.deploy.v1." - + "PostdeployJobRun.FailureCauseB\004\342A\001\003\022\035\n\017f" - + "ailure_message\030\003 \001(\tB\004\342A\001\003\"\227\001\n\014FailureCa" - + "use\022\035\n\031FAILURE_CAUSE_UNSPECIFIED\020\000\022\033\n\027CL" - + "OUD_BUILD_UNAVAILABLE\020\001\022\024\n\020EXECUTION_FAI" - + "LED\020\002\022\025\n\021DEADLINE_EXCEEDED\020\003\022\036\n\032CLOUD_BU" - + "ILD_REQUEST_FAILED\020\004\"Q\n\030CreateChildRollo" - + "utJobRun\022\025\n\007rollout\030\001 \001(\tB\004\342A\001\003\022\036\n\020rollo" - + "ut_phase_id\030\002 \001(\tB\004\342A\001\003\"R\n\031AdvanceChildR" - + "olloutJobRun\022\025\n\007rollout\030\001 \001(\tB\004\342A\001\003\022\036\n\020r" - + "ollout_phase_id\030\002 \001(\tB\004\342A\001\003\"\262\001\n\022ListJobR" - + "unsRequest\022;\n\006parent\030\001 \001(\tB+\342A\001\002\372A$\n\"clo" - + "uddeploy.googleapis.com/Rollout\022\027\n\tpage_" - + "size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A" - + "\001\001\022\024\n\006filter\030\004 \001(\tB\004\342A\001\001\022\026\n\010order_by\030\005 \001" - + "(\tB\004\342A\001\001\"u\n\023ListJobRunsResponse\0220\n\010job_r" - + "uns\030\001 \003(\0132\036.google.cloud.deploy.v1.JobRu" - + "n\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013unreachabl" - + "e\030\003 \003(\t\"L\n\020GetJobRunRequest\0228\n\004name\030\001 \001(" - + "\tB*\342A\001\002\372A#\n!clouddeploy.googleapis.com/J" - + "obRun\"R\n\026TerminateJobRunRequest\0228\n\004name\030" - + "\001 \001(\tB*\342A\001\002\372A#\n!clouddeploy.googleapis.c" - + "om/JobRun\"\031\n\027TerminateJobRunResponse\"\325\001\n" - + "\006Config\022\014\n\004name\030\001 \001(\t\022C\n\022supported_versi" - + "ons\030\002 \003(\0132\'.google.cloud.deploy.v1.Skaff" - + "oldVersion\022 \n\030default_skaffold_version\030\003" - + " \001(\t:V\352AS\n!clouddeploy.googleapis.com/Co" - + "nfig\022.projects/{project}/locations/{loca" - + "tion}/config\"\307\001\n\017SkaffoldVersion\022\017\n\007vers" - + "ion\030\001 \001(\t\0229\n\025maintenance_mode_time\030\003 \001(\013" - + "2\032.google.protobuf.Timestamp\022;\n\027support_" - + "expiration_time\030\004 \001(\0132\032.google.protobuf." - + "Timestamp\022+\n\020support_end_date\030\002 \001(\0132\021.go" - + "ogle.type.Date\"L\n\020GetConfigRequest\0228\n\004na" - + "me\030\001 \001(\tB*\342A\001\002\372A#\n!clouddeploy.googleapi" - + "s.com/Config*\271\001\n\024SkaffoldSupportState\022&\n" - + "\"SKAFFOLD_SUPPORT_STATE_UNSPECIFIED\020\000\022$\n" - + " SKAFFOLD_SUPPORT_STATE_SUPPORTED\020\001\022+\n\'S" - + "KAFFOLD_SUPPORT_STATE_MAINTENANCE_MODE\020\002" - + "\022&\n\"SKAFFOLD_SUPPORT_STATE_UNSUPPORTED\020\003" - + "2\246+\n\013CloudDeploy\022\314\001\n\025ListDeliveryPipelin" - + "es\0224.google.cloud.deploy.v1.ListDelivery" - + "PipelinesRequest\0325.google.cloud.deploy.v" - + "1.ListDeliveryPipelinesResponse\"F\332A\006pare" - + "nt\202\323\344\223\0027\0225/v1/{parent=projects/*/locatio" - + "ns/*}/deliveryPipelines\022\271\001\n\023GetDeliveryP" - + "ipeline\0222.google.cloud.deploy.v1.GetDeli" - + "veryPipelineRequest\032(.google.cloud.deplo" - + "y.v1.DeliveryPipeline\"D\332A\004name\202\323\344\223\0027\0225/v" - + "1/{name=projects/*/locations/*/deliveryP" - + "ipelines/*}\022\231\002\n\026CreateDeliveryPipeline\0225" - + ".google.cloud.deploy.v1.CreateDeliveryPi" - + "pelineRequest\032\035.google.longrunning.Opera" - + "tion\"\250\001\312A%\n\020DeliveryPipeline\022\021OperationM" - + "etadata\332A-parent,delivery_pipeline,deliv" - + "ery_pipeline_id\202\323\344\223\002J\"5/v1/{parent=proje" - + "cts/*/locations/*}/deliveryPipelines:\021de" - + "livery_pipeline\022\233\002\n\026UpdateDeliveryPipeli" - + "ne\0225.google.cloud.deploy.v1.UpdateDelive" - + "ryPipelineRequest\032\035.google.longrunning.O" - + "peration\"\252\001\312A%\n\020DeliveryPipeline\022\021Operat" - + "ionMetadata\332A\035delivery_pipeline,update_m" - + "ask\202\323\344\223\002\\2G/v1/{delivery_pipeline.name=p" + + "com/Release\"\030\n\026AbandonReleaseResponse\"\337\010" + + "\n\006JobRun\022\022\n\004name\030\001 \001(\tB\004\342A\001\001\022\021\n\003uid\030\002 \001(" + + "\tB\004\342A\001\003\022\026\n\010phase_id\030\003 \001(\tB\004\342A\001\003\022\024\n\006job_i" + + "d\030\004 \001(\tB\004\342A\001\003\0225\n\013create_time\030\005 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\004\342A\001\003\0224\n\nstart_ti" + + "me\030\006 \001(\0132\032.google.protobuf.TimestampB\004\342A" + + "\001\003\0222\n\010end_time\030\007 \001(\0132\032.google.protobuf.T" + + "imestampB\004\342A\001\003\0229\n\005state\030\010 \001(\0162$.google.c" + + "loud.deploy.v1.JobRun.StateB\004\342A\001\003\022D\n\016dep" + + "loy_job_run\030\t \001(\0132$.google.cloud.deploy." + + "v1.DeployJobRunB\004\342A\001\003H\000\022D\n\016verify_job_ru" + + "n\030\n \001(\0132$.google.cloud.deploy.v1.VerifyJ" + + "obRunB\004\342A\001\003H\000\022J\n\021predeploy_job_run\030\016 \001(\013" + + "2\'.google.cloud.deploy.v1.PredeployJobRu" + + "nB\004\342A\001\003H\000\022L\n\022postdeploy_job_run\030\017 \001(\0132(." + + "google.cloud.deploy.v1.PostdeployJobRunB" + + "\004\342A\001\003H\000\022^\n\034create_child_rollout_job_run\030" + + "\014 \001(\01320.google.cloud.deploy.v1.CreateChi" + + "ldRolloutJobRunB\004\342A\001\003H\000\022`\n\035advance_child" + + "_rollout_job_run\030\r \001(\01321.google.cloud.de" + + "ploy.v1.AdvanceChildRolloutJobRunB\004\342A\001\003H" + + "\000\022\022\n\004etag\030\013 \001(\tB\004\342A\001\003\"k\n\005State\022\025\n\021STATE_" + + "UNSPECIFIED\020\000\022\017\n\013IN_PROGRESS\020\001\022\r\n\tSUCCEE" + + "DED\020\002\022\n\n\006FAILED\020\003\022\017\n\013TERMINATING\020\004\022\016\n\nTE" + + "RMINATED\020\005:\257\001\352A\253\001\n!clouddeploy.googleapi" + + "s.com/JobRun\022\205\001projects/{project}/locati" + + "ons/{location}/deliveryPipelines/{delive" + + "ry_pipeline}/releases/{release}/rollouts" + + "/{rollout}/jobRuns/{job_run}B\t\n\007job_run\"" + + "\370\003\n\014DeployJobRun\0227\n\005build\030\001 \001(\tB(\342A\001\003\372A!" + + "\n\037cloudbuild.googleapis.com/Build\022N\n\rfai" + + "lure_cause\030\002 \001(\01621.google.cloud.deploy.v" + + "1.DeployJobRun.FailureCauseB\004\342A\001\003\022\035\n\017fai" + + "lure_message\030\003 \001(\tB\004\342A\001\003\022D\n\010metadata\030\004 \001" + + "(\0132,.google.cloud.deploy.v1.DeployJobRun" + + "MetadataB\004\342A\001\003\022>\n\010artifact\030\005 \001(\0132&.googl" + + "e.cloud.deploy.v1.DeployArtifactB\004\342A\001\003\"\271" + + "\001\n\014FailureCause\022\035\n\031FAILURE_CAUSE_UNSPECI" + + "FIED\020\000\022\033\n\027CLOUD_BUILD_UNAVAILABLE\020\001\022\024\n\020E" + + "XECUTION_FAILED\020\002\022\025\n\021DEADLINE_EXCEEDED\020\003" + + "\022 \n\034MISSING_RESOURCES_FOR_CANARY\020\004\022\036\n\032CL" + + "OUD_BUILD_REQUEST_FAILED\020\005\"\255\003\n\014VerifyJob" + + "Run\0227\n\005build\030\001 \001(\tB(\342A\001\003\372A!\n\037cloudbuild." + + "googleapis.com/Build\022\032\n\014artifact_uri\030\002 \001" + + "(\tB\004\342A\001\003\022\034\n\016event_log_path\030\003 \001(\tB\004\342A\001\003\022N" + + "\n\rfailure_cause\030\004 \001(\01621.google.cloud.dep" + + "loy.v1.VerifyJobRun.FailureCauseB\004\342A\001\003\022\035" + + "\n\017failure_message\030\005 \001(\tB\004\342A\001\003\"\272\001\n\014Failur" + + "eCause\022\035\n\031FAILURE_CAUSE_UNSPECIFIED\020\000\022\033\n" + + "\027CLOUD_BUILD_UNAVAILABLE\020\001\022\024\n\020EXECUTION_" + + "FAILED\020\002\022\025\n\021DEADLINE_EXCEEDED\020\003\022!\n\035VERIF" + + "ICATION_CONFIG_NOT_FOUND\020\004\022\036\n\032CLOUD_BUIL" + + "D_REQUEST_FAILED\020\005\"\326\002\n\017PredeployJobRun\0227" + + "\n\005build\030\001 \001(\tB(\342A\001\003\372A!\n\037cloudbuild.googl" + + "eapis.com/Build\022Q\n\rfailure_cause\030\002 \001(\01624" + + ".google.cloud.deploy.v1.PredeployJobRun." + + "FailureCauseB\004\342A\001\003\022\035\n\017failure_message\030\003 " + + "\001(\tB\004\342A\001\003\"\227\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\036\n\032CLOUD_BUILD_REQUEST_FAILE" + + "D\020\004\"\330\002\n\020PostdeployJobRun\0227\n\005build\030\001 \001(\tB" + + "(\342A\001\003\372A!\n\037cloudbuild.googleapis.com/Buil" + + "d\022R\n\rfailure_cause\030\002 \001(\01625.google.cloud." + + "deploy.v1.PostdeployJobRun.FailureCauseB" + + "\004\342A\001\003\022\035\n\017failure_message\030\003 \001(\tB\004\342A\001\003\"\227\001\n" + + "\014FailureCause\022\035\n\031FAILURE_CAUSE_UNSPECIFI" + + "ED\020\000\022\033\n\027CLOUD_BUILD_UNAVAILABLE\020\001\022\024\n\020EXE" + + "CUTION_FAILED\020\002\022\025\n\021DEADLINE_EXCEEDED\020\003\022\036" + + "\n\032CLOUD_BUILD_REQUEST_FAILED\020\004\"Q\n\030Create" + + "ChildRolloutJobRun\022\025\n\007rollout\030\001 \001(\tB\004\342A\001" + + "\003\022\036\n\020rollout_phase_id\030\002 \001(\tB\004\342A\001\003\"R\n\031Adv" + + "anceChildRolloutJobRun\022\025\n\007rollout\030\001 \001(\tB" + + "\004\342A\001\003\022\036\n\020rollout_phase_id\030\002 \001(\tB\004\342A\001\003\"\262\001" + + "\n\022ListJobRunsRequest\022;\n\006parent\030\001 \001(\tB+\342A" + + "\001\002\372A$\n\"clouddeploy.googleapis.com/Rollou" + + "t\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token" + + "\030\003 \001(\tB\004\342A\001\001\022\024\n\006filter\030\004 \001(\tB\004\342A\001\001\022\026\n\010or" + + "der_by\030\005 \001(\tB\004\342A\001\001\"u\n\023ListJobRunsRespons" + + "e\0220\n\010job_runs\030\001 \003(\0132\036.google.cloud.deplo" + + "y.v1.JobRun\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013" + + "unreachable\030\003 \003(\t\"L\n\020GetJobRunRequest\0228\n" + + "\004name\030\001 \001(\tB*\342A\001\002\372A#\n!clouddeploy.google" + + "apis.com/JobRun\"R\n\026TerminateJobRunReques" + + "t\0228\n\004name\030\001 \001(\tB*\342A\001\002\372A#\n!clouddeploy.go" + + "ogleapis.com/JobRun\"\031\n\027TerminateJobRunRe" + + "sponse\"\325\001\n\006Config\022\014\n\004name\030\001 \001(\t\022C\n\022suppo" + + "rted_versions\030\002 \003(\0132\'.google.cloud.deplo" + + "y.v1.SkaffoldVersion\022 \n\030default_skaffold" + + "_version\030\003 \001(\t:V\352AS\n!clouddeploy.googlea" + + "pis.com/Config\022.projects/{project}/locat" + + "ions/{location}/config\"\307\001\n\017SkaffoldVersi" + + "on\022\017\n\007version\030\001 \001(\t\0229\n\025maintenance_mode_" + + "time\030\003 \001(\0132\032.google.protobuf.Timestamp\022;" + + "\n\027support_expiration_time\030\004 \001(\0132\032.google" + + ".protobuf.Timestamp\022+\n\020support_end_date\030" + + "\002 \001(\0132\021.google.type.Date\"L\n\020GetConfigReq" + + "uest\0228\n\004name\030\001 \001(\tB*\342A\001\002\372A#\n!clouddeploy" + + ".googleapis.com/Config\"\243\006\n\nAutomation\022\022\n" + + "\004name\030\001 \001(\tB\004\342A\001\003\022\021\n\003uid\030\002 \001(\tB\004\342A\001\003\022\031\n\013" + + "description\030\003 \001(\tB\004\342A\001\001\0225\n\013create_time\030\004" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\0225" + + "\n\013update_time\030\005 \001(\0132\032.google.protobuf.Ti" + + "mestampB\004\342A\001\003\022N\n\013annotations\030\006 \003(\01323.goo" + + "gle.cloud.deploy.v1.Automation.Annotatio" + + "nsEntryB\004\342A\001\001\022D\n\006labels\030\007 \003(\0132..google.c" + + "loud.deploy.v1.Automation.LabelsEntryB\004\342" + + "A\001\001\022\022\n\004etag\030\010 \001(\tB\004\342A\001\001\022\027\n\tsuspended\030\t \001" + + "(\010B\004\342A\001\001\022\035\n\017service_account\030\n \001(\tB\004\342A\001\002\022" + + "J\n\010selector\030\013 \001(\01322.google.cloud.deploy." + + "v1.AutomationResourceSelectorB\004\342A\001\002\022;\n\005r" + + "ules\030\016 \003(\0132&.google.cloud.deploy.v1.Auto" + + "mationRuleB\004\342A\001\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:\226\001\352A" + + "\222\001\n%clouddeploy.googleapis.com/Automatio" + + "n\022fprojects/{project}/locations/{locatio" + + "n}/deliveryPipelines/{delivery_pipeline}" + + "/automations/{automation}R\001\001\"V\n\032Automati" + + "onResourceSelector\0228\n\007targets\030\001 \003(\0132\'.go" + + "ogle.cloud.deploy.v1.TargetAttribute\"\214\002\n" + + "\016AutomationRule\022P\n\024promote_release_rule\030" + + "\001 \001(\0132*.google.cloud.deploy.v1.PromoteRe" + + "leaseRuleB\004\342A\001\001H\000\022P\n\024advance_rollout_rul" + + "e\030\002 \001(\0132*.google.cloud.deploy.v1.Advance" + + "RolloutRuleB\004\342A\001\001H\000\022N\n\023repair_rollout_ru" + + "le\030\003 \001(\0132).google.cloud.deploy.v1.Repair" + + "RolloutRuleB\004\342A\001\001H\000B\006\n\004rule\"\345\001\n\022PromoteR" + + "eleaseRule\022\020\n\002id\030\001 \001(\tB\004\342A\001\002\022-\n\004wait\030\002 \001" + + "(\0132\031.google.protobuf.DurationB\004\342A\001\001\022#\n\025d" + + "estination_target_id\030\007 \001(\tB\004\342A\001\001\022H\n\tcond" + + "ition\030\005 \001(\0132/.google.cloud.deploy.v1.Aut" + + "omationRuleConditionB\004\342A\001\003\022\037\n\021destinatio" + + "n_phase\030\010 \001(\tB\004\342A\001\001\"\274\001\n\022AdvanceRolloutRu" + + "le\022\020\n\002id\030\001 \001(\tB\004\342A\001\002\022\033\n\rsource_phases\030\006 " + + "\003(\tB\004\342A\001\001\022-\n\004wait\030\003 \001(\0132\031.google.protobu" + + "f.DurationB\004\342A\001\001\022H\n\tcondition\030\005 \001(\0132/.go" + + "ogle.cloud.deploy.v1.AutomationRuleCondi" + + "tionB\004\342A\001\003\"\340\001\n\021RepairRolloutRule\022\020\n\002id\030\001" + + " \001(\tB\004\342A\001\002\022\033\n\rsource_phases\030\002 \003(\tB\004\342A\001\001\022" + + "\022\n\004jobs\030\003 \003(\tB\004\342A\001\001\022>\n\014repair_modes\030\004 \003(" + + "\0132\".google.cloud.deploy.v1.RepairModeB\004\342" + + "A\001\002\022H\n\tcondition\030\006 \001(\0132/.google.cloud.de" + + "ploy.v1.AutomationRuleConditionB\004\342A\001\003\"\206\001" + + "\n\nRepairMode\0224\n\005retry\030\001 \001(\0132\035.google.clo" + + "ud.deploy.v1.RetryB\004\342A\001\001H\000\022:\n\010rollback\030\002" + + " \001(\0132 .google.cloud.deploy.v1.RollbackB\004" + + "\342A\001\001H\000B\006\n\004mode\"\217\001\n\005Retry\022\026\n\010attempts\030\001 \001" + + "(\003B\004\342A\001\002\022-\n\004wait\030\002 \001(\0132\031.google.protobuf" + + ".DurationB\004\342A\001\001\022?\n\014backoff_mode\030\003 \001(\0162#." + + "google.cloud.deploy.v1.BackoffModeB\004\342A\001\001" + + "\"+\n\010Rollback\022\037\n\021destination_phase\030\001 \001(\tB" + + "\004\342A\001\001\"s\n\027AutomationRuleCondition\022X\n\031targ" + + "ets_present_condition\030\001 \001(\0132/.google.clo" + + "ud.deploy.v1.TargetsPresentConditionB\004\342A" + + "\001\001\"\353\001\n\027CreateAutomationRequest\022>\n\006parent" + + "\030\001 \001(\tB.\342A\001\002\372A\'\022%clouddeploy.googleapis." + + "com/Automation\022\033\n\rautomation_id\030\002 \001(\tB\004\342" + + "A\001\002\022<\n\nautomation\030\003 \001(\0132\".google.cloud.d" + + "eploy.v1.AutomationB\004\342A\001\002\022\030\n\nrequest_id\030" + + "\004 \001(\tB\004\342A\001\001\022\033\n\rvalidate_only\030\005 \001(\010B\004\342A\001\001" + + "\"\342\001\n\027UpdateAutomationRequest\0225\n\013update_m" + + "ask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\004\342" + + "A\001\002\022<\n\nautomation\030\002 \001(\0132\".google.cloud.d" + + "eploy.v1.AutomationB\004\342A\001\002\022\030\n\nrequest_id\030" + + "\003 \001(\tB\004\342A\001\001\022\033\n\rallow_missing\030\004 \001(\010B\004\342A\001\001" + + "\022\033\n\rvalidate_only\030\005 \001(\010B\004\342A\001\001\"\277\001\n\027Delete" + + "AutomationRequest\022<\n\004name\030\001 \001(\tB.\342A\001\002\372A\'" + + "\n%clouddeploy.googleapis.com/Automation\022" + + "\030\n\nrequest_id\030\002 \001(\tB\004\342A\001\001\022\033\n\rallow_missi" + + "ng\030\003 \001(\010B\004\342A\001\001\022\033\n\rvalidate_only\030\004 \001(\010B\004\342" + + "A\001\001\022\022\n\004etag\030\005 \001(\tB\004\342A\001\001\"\241\001\n\026ListAutomati" + + "onsRequest\022>\n\006parent\030\001 \001(\tB.\342A\001\002\372A\'\022%clo" + + "uddeploy.googleapis.com/Automation\022\021\n\tpa" + + "ge_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006fil" + + "ter\030\004 \001(\t\022\020\n\010order_by\030\005 \001(\t\"\200\001\n\027ListAuto" + + "mationsResponse\0227\n\013automations\030\001 \003(\0132\".g" + + "oogle.cloud.deploy.v1.Automation\022\027\n\017next" + + "_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"T" + + "\n\024GetAutomationRequest\022<\n\004name\030\001 \001(\tB.\342A" + + "\001\002\372A\'\n%clouddeploy.googleapis.com/Automa" + + "tion\"\324\010\n\rAutomationRun\022\022\n\004name\030\001 \001(\tB\004\342A" + + "\001\003\0225\n\013create_time\030\002 \001(\0132\032.google.protobu" + + "f.TimestampB\004\342A\001\003\0225\n\013update_time\030\003 \001(\0132\032" + + ".google.protobuf.TimestampB\004\342A\001\003\022\022\n\004etag" + + "\030\004 \001(\tB\004\342A\001\003\022\035\n\017service_account\030\005 \001(\tB\004\342" + + "A\001\003\022E\n\023automation_snapshot\030\006 \001(\0132\".googl" + + "e.cloud.deploy.v1.AutomationB\004\342A\001\003\022\027\n\tta" + + "rget_id\030\007 \001(\tB\004\342A\001\003\022@\n\005state\030\010 \001(\0162+.goo" + + "gle.cloud.deploy.v1.AutomationRun.StateB" + + "\004\342A\001\003\022\037\n\021state_description\030\t \001(\tB\004\342A\001\003\0225" + + "\n\013expire_time\030\013 \001(\0132\032.google.protobuf.Ti" + + "mestampB\004\342A\001\003\022\025\n\007rule_id\030\014 \001(\tB\004\342A\001\003\022\033\n\r" + + "automation_id\030\017 \001(\tB\004\342A\001\003\022Z\n\031promote_rel" + + "ease_operation\030\r \001(\0132/.google.cloud.depl" + + "oy.v1.PromoteReleaseOperationB\004\342A\001\003H\000\022Z\n" + + "\031advance_rollout_operation\030\016 \001(\0132/.googl" + + "e.cloud.deploy.v1.AdvanceRolloutOperatio" + + "nB\004\342A\001\003H\000\022X\n\030repair_rollout_operation\030\021 " + + "\001(\0132..google.cloud.deploy.v1.RepairRollo" + + "utOperationB\004\342A\001\003H\000\0229\n\017wait_until_time\030\020" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\"f" + + "\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\r\n\tSUCCEE" + + "DED\020\001\022\r\n\tCANCELLED\020\002\022\n\n\006FAILED\020\003\022\017\n\013IN_P" + + "ROGRESS\020\004\022\013\n\007PENDING\020\005:\235\001\352A\231\001\n(clouddepl" + + "oy.googleapis.com/AutomationRun\022mproject" + + "s/{project}/locations/{location}/deliver" + + "yPipelines/{delivery_pipeline}/automatio" + + "nRuns/{automation_run}B\013\n\toperation\"\215\001\n\027" + + "PromoteReleaseOperation\022\027\n\ttarget_id\030\001 \001" + + "(\tB\004\342A\001\003\022-\n\004wait\030\002 \001(\0132\031.google.protobuf" + + ".DurationB\004\342A\001\003\022\025\n\007rollout\030\003 \001(\tB\004\342A\001\003\022\023" + + "\n\005phase\030\004 \001(\tB\004\342A\001\003\"\234\001\n\027AdvanceRolloutOp" + + "eration\022\032\n\014source_phase\030\005 \001(\tB\004\342A\001\003\022-\n\004w" + + "ait\030\002 \001(\0132\031.google.protobuf.DurationB\004\342A" + + "\001\003\022\025\n\007rollout\030\003 \001(\tB\004\342A\001\003\022\037\n\021destination" + + "_phase\030\004 \001(\tB\004\342A\001\003\"\232\001\n\026RepairRolloutOper" + + "ation\022\025\n\007rollout\030\001 \001(\tB\004\342A\001\003\022\'\n\031current_" + + "repair_mode_index\030\002 \001(\003B\004\342A\001\003\022@\n\rrepair_" + + "phases\030\003 \003(\0132#.google.cloud.deploy.v1.Re" + + "pairPhaseB\004\342A\001\003\"\233\001\n\013RepairPhase\0229\n\005retry" + + "\030\001 \001(\0132\".google.cloud.deploy.v1.RetryPha" + + "seB\004\342A\001\003H\000\022A\n\010rollback\030\002 \001(\0132\'.google.cl" + + "oud.deploy.v1.RollbackAttemptB\004\342A\001\003H\000B\016\n" + + "\014repair_phase\"\327\001\n\nRetryPhase\022\034\n\016total_at" + + "tempts\030\001 \001(\003B\004\342A\001\003\022?\n\014backoff_mode\030\002 \001(\016" + + "2#.google.cloud.deploy.v1.BackoffModeB\004\342" + + "A\001\003\022\026\n\010phase_id\030\003 \001(\tB\004\342A\001\003\022\024\n\006job_id\030\004 " + + "\001(\tB\004\342A\001\003\022<\n\010attempts\030\005 \003(\0132$.google.clo" + + "ud.deploy.v1.RetryAttemptB\004\342A\001\003\"\250\001\n\014Retr" + + "yAttempt\022\025\n\007attempt\030\001 \001(\003B\004\342A\001\003\022-\n\004wait\030" + + "\002 \001(\0132\031.google.protobuf.DurationB\004\342A\001\003\0228" + + "\n\005state\030\005 \001(\0162#.google.cloud.deploy.v1.R" + + "epairStateB\004\342A\001\003\022\030\n\nstate_desc\030\006 \001(\tB\004\342A" + + "\001\003\"\240\001\n\017RollbackAttempt\022\037\n\021destination_ph" + + "ase\030\001 \001(\tB\004\342A\001\003\022\030\n\nrollout_id\030\002 \001(\tB\004\342A\001" + + "\003\0228\n\005state\030\003 \001(\0162#.google.cloud.deploy.v" + + "1.RepairStateB\004\342A\001\003\022\030\n\nstate_desc\030\004 \001(\tB" + + "\004\342A\001\003\"\247\001\n\031ListAutomationRunsRequest\022A\n\006p" + + "arent\030\001 \001(\tB1\342A\001\002\372A*\022(clouddeploy.google" + + "apis.com/AutomationRun\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\"\212\001\n\032ListAutomationRunsRe" + + "sponse\022>\n\017automation_runs\030\001 \003(\0132%.google" + + ".cloud.deploy.v1.AutomationRun\022\027\n\017next_p" + + "age_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"Z\n\027" + + "GetAutomationRunRequest\022?\n\004name\030\001 \001(\tB1\342" + + "A\001\002\372A*\n(clouddeploy.googleapis.com/Autom" + + "ationRun\"]\n\032CancelAutomationRunRequest\022?" + + "\n\004name\030\001 \001(\tB1\342A\001\002\372A*\n(clouddeploy.googl" + + "eapis.com/AutomationRun\"\035\n\033CancelAutomat" + + "ionRunResponse*\271\001\n\024SkaffoldSupportState\022" + + "&\n\"SKAFFOLD_SUPPORT_STATE_UNSPECIFIED\020\000\022" + + "$\n SKAFFOLD_SUPPORT_STATE_SUPPORTED\020\001\022+\n" + + "\'SKAFFOLD_SUPPORT_STATE_MAINTENANCE_MODE" + + "\020\002\022&\n\"SKAFFOLD_SUPPORT_STATE_UNSUPPORTED" + + "\020\003*b\n\013BackoffMode\022\034\n\030BACKOFF_MODE_UNSPEC" + + "IFIED\020\000\022\027\n\023BACKOFF_MODE_LINEAR\020\001\022\034\n\030BACK" + + "OFF_MODE_EXPONENTIAL\020\002*\316\001\n\013RepairState\022\034" + + "\n\030REPAIR_STATE_UNSPECIFIED\020\000\022\032\n\026REPAIR_S" + + "TATE_SUCCEEDED\020\001\022\032\n\026REPAIR_STATE_CANCELL" + + "ED\020\002\022\027\n\023REPAIR_STATE_FAILED\020\003\022\034\n\030REPAIR_" + + "STATE_IN_PROGRESS\020\004\022\030\n\024REPAIR_STATE_PEND" + + "ING\020\005\022\030\n\024REPAIR_STATE_SKIPPED\020\0062\363:\n\013Clou" + + "dDeploy\022\314\001\n\025ListDeliveryPipelines\0224.goog" + + "le.cloud.deploy.v1.ListDeliveryPipelines" + + "Request\0325.google.cloud.deploy.v1.ListDel" + + "iveryPipelinesResponse\"F\332A\006parent\202\323\344\223\0027\022" + + "5/v1/{parent=projects/*/locations/*}/del" + + "iveryPipelines\022\271\001\n\023GetDeliveryPipeline\0222" + + ".google.cloud.deploy.v1.GetDeliveryPipel" + + "ineRequest\032(.google.cloud.deploy.v1.Deli" + + "veryPipeline\"D\332A\004name\202\323\344\223\0027\0225/v1/{name=p" + "rojects/*/locations/*/deliveryPipelines/" - + "*}:\021delivery_pipeline\022\341\001\n\026DeleteDelivery" - + "Pipeline\0225.google.cloud.deploy.v1.Delete" - + "DeliveryPipelineRequest\032\035.google.longrun" - + "ning.Operation\"q\312A*\n\025google.protobuf.Emp" - + "ty\022\021OperationMetadata\332A\004name\202\323\344\223\0027*5/v1/" - + "{name=projects/*/locations/*/deliveryPip" - + "elines/*}\022\244\001\n\013ListTargets\022*.google.cloud" - + ".deploy.v1.ListTargetsRequest\032+.google.c" - + "loud.deploy.v1.ListTargetsResponse\"<\332A\006p" - + "arent\202\323\344\223\002-\022+/v1/{parent=projects/*/loca" - + "tions/*}/targets\022\221\001\n\tGetTarget\022(.google." - + "cloud.deploy.v1.GetTargetRequest\032\036.googl" - + "e.cloud.deploy.v1.Target\":\332A\004name\202\323\344\223\002-\022" - + "+/v1/{name=projects/*/locations/*/target" - + "s/*}\022\317\001\n\014CreateTarget\022+.google.cloud.dep" - + "loy.v1.CreateTargetRequest\032\035.google.long" - + "running.Operation\"s\312A\033\n\006Target\022\021Operatio" - + "nMetadata\332A\027parent,target,target_id\202\323\344\223\002" - + "5\"+/v1/{parent=projects/*/locations/*}/t" - + "argets:\006target\022\321\001\n\014UpdateTarget\022+.google" - + ".cloud.deploy.v1.UpdateTargetRequest\032\035.g" - + "oogle.longrunning.Operation\"u\312A\033\n\006Target" - + "\022\021OperationMetadata\332A\022target,update_mask" - + "\202\323\344\223\002<22/v1/{target.name=projects/*/loca" - + "tions/*/targets/*}:\006target\022\303\001\n\014DeleteTar" - + "get\022+.google.cloud.deploy.v1.DeleteTarge" - + "tRequest\032\035.google.longrunning.Operation\"" - + "g\312A*\n\025google.protobuf.Empty\022\021OperationMe" - + "tadata\332A\004name\202\323\344\223\002-*+/v1/{name=projects/" - + "*/locations/*/targets/*}\022\274\001\n\014ListRelease" - + "s\022+.google.cloud.deploy.v1.ListReleasesR" - + "equest\032,.google.cloud.deploy.v1.ListRele" - + "asesResponse\"Q\332A\006parent\202\323\344\223\002B\022@/v1/{pare" - + "nt=projects/*/locations/*/deliveryPipeli" - + "nes/*}/releases\022\251\001\n\nGetRelease\022).google." - + "cloud.deploy.v1.GetReleaseRequest\032\037.goog" - + "le.cloud.deploy.v1.Release\"O\332A\004name\202\323\344\223\002" - + "B\022@/v1/{name=projects/*/locations/*/deli" - + "veryPipelines/*/releases/*}\022\353\001\n\rCreateRe" - + "lease\022,.google.cloud.deploy.v1.CreateRel" - + "easeRequest\032\035.google.longrunning.Operati" - + "on\"\214\001\312A\034\n\007Release\022\021OperationMetadata\332A\031p" - + "arent,release,release_id\202\323\344\223\002K\"@/v1/{par" - + "ent=projects/*/locations/*/deliveryPipel" - + "ines/*}/releases:\007release\022\313\001\n\016AbandonRel" - + "ease\022-.google.cloud.deploy.v1.AbandonRel" - + "easeRequest\032..google.cloud.deploy.v1.Aba" - + "ndonReleaseResponse\"Z\332A\004name\202\323\344\223\002M\"H/v1/" - + "{name=projects/*/locations/*/deliveryPip" - + "elines/*/releases/*}:abandon:\001*\022\326\001\n\016Appr" - + "oveRollout\022-.google.cloud.deploy.v1.Appr" - + "oveRolloutRequest\032..google.cloud.deploy." - + "v1.ApproveRolloutResponse\"e\332A\004name\202\323\344\223\002X" + + "*}\022\231\002\n\026CreateDeliveryPipeline\0225.google.c" + + "loud.deploy.v1.CreateDeliveryPipelineReq" + + "uest\032\035.google.longrunning.Operation\"\250\001\312A" + + "%\n\020DeliveryPipeline\022\021OperationMetadata\332A" + + "-parent,delivery_pipeline,delivery_pipel" + + "ine_id\202\323\344\223\002J\"5/v1/{parent=projects/*/loc" + + "ations/*}/deliveryPipelines:\021delivery_pi" + + "peline\022\233\002\n\026UpdateDeliveryPipeline\0225.goog" + + "le.cloud.deploy.v1.UpdateDeliveryPipelin" + + "eRequest\032\035.google.longrunning.Operation\"" + + "\252\001\312A%\n\020DeliveryPipeline\022\021OperationMetada" + + "ta\332A\035delivery_pipeline,update_mask\202\323\344\223\002\\" + + "2G/v1/{delivery_pipeline.name=projects/*" + + "/locations/*/deliveryPipelines/*}:\021deliv" + + "ery_pipeline\022\341\001\n\026DeleteDeliveryPipeline\022" + + "5.google.cloud.deploy.v1.DeleteDeliveryP" + + "ipelineRequest\032\035.google.longrunning.Oper" + + "ation\"q\312A*\n\025google.protobuf.Empty\022\021Opera" + + "tionMetadata\332A\004name\202\323\344\223\0027*5/v1/{name=pro" + + "jects/*/locations/*/deliveryPipelines/*}" + + "\022\244\001\n\013ListTargets\022*.google.cloud.deploy.v" + + "1.ListTargetsRequest\032+.google.cloud.depl" + + "oy.v1.ListTargetsResponse\"<\332A\006parent\202\323\344\223" + + "\002-\022+/v1/{parent=projects/*/locations/*}/" + + "targets\022\334\001\n\016RollbackTarget\022-.google.clou" + + "d.deploy.v1.RollbackTargetRequest\032..goog" + + "le.cloud.deploy.v1.RollbackTargetRespons" + + "e\"k\332A\031name,target_id,rollout_id\202\323\344\223\002I\"D/" + + "v1/{name=projects/*/locations/*/delivery" + + "Pipelines/*}:rollbackTarget:\001*\022\221\001\n\tGetTa" + + "rget\022(.google.cloud.deploy.v1.GetTargetR" + + "equest\032\036.google.cloud.deploy.v1.Target\":" + + "\332A\004name\202\323\344\223\002-\022+/v1/{name=projects/*/loca" + + "tions/*/targets/*}\022\317\001\n\014CreateTarget\022+.go" + + "ogle.cloud.deploy.v1.CreateTargetRequest" + + "\032\035.google.longrunning.Operation\"s\312A\033\n\006Ta" + + "rget\022\021OperationMetadata\332A\027parent,target," + + "target_id\202\323\344\223\0025\"+/v1/{parent=projects/*/" + + "locations/*}/targets:\006target\022\321\001\n\014UpdateT" + + "arget\022+.google.cloud.deploy.v1.UpdateTar" + + "getRequest\032\035.google.longrunning.Operatio" + + "n\"u\312A\033\n\006Target\022\021OperationMetadata\332A\022targ" + + "et,update_mask\202\323\344\223\002<22/v1/{target.name=p" + + "rojects/*/locations/*/targets/*}:\006target" + + "\022\303\001\n\014DeleteTarget\022+.google.cloud.deploy." + + "v1.DeleteTargetRequest\032\035.google.longrunn" + + "ing.Operation\"g\312A*\n\025google.protobuf.Empt", + "y\022\021OperationMetadata\332A\004name\202\323\344\223\002-*+/v1/{" + + "name=projects/*/locations/*/targets/*}\022\274" + + "\001\n\014ListReleases\022+.google.cloud.deploy.v1" + + ".ListReleasesRequest\032,.google.cloud.depl" + + "oy.v1.ListReleasesResponse\"Q\332A\006parent\202\323\344" + + "\223\002B\022@/v1/{parent=projects/*/locations/*/" + + "deliveryPipelines/*}/releases\022\251\001\n\nGetRel" + + "ease\022).google.cloud.deploy.v1.GetRelease" + + "Request\032\037.google.cloud.deploy.v1.Release" + + "\"O\332A\004name\202\323\344\223\002B\022@/v1/{name=projects/*/lo" + + "cations/*/deliveryPipelines/*/releases/*" + + "}\022\353\001\n\rCreateRelease\022,.google.cloud.deplo" + + "y.v1.CreateReleaseRequest\032\035.google.longr" + + "unning.Operation\"\214\001\312A\034\n\007Release\022\021Operati" + + "onMetadata\332A\031parent,release,release_id\202\323" + + "\344\223\002K\"@/v1/{parent=projects/*/locations/*" + + "/deliveryPipelines/*}/releases:\007release\022" + + "\313\001\n\016AbandonRelease\022-.google.cloud.deploy" + + ".v1.AbandonReleaseRequest\032..google.cloud" + + ".deploy.v1.AbandonReleaseResponse\"Z\332A\004na" + + "me\202\323\344\223\002M\"H/v1/{name=projects/*/locations" + + "/*/deliveryPipelines/*/releases/*}:aband" + + "on:\001*\022\326\001\n\016ApproveRollout\022-.google.cloud." + + "deploy.v1.ApproveRolloutRequest\032..google" + + ".cloud.deploy.v1.ApproveRolloutResponse\"" + + "e\332A\004name\202\323\344\223\002X\"S/v1/{name=projects/*/loc" + + "ations/*/deliveryPipelines/*/releases/*/" + + "rollouts/*}:approve:\001*\022\337\001\n\016AdvanceRollou" + + "t\022-.google.cloud.deploy.v1.AdvanceRollou" + + "tRequest\032..google.cloud.deploy.v1.Advanc" + + "eRolloutResponse\"n\332A\rname,phase_id\202\323\344\223\002X" + "\"S/v1/{name=projects/*/locations/*/deliv" - + "eryPipelines/*/releases/*/rollouts/*}:ap" - + "prove:\001*\022\337\001\n\016AdvanceRollout\022-.google.clo" - + "ud.deploy.v1.AdvanceRolloutRequest\032..goo" - + "gle.cloud.deploy.v1.AdvanceRolloutRespon" - + "se\"n\332A\rname,phase_id\202\323\344\223\002X\"S/v1/{name=pr" - + "ojects/*/locations/*/deliveryPipelines/*" - + "/releases/*/rollouts/*}:advance:\001*\022\322\001\n\rC" - + "ancelRollout\022,.google.cloud.deploy.v1.Ca" - + "ncelRolloutRequest\032-.google.cloud.deploy" - + ".v1.CancelRolloutResponse\"d\332A\004name\202\323\344\223\002W" - + "\"R/v1/{name=projects/*/locations/*/deliv" - + "eryPipelines/*/releases/*/rollouts/*}:ca" - + "ncel:\001*\022\307\001\n\014ListRollouts\022+.google.cloud." - + "deploy.v1.ListRolloutsRequest\032,.google.c" - + "loud.deploy.v1.ListRolloutsResponse\"\\\332A\006" - + "parent\202\323\344\223\002M\022K/v1/{parent=projects/*/loc" - + "ations/*/deliveryPipelines/*/releases/*}" - + "/rollouts\022\264\001\n\nGetRollout\022).google.cloud." - + "deploy.v1.GetRolloutRequest\032\037.google.clo" - + "ud.deploy.v1.Rollout\"Z\332A\004name\202\323\344\223\002M\022K/v1" - + "/{name=projects/*/locations/*/deliveryPi" - + "pelines/*/releases/*/rollouts/*}\022\366\001\n\rCre" - + "ateRollout\022,.google.cloud.deploy.v1.Crea" - + "teRolloutRequest\032\035.google.longrunning.Op" - + "eration\"\227\001\312A\034\n\007Rollout\022\021OperationMetadat" - + "a\332A\031parent,rollout,rollout_id\202\323\344\223\002V\"K/v1" + + "eryPipelines/*/releases/*/rollouts/*}:ad" + + "vance:\001*\022\322\001\n\rCancelRollout\022,.google.clou" + + "d.deploy.v1.CancelRolloutRequest\032-.googl" + + "e.cloud.deploy.v1.CancelRolloutResponse\"" + + "d\332A\004name\202\323\344\223\002W\"R/v1/{name=projects/*/loc" + + "ations/*/deliveryPipelines/*/releases/*/" + + "rollouts/*}:cancel:\001*\022\307\001\n\014ListRollouts\022+" + + ".google.cloud.deploy.v1.ListRolloutsRequ" + + "est\032,.google.cloud.deploy.v1.ListRollout" + + "sResponse\"\\\332A\006parent\202\323\344\223\002M\022K/v1/{parent=" + + "projects/*/locations/*/deliveryPipelines" + + "/*/releases/*}/rollouts\022\264\001\n\nGetRollout\022)" + + ".google.cloud.deploy.v1.GetRolloutReques" + + "t\032\037.google.cloud.deploy.v1.Rollout\"Z\332A\004n" + + "ame\202\323\344\223\002M\022K/v1/{name=projects/*/location" + + "s/*/deliveryPipelines/*/releases/*/rollo" + + "uts/*}\022\366\001\n\rCreateRollout\022,.google.cloud." + + "deploy.v1.CreateRolloutRequest\032\035.google." + + "longrunning.Operation\"\227\001\312A\034\n\007Rollout\022\021Op" + + "erationMetadata\332A\031parent,rollout,rollout" + + "_id\202\323\344\223\002V\"K/v1/{parent=projects/*/locati" + + "ons/*/deliveryPipelines/*/releases/*}/ro" + + "llouts:\007rollout\022\337\001\n\tIgnoreJob\022(.google.c" + + "loud.deploy.v1.IgnoreJobRequest\032).google" + + ".cloud.deploy.v1.IgnoreJobResponse\"}\332A\027r" + + "ollout,phase_id,job_id\202\323\344\223\002]\"X/v1/{rollo" + + "ut=projects/*/locations/*/deliveryPipeli" + + "nes/*/releases/*/rollouts/*}:ignoreJob:\001" + + "*\022\333\001\n\010RetryJob\022\'.google.cloud.deploy.v1." + + "RetryJobRequest\032(.google.cloud.deploy.v1" + + ".RetryJobResponse\"|\332A\027rollout,phase_id,j" + + "ob_id\202\323\344\223\002\\\"W/v1/{rollout=projects/*/loc" + + "ations/*/deliveryPipelines/*/releases/*/" + + "rollouts/*}:retryJob:\001*\022\316\001\n\013ListJobRuns\022" + + "*.google.cloud.deploy.v1.ListJobRunsRequ" + + "est\032+.google.cloud.deploy.v1.ListJobRuns" + + "Response\"f\332A\006parent\202\323\344\223\002W\022U/v1/{parent=p" + + "rojects/*/locations/*/deliveryPipelines/" + + "*/releases/*/rollouts/*}/jobRuns\022\273\001\n\tGet" + + "JobRun\022(.google.cloud.deploy.v1.GetJobRu" + + "nRequest\032\036.google.cloud.deploy.v1.JobRun" + + "\"d\332A\004name\202\323\344\223\002W\022U/v1/{name=projects/*/lo" + + "cations/*/deliveryPipelines/*/releases/*" + + "/rollouts/*/jobRuns/*}\022\345\001\n\017TerminateJobR" + + "un\022..google.cloud.deploy.v1.TerminateJob" + + "RunRequest\032/.google.cloud.deploy.v1.Term" + + "inateJobRunResponse\"q\332A\004name\202\323\344\223\002d\"_/v1/" + + "{name=projects/*/locations/*/deliveryPip" + + "elines/*/releases/*/rollouts/*/jobRuns/*" + + "}:terminate:\001*\022\216\001\n\tGetConfig\022(.google.cl" + + "oud.deploy.v1.GetConfigRequest\032\036.google." + + "cloud.deploy.v1.Config\"7\332A\004name\202\323\344\223\002*\022(/" + + "v1/{name=projects/*/locations/*/config}\022" + + "\200\002\n\020CreateAutomation\022/.google.cloud.depl" + + "oy.v1.CreateAutomationRequest\032\035.google.l" + + "ongrunning.Operation\"\233\001\312A\037\n\nAutomation\022\021" + + "OperationMetadata\332A\037parent,automation,au" + + "tomation_id\202\323\344\223\002Q\"C/v1/{parent=projects/" + + "*/locations/*/deliveryPipelines/*}/autom" + + "ations:\nautomation\022\202\002\n\020UpdateAutomation\022" + + "/.google.cloud.deploy.v1.UpdateAutomatio" + + "nRequest\032\035.google.longrunning.Operation\"" + + "\235\001\312A\037\n\nAutomation\022\021OperationMetadata\332A\026a" + + "utomation,update_mask\202\323\344\223\002\\2N/v1/{automa" + + "tion.name=projects/*/locations/*/deliver" + + "yPipelines/*/automations/*}:\nautomation\022" + + "\343\001\n\020DeleteAutomation\022/.google.cloud.depl" + + "oy.v1.DeleteAutomationRequest\032\035.google.l" + + "ongrunning.Operation\"\177\312A*\n\025google.protob" + + "uf.Empty\022\021OperationMetadata\332A\004name\202\323\344\223\002E" + + "*C/v1/{name=projects/*/locations/*/deliv" + + "eryPipelines/*/automations/*}\022\265\001\n\rGetAut" + + "omation\022,.google.cloud.deploy.v1.GetAuto" + + "mationRequest\032\".google.cloud.deploy.v1.A" + + "utomation\"R\332A\004name\202\323\344\223\002E\022C/v1/{name=proj" + + "ects/*/locations/*/deliveryPipelines/*/a" + + "utomations/*}\022\310\001\n\017ListAutomations\022..goog" + + "le.cloud.deploy.v1.ListAutomationsReques" + + "t\032/.google.cloud.deploy.v1.ListAutomatio" + + "nsResponse\"T\332A\006parent\202\323\344\223\002E\022C/v1/{parent" + + "=projects/*/locations/*/deliveryPipeline" + + "s/*}/automations\022\301\001\n\020GetAutomationRun\022/." + + "google.cloud.deploy.v1.GetAutomationRunR" + + "equest\032%.google.cloud.deploy.v1.Automati" + + "onRun\"U\332A\004name\202\323\344\223\002H\022F/v1/{name=projects" + + "/*/locations/*/deliveryPipelines/*/autom" + + "ationRuns/*}\022\324\001\n\022ListAutomationRuns\0221.go" + + "ogle.cloud.deploy.v1.ListAutomationRunsR" + + "equest\0322.google.cloud.deploy.v1.ListAuto" + + "mationRunsResponse\"W\332A\006parent\202\323\344\223\002H\022F/v1" + "/{parent=projects/*/locations/*/delivery" - + "Pipelines/*/releases/*}/rollouts:\007rollou" - + "t\022\337\001\n\tIgnoreJob\022(.google.cloud.deploy.v1" - + ".IgnoreJobRequest\032).google.cloud.deploy." - + "v1.IgnoreJobResponse\"}\332A\027rollout,phase_i" - + "d,job_id\202\323\344\223\002]\"X/v1/{rollout=projects/*/" - + "locations/*/deliveryPipelines/*/releases" - + "/*/rollouts/*}:ignoreJob:\001*\022\333\001\n\010RetryJob" - + "\022\'.google.cloud.deploy.v1.RetryJobReques" - + "t\032(.google.cloud.deploy.v1.RetryJobRespo" - + "nse\"|\332A\027rollout,phase_id,job_id\202\323\344\223\002\\\"W/" - + "v1/{rollout=projects/*/locations/*/deliv" - + "eryPipelines/*/releases/*/rollouts/*}:re" - + "tryJob:\001*\022\316\001\n\013ListJobRuns\022*.google.cloud" - + ".deploy.v1.ListJobRunsRequest\032+.google.c" - + "loud.deploy.v1.ListJobRunsResponse\"f\332A\006p" - + "arent\202\323\344\223\002W\022U/v1/{parent=projects/*/loca" - + "tions/*/deliveryPipelines/*/releases/*/r" - + "ollouts/*}/jobRuns\022\273\001\n\tGetJobRun\022(.googl" - + "e.cloud.deploy.v1.GetJobRunRequest\032\036.goo" - + "gle.cloud.deploy.v1.JobRun\"d\332A\004name\202\323\344\223\002" - + "W\022U/v1/{name=projects/*/locations/*/deli" - + "veryPipelines/*/releases/*/rollouts/*/jo" - + "bRuns/*}\022\345\001\n\017TerminateJobRun\022..google.cl" - + "oud.deploy.v1.TerminateJobRunRequest\032/.g" - + "oogle.cloud.deploy.v1.TerminateJobRunRes" - + "ponse\"q\332A\004name\202\323\344\223\002d\"_/v1/{name=projects" - + "/*/locations/*/deliveryPipelines/*/relea" - + "ses/*/rollouts/*/jobRuns/*}:terminate:\001*" - + "\022\216\001\n\tGetConfig\022(.google.cloud.deploy.v1." - + "GetConfigRequest\032\036.google.cloud.deploy.v" - + "1.Config\"7\332A\004name\202\323\344\223\002*\022(/v1/{name=proje" - + "cts/*/locations/*/config}\032N\312A\032clouddeplo" - + "y.googleapis.com\322A.https://www.googleapi" - + "s.com/auth/cloud-platformB\270\005\n\032com.google" - + ".cloud.deploy.v1B\020CloudDeployProtoP\001Z2cl" - + "oud.google.com/go/deploy/apiv1/deploypb;" - + "deploypb\352AY\n\037cloudbuild.googleapis.com/B" - + "uild\0226projects/{project}/locations/{loca" - + "tion}/builds/{build}\352A^\n container.googl" - + "eapis.com/Cluster\022:projects/{project}/lo" - + "cations/{location}/clusters/{cluster}\352Af" - + "\n$clouddeploy.googleapis.com/Operation\022>" - + "projects/{project}/locations/{location}/" - + "operations/{operation}\352Ai\n$cloudbuild.go" - + "ogleapis.com/WorkerPool\022Aprojects/{proje" - + "ct}/locations/{location}/workerPools/{wo" - + "rker_pool}\352Ad\n gkehub.googleapis.com/Mem" - + "bership\022@projects/{project}/locations/{l" - + "ocation}/memberships/{membership}\352AX\n\032ru" - + "n.googleapis.com/Service\022:projects/{proj" - + "ect}/locations/{location}/services/{serv" - + "ice}b\006proto3" + + "Pipelines/*}/automationRuns\022\337\001\n\023CancelAu" + + "tomationRun\0222.google.cloud.deploy.v1.Can" + + "celAutomationRunRequest\0323.google.cloud.d" + + "eploy.v1.CancelAutomationRunResponse\"_\332A" + + "\004name\202\323\344\223\002R\"M/v1/{name=projects/*/locati" + + "ons/*/deliveryPipelines/*/automationRuns" + + "/*}:cancel:\001*\032N\312A\032clouddeploy.googleapis" + + ".com\322A.https://www.googleapis.com/auth/c" + + "loud-platformB\207\006\n\032com.google.cloud.deplo" + + "y.v1B\020CloudDeployProtoP\001Z2cloud.google.c" + + "om/go/deploy/apiv1/deploypb;deploypb\352AY\n" + + "\037cloudbuild.googleapis.com/Build\0226projec" + + "ts/{project}/locations/{location}/builds" + + "/{build}\352A^\n container.googleapis.com/Cl" + + "uster\022:projects/{project}/locations/{loc" + + "ation}/clusters/{cluster}\352Af\n$clouddeplo" + + "y.googleapis.com/Operation\022>projects/{pr" + + "oject}/locations/{location}/operations/{" + + "operation}\352Ai\n$cloudbuild.googleapis.com" + + "/WorkerPool\022Aprojects/{project}/location" + + "s/{location}/workerPools/{worker_pool}\352A" + + "d\n gkehub.googleapis.com/Membership\022@pro" + + "jects/{project}/locations/{location}/mem" + + "berships/{membership}\352AX\n\032run.googleapis" + + ".com/Service\022:projects/{project}/locatio" + + "ns/{location}/services/{service}\352AL\n\026run" + + ".googleapis.com/Job\0222projects/{project}/" + + "locations/{location}/jobs/{job}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -1494,8 +1880,38 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "RequestId", "AllowMissing", "ValidateOnly", "Force", "Etag", }); - internal_static_google_cloud_deploy_v1_Target_descriptor = + internal_static_google_cloud_deploy_v1_RollbackTargetConfig_descriptor = getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_deploy_v1_RollbackTargetConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_RollbackTargetConfig_descriptor, + new java.lang.String[] { + "Rollout", "StartingPhaseId", + }); + internal_static_google_cloud_deploy_v1_RollbackTargetRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_deploy_v1_RollbackTargetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_RollbackTargetRequest_descriptor, + new java.lang.String[] { + "Name", + "TargetId", + "RolloutId", + "ReleaseId", + "RolloutToRollBack", + "RollbackConfig", + "ValidateOnly", + }); + internal_static_google_cloud_deploy_v1_RollbackTargetResponse_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_deploy_v1_RollbackTargetResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_RollbackTargetResponse_descriptor, + new java.lang.String[] { + "RollbackConfig", + }); + internal_static_google_cloud_deploy_v1_Target_descriptor = + getDescriptor().getMessageTypes().get(27); internal_static_google_cloud_deploy_v1_Target_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_Target_descriptor, @@ -1543,7 +1959,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_deploy_v1_ExecutionConfig_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(28); internal_static_google_cloud_deploy_v1_ExecutionConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ExecutionConfig_descriptor, @@ -1558,7 +1974,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ExecutionEnvironment", }); internal_static_google_cloud_deploy_v1_DefaultPool_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(29); internal_static_google_cloud_deploy_v1_DefaultPool_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_DefaultPool_descriptor, @@ -1566,7 +1982,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ServiceAccount", "ArtifactStorage", }); internal_static_google_cloud_deploy_v1_PrivatePool_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(30); internal_static_google_cloud_deploy_v1_PrivatePool_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_PrivatePool_descriptor, @@ -1574,7 +1990,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "WorkerPool", "ServiceAccount", "ArtifactStorage", }); internal_static_google_cloud_deploy_v1_GkeCluster_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(31); internal_static_google_cloud_deploy_v1_GkeCluster_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_GkeCluster_descriptor, @@ -1582,7 +1998,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Cluster", "InternalIp", }); internal_static_google_cloud_deploy_v1_AnthosCluster_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(32); internal_static_google_cloud_deploy_v1_AnthosCluster_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_AnthosCluster_descriptor, @@ -1590,7 +2006,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Membership", }); internal_static_google_cloud_deploy_v1_CloudRunLocation_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(33); internal_static_google_cloud_deploy_v1_CloudRunLocation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_CloudRunLocation_descriptor, @@ -1598,7 +2014,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Location", }); internal_static_google_cloud_deploy_v1_MultiTarget_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(34); internal_static_google_cloud_deploy_v1_MultiTarget_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_MultiTarget_descriptor, @@ -1606,7 +2022,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TargetIds", }); internal_static_google_cloud_deploy_v1_ListTargetsRequest_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(35); internal_static_google_cloud_deploy_v1_ListTargetsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ListTargetsRequest_descriptor, @@ -1614,7 +2030,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(33); + getDescriptor().getMessageTypes().get(36); internal_static_google_cloud_deploy_v1_ListTargetsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ListTargetsResponse_descriptor, @@ -1622,7 +2038,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Targets", "NextPageToken", "Unreachable", }); internal_static_google_cloud_deploy_v1_GetTargetRequest_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageTypes().get(37); internal_static_google_cloud_deploy_v1_GetTargetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_GetTargetRequest_descriptor, @@ -1630,7 +2046,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_deploy_v1_CreateTargetRequest_descriptor = - getDescriptor().getMessageTypes().get(35); + getDescriptor().getMessageTypes().get(38); internal_static_google_cloud_deploy_v1_CreateTargetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_CreateTargetRequest_descriptor, @@ -1638,7 +2054,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(36); + getDescriptor().getMessageTypes().get(39); internal_static_google_cloud_deploy_v1_UpdateTargetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_UpdateTargetRequest_descriptor, @@ -1646,15 +2062,31 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UpdateMask", "Target", "RequestId", "AllowMissing", "ValidateOnly", }); internal_static_google_cloud_deploy_v1_DeleteTargetRequest_descriptor = - getDescriptor().getMessageTypes().get(37); + getDescriptor().getMessageTypes().get(40); internal_static_google_cloud_deploy_v1_DeleteTargetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_DeleteTargetRequest_descriptor, new java.lang.String[] { "Name", "RequestId", "AllowMissing", "ValidateOnly", "Etag", }); + internal_static_google_cloud_deploy_v1_TargetAttribute_descriptor = + getDescriptor().getMessageTypes().get(41); + internal_static_google_cloud_deploy_v1_TargetAttribute_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_TargetAttribute_descriptor, + new java.lang.String[] { + "Id", "Labels", + }); + internal_static_google_cloud_deploy_v1_TargetAttribute_LabelsEntry_descriptor = + internal_static_google_cloud_deploy_v1_TargetAttribute_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_deploy_v1_TargetAttribute_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_TargetAttribute_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); internal_static_google_cloud_deploy_v1_Release_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageTypes().get(42); internal_static_google_cloud_deploy_v1_Release_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_Release_descriptor, @@ -1754,7 +2186,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_deploy_v1_BuildArtifact_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageTypes().get(43); internal_static_google_cloud_deploy_v1_BuildArtifact_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_BuildArtifact_descriptor, @@ -1762,7 +2194,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Image", "Tag", }); internal_static_google_cloud_deploy_v1_TargetArtifact_descriptor = - getDescriptor().getMessageTypes().get(40); + getDescriptor().getMessageTypes().get(44); internal_static_google_cloud_deploy_v1_TargetArtifact_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_TargetArtifact_descriptor, @@ -1786,7 +2218,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_deploy_v1_DeployArtifact_descriptor = - getDescriptor().getMessageTypes().get(41); + getDescriptor().getMessageTypes().get(45); internal_static_google_cloud_deploy_v1_DeployArtifact_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_DeployArtifact_descriptor, @@ -1794,7 +2226,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ArtifactUri", "ManifestPaths", }); internal_static_google_cloud_deploy_v1_CloudRunRenderMetadata_descriptor = - getDescriptor().getMessageTypes().get(42); + getDescriptor().getMessageTypes().get(46); internal_static_google_cloud_deploy_v1_CloudRunRenderMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_CloudRunRenderMetadata_descriptor, @@ -1802,7 +2234,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Service", }); internal_static_google_cloud_deploy_v1_RenderMetadata_descriptor = - getDescriptor().getMessageTypes().get(43); + getDescriptor().getMessageTypes().get(47); internal_static_google_cloud_deploy_v1_RenderMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_RenderMetadata_descriptor, @@ -1810,7 +2242,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CloudRun", }); internal_static_google_cloud_deploy_v1_ListReleasesRequest_descriptor = - getDescriptor().getMessageTypes().get(44); + getDescriptor().getMessageTypes().get(48); internal_static_google_cloud_deploy_v1_ListReleasesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ListReleasesRequest_descriptor, @@ -1818,7 +2250,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(45); + getDescriptor().getMessageTypes().get(49); internal_static_google_cloud_deploy_v1_ListReleasesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ListReleasesResponse_descriptor, @@ -1826,7 +2258,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Releases", "NextPageToken", "Unreachable", }); internal_static_google_cloud_deploy_v1_GetReleaseRequest_descriptor = - getDescriptor().getMessageTypes().get(46); + getDescriptor().getMessageTypes().get(50); internal_static_google_cloud_deploy_v1_GetReleaseRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_GetReleaseRequest_descriptor, @@ -1834,7 +2266,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_deploy_v1_CreateReleaseRequest_descriptor = - getDescriptor().getMessageTypes().get(47); + getDescriptor().getMessageTypes().get(51); internal_static_google_cloud_deploy_v1_CreateReleaseRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_CreateReleaseRequest_descriptor, @@ -1842,7 +2274,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(48); + getDescriptor().getMessageTypes().get(52); internal_static_google_cloud_deploy_v1_Rollout_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_Rollout_descriptor, @@ -1867,6 +2299,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Phases", "Metadata", "ControllerRollout", + "RollbackOfRollout", + "RolledBackByRollouts", }); internal_static_google_cloud_deploy_v1_Rollout_AnnotationsEntry_descriptor = internal_static_google_cloud_deploy_v1_Rollout_descriptor.getNestedTypes().get(0); @@ -1885,15 +2319,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_deploy_v1_Metadata_descriptor = - getDescriptor().getMessageTypes().get(49); + getDescriptor().getMessageTypes().get(53); 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", + "CloudRun", "Automation", }); internal_static_google_cloud_deploy_v1_DeployJobRunMetadata_descriptor = - getDescriptor().getMessageTypes().get(50); + getDescriptor().getMessageTypes().get(54); internal_static_google_cloud_deploy_v1_DeployJobRunMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_DeployJobRunMetadata_descriptor, @@ -1901,15 +2335,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CloudRun", }); internal_static_google_cloud_deploy_v1_CloudRunMetadata_descriptor = - getDescriptor().getMessageTypes().get(51); + getDescriptor().getMessageTypes().get(55); 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", + "Service", "ServiceUrls", "Revision", "Job", + }); + internal_static_google_cloud_deploy_v1_AutomationRolloutMetadata_descriptor = + getDescriptor().getMessageTypes().get(56); + internal_static_google_cloud_deploy_v1_AutomationRolloutMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_AutomationRolloutMetadata_descriptor, + new java.lang.String[] { + "PromoteAutomationRun", "AdvanceAutomationRuns", "RepairAutomationRuns", }); internal_static_google_cloud_deploy_v1_Phase_descriptor = - getDescriptor().getMessageTypes().get(52); + getDescriptor().getMessageTypes().get(57); internal_static_google_cloud_deploy_v1_Phase_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_Phase_descriptor, @@ -1917,7 +2359,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Id", "State", "SkipMessage", "DeploymentJobs", "ChildRolloutJobs", "Jobs", }); internal_static_google_cloud_deploy_v1_DeploymentJobs_descriptor = - getDescriptor().getMessageTypes().get(53); + getDescriptor().getMessageTypes().get(58); internal_static_google_cloud_deploy_v1_DeploymentJobs_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_DeploymentJobs_descriptor, @@ -1925,7 +2367,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DeployJob", "VerifyJob", "PredeployJob", "PostdeployJob", }); internal_static_google_cloud_deploy_v1_ChildRolloutJobs_descriptor = - getDescriptor().getMessageTypes().get(54); + getDescriptor().getMessageTypes().get(59); internal_static_google_cloud_deploy_v1_ChildRolloutJobs_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ChildRolloutJobs_descriptor, @@ -1933,7 +2375,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CreateRolloutJobs", "AdvanceRolloutJobs", }); internal_static_google_cloud_deploy_v1_Job_descriptor = - getDescriptor().getMessageTypes().get(55); + getDescriptor().getMessageTypes().get(60); internal_static_google_cloud_deploy_v1_Job_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_Job_descriptor, @@ -1951,17 +2393,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "JobType", }); internal_static_google_cloud_deploy_v1_DeployJob_descriptor = - getDescriptor().getMessageTypes().get(56); + getDescriptor().getMessageTypes().get(61); 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(57); + getDescriptor().getMessageTypes().get(62); 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_PredeployJob_descriptor = - getDescriptor().getMessageTypes().get(58); + getDescriptor().getMessageTypes().get(63); internal_static_google_cloud_deploy_v1_PredeployJob_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_PredeployJob_descriptor, @@ -1969,7 +2411,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Actions", }); internal_static_google_cloud_deploy_v1_PostdeployJob_descriptor = - getDescriptor().getMessageTypes().get(59); + getDescriptor().getMessageTypes().get(64); internal_static_google_cloud_deploy_v1_PostdeployJob_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_PostdeployJob_descriptor, @@ -1977,19 +2419,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Actions", }); internal_static_google_cloud_deploy_v1_CreateChildRolloutJob_descriptor = - getDescriptor().getMessageTypes().get(60); + getDescriptor().getMessageTypes().get(65); internal_static_google_cloud_deploy_v1_CreateChildRolloutJob_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_CreateChildRolloutJob_descriptor, new java.lang.String[] {}); internal_static_google_cloud_deploy_v1_AdvanceChildRolloutJob_descriptor = - getDescriptor().getMessageTypes().get(61); + getDescriptor().getMessageTypes().get(66); internal_static_google_cloud_deploy_v1_AdvanceChildRolloutJob_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_AdvanceChildRolloutJob_descriptor, new java.lang.String[] {}); internal_static_google_cloud_deploy_v1_ListRolloutsRequest_descriptor = - getDescriptor().getMessageTypes().get(62); + getDescriptor().getMessageTypes().get(67); internal_static_google_cloud_deploy_v1_ListRolloutsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ListRolloutsRequest_descriptor, @@ -1997,7 +2439,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(63); + getDescriptor().getMessageTypes().get(68); internal_static_google_cloud_deploy_v1_ListRolloutsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ListRolloutsResponse_descriptor, @@ -2005,7 +2447,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Rollouts", "NextPageToken", "Unreachable", }); internal_static_google_cloud_deploy_v1_GetRolloutRequest_descriptor = - getDescriptor().getMessageTypes().get(64); + getDescriptor().getMessageTypes().get(69); internal_static_google_cloud_deploy_v1_GetRolloutRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_GetRolloutRequest_descriptor, @@ -2013,7 +2455,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_deploy_v1_CreateRolloutRequest_descriptor = - getDescriptor().getMessageTypes().get(65); + getDescriptor().getMessageTypes().get(70); internal_static_google_cloud_deploy_v1_CreateRolloutRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_CreateRolloutRequest_descriptor, @@ -2021,7 +2463,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "RolloutId", "Rollout", "RequestId", "ValidateOnly", "StartingPhaseId", }); internal_static_google_cloud_deploy_v1_OperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(66); + getDescriptor().getMessageTypes().get(71); internal_static_google_cloud_deploy_v1_OperationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_OperationMetadata_descriptor, @@ -2035,7 +2477,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ApiVersion", }); internal_static_google_cloud_deploy_v1_ApproveRolloutRequest_descriptor = - getDescriptor().getMessageTypes().get(67); + getDescriptor().getMessageTypes().get(72); internal_static_google_cloud_deploy_v1_ApproveRolloutRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ApproveRolloutRequest_descriptor, @@ -2043,13 +2485,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "Approved", }); internal_static_google_cloud_deploy_v1_ApproveRolloutResponse_descriptor = - getDescriptor().getMessageTypes().get(68); + getDescriptor().getMessageTypes().get(73); 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_AdvanceRolloutRequest_descriptor = - getDescriptor().getMessageTypes().get(69); + getDescriptor().getMessageTypes().get(74); internal_static_google_cloud_deploy_v1_AdvanceRolloutRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_AdvanceRolloutRequest_descriptor, @@ -2057,13 +2499,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "PhaseId", }); internal_static_google_cloud_deploy_v1_AdvanceRolloutResponse_descriptor = - getDescriptor().getMessageTypes().get(70); + getDescriptor().getMessageTypes().get(75); internal_static_google_cloud_deploy_v1_AdvanceRolloutResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_AdvanceRolloutResponse_descriptor, new java.lang.String[] {}); internal_static_google_cloud_deploy_v1_CancelRolloutRequest_descriptor = - getDescriptor().getMessageTypes().get(71); + getDescriptor().getMessageTypes().get(76); internal_static_google_cloud_deploy_v1_CancelRolloutRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_CancelRolloutRequest_descriptor, @@ -2071,13 +2513,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_deploy_v1_CancelRolloutResponse_descriptor = - getDescriptor().getMessageTypes().get(72); + getDescriptor().getMessageTypes().get(77); internal_static_google_cloud_deploy_v1_CancelRolloutResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_CancelRolloutResponse_descriptor, new java.lang.String[] {}); internal_static_google_cloud_deploy_v1_IgnoreJobRequest_descriptor = - getDescriptor().getMessageTypes().get(73); + getDescriptor().getMessageTypes().get(78); internal_static_google_cloud_deploy_v1_IgnoreJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_IgnoreJobRequest_descriptor, @@ -2085,13 +2527,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Rollout", "PhaseId", "JobId", }); internal_static_google_cloud_deploy_v1_IgnoreJobResponse_descriptor = - getDescriptor().getMessageTypes().get(74); + getDescriptor().getMessageTypes().get(79); internal_static_google_cloud_deploy_v1_IgnoreJobResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_IgnoreJobResponse_descriptor, new java.lang.String[] {}); internal_static_google_cloud_deploy_v1_RetryJobRequest_descriptor = - getDescriptor().getMessageTypes().get(75); + getDescriptor().getMessageTypes().get(80); internal_static_google_cloud_deploy_v1_RetryJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_RetryJobRequest_descriptor, @@ -2099,13 +2541,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Rollout", "PhaseId", "JobId", }); internal_static_google_cloud_deploy_v1_RetryJobResponse_descriptor = - getDescriptor().getMessageTypes().get(76); + getDescriptor().getMessageTypes().get(81); 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(77); + getDescriptor().getMessageTypes().get(82); internal_static_google_cloud_deploy_v1_AbandonReleaseRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_AbandonReleaseRequest_descriptor, @@ -2113,13 +2555,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_deploy_v1_AbandonReleaseResponse_descriptor = - getDescriptor().getMessageTypes().get(78); + getDescriptor().getMessageTypes().get(83); 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(79); + getDescriptor().getMessageTypes().get(84); internal_static_google_cloud_deploy_v1_JobRun_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_JobRun_descriptor, @@ -2142,7 +2584,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "JobRun", }); internal_static_google_cloud_deploy_v1_DeployJobRun_descriptor = - getDescriptor().getMessageTypes().get(80); + getDescriptor().getMessageTypes().get(85); internal_static_google_cloud_deploy_v1_DeployJobRun_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_DeployJobRun_descriptor, @@ -2150,7 +2592,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Build", "FailureCause", "FailureMessage", "Metadata", "Artifact", }); internal_static_google_cloud_deploy_v1_VerifyJobRun_descriptor = - getDescriptor().getMessageTypes().get(81); + getDescriptor().getMessageTypes().get(86); internal_static_google_cloud_deploy_v1_VerifyJobRun_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_VerifyJobRun_descriptor, @@ -2158,7 +2600,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Build", "ArtifactUri", "EventLogPath", "FailureCause", "FailureMessage", }); internal_static_google_cloud_deploy_v1_PredeployJobRun_descriptor = - getDescriptor().getMessageTypes().get(82); + getDescriptor().getMessageTypes().get(87); internal_static_google_cloud_deploy_v1_PredeployJobRun_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_PredeployJobRun_descriptor, @@ -2166,7 +2608,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Build", "FailureCause", "FailureMessage", }); internal_static_google_cloud_deploy_v1_PostdeployJobRun_descriptor = - getDescriptor().getMessageTypes().get(83); + getDescriptor().getMessageTypes().get(88); internal_static_google_cloud_deploy_v1_PostdeployJobRun_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_PostdeployJobRun_descriptor, @@ -2174,7 +2616,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Build", "FailureCause", "FailureMessage", }); internal_static_google_cloud_deploy_v1_CreateChildRolloutJobRun_descriptor = - getDescriptor().getMessageTypes().get(84); + getDescriptor().getMessageTypes().get(89); internal_static_google_cloud_deploy_v1_CreateChildRolloutJobRun_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_CreateChildRolloutJobRun_descriptor, @@ -2182,7 +2624,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Rollout", "RolloutPhaseId", }); internal_static_google_cloud_deploy_v1_AdvanceChildRolloutJobRun_descriptor = - getDescriptor().getMessageTypes().get(85); + getDescriptor().getMessageTypes().get(90); internal_static_google_cloud_deploy_v1_AdvanceChildRolloutJobRun_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_AdvanceChildRolloutJobRun_descriptor, @@ -2190,7 +2632,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Rollout", "RolloutPhaseId", }); internal_static_google_cloud_deploy_v1_ListJobRunsRequest_descriptor = - getDescriptor().getMessageTypes().get(86); + getDescriptor().getMessageTypes().get(91); internal_static_google_cloud_deploy_v1_ListJobRunsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ListJobRunsRequest_descriptor, @@ -2198,7 +2640,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "Filter", "OrderBy", }); internal_static_google_cloud_deploy_v1_ListJobRunsResponse_descriptor = - getDescriptor().getMessageTypes().get(87); + getDescriptor().getMessageTypes().get(92); internal_static_google_cloud_deploy_v1_ListJobRunsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ListJobRunsResponse_descriptor, @@ -2206,7 +2648,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "JobRuns", "NextPageToken", "Unreachable", }); internal_static_google_cloud_deploy_v1_GetJobRunRequest_descriptor = - getDescriptor().getMessageTypes().get(88); + getDescriptor().getMessageTypes().get(93); internal_static_google_cloud_deploy_v1_GetJobRunRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_GetJobRunRequest_descriptor, @@ -2214,7 +2656,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_deploy_v1_TerminateJobRunRequest_descriptor = - getDescriptor().getMessageTypes().get(89); + getDescriptor().getMessageTypes().get(94); internal_static_google_cloud_deploy_v1_TerminateJobRunRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_TerminateJobRunRequest_descriptor, @@ -2222,13 +2664,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_deploy_v1_TerminateJobRunResponse_descriptor = - getDescriptor().getMessageTypes().get(90); + getDescriptor().getMessageTypes().get(95); internal_static_google_cloud_deploy_v1_TerminateJobRunResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_TerminateJobRunResponse_descriptor, new java.lang.String[] {}); internal_static_google_cloud_deploy_v1_Config_descriptor = - getDescriptor().getMessageTypes().get(91); + getDescriptor().getMessageTypes().get(96); internal_static_google_cloud_deploy_v1_Config_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_Config_descriptor, @@ -2236,7 +2678,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "SupportedVersions", "DefaultSkaffoldVersion", }); internal_static_google_cloud_deploy_v1_SkaffoldVersion_descriptor = - getDescriptor().getMessageTypes().get(92); + getDescriptor().getMessageTypes().get(97); internal_static_google_cloud_deploy_v1_SkaffoldVersion_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_SkaffoldVersion_descriptor, @@ -2244,13 +2686,286 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Version", "MaintenanceModeTime", "SupportExpirationTime", "SupportEndDate", }); internal_static_google_cloud_deploy_v1_GetConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(93); + getDescriptor().getMessageTypes().get(98); internal_static_google_cloud_deploy_v1_GetConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_GetConfigRequest_descriptor, new java.lang.String[] { "Name", }); + internal_static_google_cloud_deploy_v1_Automation_descriptor = + getDescriptor().getMessageTypes().get(99); + internal_static_google_cloud_deploy_v1_Automation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Automation_descriptor, + new java.lang.String[] { + "Name", + "Uid", + "Description", + "CreateTime", + "UpdateTime", + "Annotations", + "Labels", + "Etag", + "Suspended", + "ServiceAccount", + "Selector", + "Rules", + }); + internal_static_google_cloud_deploy_v1_Automation_AnnotationsEntry_descriptor = + internal_static_google_cloud_deploy_v1_Automation_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_deploy_v1_Automation_AnnotationsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Automation_AnnotationsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_deploy_v1_Automation_LabelsEntry_descriptor = + internal_static_google_cloud_deploy_v1_Automation_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_deploy_v1_Automation_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Automation_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_deploy_v1_AutomationResourceSelector_descriptor = + getDescriptor().getMessageTypes().get(100); + internal_static_google_cloud_deploy_v1_AutomationResourceSelector_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_AutomationResourceSelector_descriptor, + new java.lang.String[] { + "Targets", + }); + internal_static_google_cloud_deploy_v1_AutomationRule_descriptor = + getDescriptor().getMessageTypes().get(101); + internal_static_google_cloud_deploy_v1_AutomationRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_AutomationRule_descriptor, + new java.lang.String[] { + "PromoteReleaseRule", "AdvanceRolloutRule", "RepairRolloutRule", "Rule", + }); + internal_static_google_cloud_deploy_v1_PromoteReleaseRule_descriptor = + getDescriptor().getMessageTypes().get(102); + internal_static_google_cloud_deploy_v1_PromoteReleaseRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_PromoteReleaseRule_descriptor, + new java.lang.String[] { + "Id", "Wait", "DestinationTargetId", "Condition", "DestinationPhase", + }); + internal_static_google_cloud_deploy_v1_AdvanceRolloutRule_descriptor = + getDescriptor().getMessageTypes().get(103); + internal_static_google_cloud_deploy_v1_AdvanceRolloutRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_AdvanceRolloutRule_descriptor, + new java.lang.String[] { + "Id", "SourcePhases", "Wait", "Condition", + }); + internal_static_google_cloud_deploy_v1_RepairRolloutRule_descriptor = + getDescriptor().getMessageTypes().get(104); + internal_static_google_cloud_deploy_v1_RepairRolloutRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_RepairRolloutRule_descriptor, + new java.lang.String[] { + "Id", "SourcePhases", "Jobs", "RepairModes", "Condition", + }); + internal_static_google_cloud_deploy_v1_RepairMode_descriptor = + getDescriptor().getMessageTypes().get(105); + internal_static_google_cloud_deploy_v1_RepairMode_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_RepairMode_descriptor, + new java.lang.String[] { + "Retry", "Rollback", "Mode", + }); + internal_static_google_cloud_deploy_v1_Retry_descriptor = + getDescriptor().getMessageTypes().get(106); + internal_static_google_cloud_deploy_v1_Retry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Retry_descriptor, + new java.lang.String[] { + "Attempts", "Wait", "BackoffMode", + }); + internal_static_google_cloud_deploy_v1_Rollback_descriptor = + getDescriptor().getMessageTypes().get(107); + internal_static_google_cloud_deploy_v1_Rollback_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_Rollback_descriptor, + new java.lang.String[] { + "DestinationPhase", + }); + internal_static_google_cloud_deploy_v1_AutomationRuleCondition_descriptor = + getDescriptor().getMessageTypes().get(108); + internal_static_google_cloud_deploy_v1_AutomationRuleCondition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_AutomationRuleCondition_descriptor, + new java.lang.String[] { + "TargetsPresentCondition", + }); + internal_static_google_cloud_deploy_v1_CreateAutomationRequest_descriptor = + getDescriptor().getMessageTypes().get(109); + internal_static_google_cloud_deploy_v1_CreateAutomationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_CreateAutomationRequest_descriptor, + new java.lang.String[] { + "Parent", "AutomationId", "Automation", "RequestId", "ValidateOnly", + }); + internal_static_google_cloud_deploy_v1_UpdateAutomationRequest_descriptor = + getDescriptor().getMessageTypes().get(110); + internal_static_google_cloud_deploy_v1_UpdateAutomationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_UpdateAutomationRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "Automation", "RequestId", "AllowMissing", "ValidateOnly", + }); + internal_static_google_cloud_deploy_v1_DeleteAutomationRequest_descriptor = + getDescriptor().getMessageTypes().get(111); + internal_static_google_cloud_deploy_v1_DeleteAutomationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_DeleteAutomationRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", "AllowMissing", "ValidateOnly", "Etag", + }); + internal_static_google_cloud_deploy_v1_ListAutomationsRequest_descriptor = + getDescriptor().getMessageTypes().get(112); + internal_static_google_cloud_deploy_v1_ListAutomationsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_ListAutomationsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_deploy_v1_ListAutomationsResponse_descriptor = + getDescriptor().getMessageTypes().get(113); + internal_static_google_cloud_deploy_v1_ListAutomationsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_ListAutomationsResponse_descriptor, + new java.lang.String[] { + "Automations", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_deploy_v1_GetAutomationRequest_descriptor = + getDescriptor().getMessageTypes().get(114); + internal_static_google_cloud_deploy_v1_GetAutomationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_GetAutomationRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_deploy_v1_AutomationRun_descriptor = + getDescriptor().getMessageTypes().get(115); + internal_static_google_cloud_deploy_v1_AutomationRun_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_AutomationRun_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Etag", + "ServiceAccount", + "AutomationSnapshot", + "TargetId", + "State", + "StateDescription", + "ExpireTime", + "RuleId", + "AutomationId", + "PromoteReleaseOperation", + "AdvanceRolloutOperation", + "RepairRolloutOperation", + "WaitUntilTime", + "Operation", + }); + internal_static_google_cloud_deploy_v1_PromoteReleaseOperation_descriptor = + getDescriptor().getMessageTypes().get(116); + internal_static_google_cloud_deploy_v1_PromoteReleaseOperation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_PromoteReleaseOperation_descriptor, + new java.lang.String[] { + "TargetId", "Wait", "Rollout", "Phase", + }); + internal_static_google_cloud_deploy_v1_AdvanceRolloutOperation_descriptor = + getDescriptor().getMessageTypes().get(117); + internal_static_google_cloud_deploy_v1_AdvanceRolloutOperation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_AdvanceRolloutOperation_descriptor, + new java.lang.String[] { + "SourcePhase", "Wait", "Rollout", "DestinationPhase", + }); + internal_static_google_cloud_deploy_v1_RepairRolloutOperation_descriptor = + getDescriptor().getMessageTypes().get(118); + internal_static_google_cloud_deploy_v1_RepairRolloutOperation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_RepairRolloutOperation_descriptor, + new java.lang.String[] { + "Rollout", "CurrentRepairModeIndex", "RepairPhases", + }); + internal_static_google_cloud_deploy_v1_RepairPhase_descriptor = + getDescriptor().getMessageTypes().get(119); + internal_static_google_cloud_deploy_v1_RepairPhase_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_RepairPhase_descriptor, + new java.lang.String[] { + "Retry", "Rollback", "RepairPhase", + }); + internal_static_google_cloud_deploy_v1_RetryPhase_descriptor = + getDescriptor().getMessageTypes().get(120); + internal_static_google_cloud_deploy_v1_RetryPhase_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_RetryPhase_descriptor, + new java.lang.String[] { + "TotalAttempts", "BackoffMode", "PhaseId", "JobId", "Attempts", + }); + internal_static_google_cloud_deploy_v1_RetryAttempt_descriptor = + getDescriptor().getMessageTypes().get(121); + internal_static_google_cloud_deploy_v1_RetryAttempt_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_RetryAttempt_descriptor, + new java.lang.String[] { + "Attempt", "Wait", "State", "StateDesc", + }); + internal_static_google_cloud_deploy_v1_RollbackAttempt_descriptor = + getDescriptor().getMessageTypes().get(122); + internal_static_google_cloud_deploy_v1_RollbackAttempt_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_RollbackAttempt_descriptor, + new java.lang.String[] { + "DestinationPhase", "RolloutId", "State", "StateDesc", + }); + internal_static_google_cloud_deploy_v1_ListAutomationRunsRequest_descriptor = + getDescriptor().getMessageTypes().get(123); + internal_static_google_cloud_deploy_v1_ListAutomationRunsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_ListAutomationRunsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_deploy_v1_ListAutomationRunsResponse_descriptor = + getDescriptor().getMessageTypes().get(124); + internal_static_google_cloud_deploy_v1_ListAutomationRunsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_ListAutomationRunsResponse_descriptor, + new java.lang.String[] { + "AutomationRuns", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_deploy_v1_GetAutomationRunRequest_descriptor = + getDescriptor().getMessageTypes().get(125); + internal_static_google_cloud_deploy_v1_GetAutomationRunRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_GetAutomationRunRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_deploy_v1_CancelAutomationRunRequest_descriptor = + getDescriptor().getMessageTypes().get(126); + internal_static_google_cloud_deploy_v1_CancelAutomationRunRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_CancelAutomationRunRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_deploy_v1_CancelAutomationRunResponse_descriptor = + getDescriptor().getMessageTypes().get(127); + internal_static_google_cloud_deploy_v1_CancelAutomationRunResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_CancelAutomationRunResponse_descriptor, + new java.lang.String[] {}); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunMetadata.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunMetadata.java index 434f3e15f94f..be1d96230268 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunMetadata.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunMetadata.java @@ -41,6 +41,7 @@ private CloudRunMetadata() { service_ = ""; serviceUrls_ = com.google.protobuf.LazyStringArrayList.emptyList(); revision_ = ""; + job_ = ""; } @java.lang.Override @@ -74,7 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Output only. The name of the Cloud Run Service that is associated with a
    * `Rollout`. Format is
-   * projects/{project}/locations/{location}/services/{service}.
+   * `projects/{project}/locations/{location}/services/{service}`.
    * 
* * @@ -101,7 +102,7 @@ public 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}.
+   * `projects/{project}/locations/{location}/services/{service}`.
    * 
* * @@ -242,6 +243,65 @@ public com.google.protobuf.ByteString getRevisionBytes() { } } + public static final int JOB_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object job_ = ""; + /** + * + * + *
+   * Output only. The name of the Cloud Run job that is associated with a
+   * `Rollout`. Format is
+   * `projects/{project}/locations/{location}/jobs/{job_name}`.
+   * 
+ * + * + * string job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The job. + */ + @java.lang.Override + public java.lang.String getJob() { + java.lang.Object ref = job_; + 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(); + job_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of the Cloud Run job that is associated with a
+   * `Rollout`. Format is
+   * `projects/{project}/locations/{location}/jobs/{job_name}`.
+   * 
+ * + * + * string job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for job. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJobBytes() { + java.lang.Object ref = job_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + job_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -265,6 +325,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revision_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, revision_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(job_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, job_); + } getUnknownFields().writeTo(output); } @@ -288,6 +351,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revision_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, revision_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(job_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, job_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -307,6 +373,7 @@ public boolean equals(final java.lang.Object obj) { if (!getService().equals(other.getService())) return false; if (!getServiceUrlsList().equals(other.getServiceUrlsList())) return false; if (!getRevision().equals(other.getRevision())) return false; + if (!getJob().equals(other.getJob())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -326,6 +393,8 @@ public int hashCode() { } hash = (37 * hash) + REVISION_FIELD_NUMBER; hash = (53 * hash) + getRevision().hashCode(); + hash = (37 * hash) + JOB_FIELD_NUMBER; + hash = (53 * hash) + getJob().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -468,6 +537,7 @@ public Builder clear() { service_ = ""; serviceUrls_ = com.google.protobuf.LazyStringArrayList.emptyList(); revision_ = ""; + job_ = ""; return this; } @@ -514,6 +584,9 @@ private void buildPartial0(com.google.cloud.deploy.v1.CloudRunMetadata result) { if (((from_bitField0_ & 0x00000004) != 0)) { result.revision_ = revision_; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.job_ = job_; + } } @java.lang.Override @@ -581,6 +654,11 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.CloudRunMetadata other) { bitField0_ |= 0x00000004; onChanged(); } + if (!other.getJob().isEmpty()) { + job_ = other.job_; + bitField0_ |= 0x00000008; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -626,6 +704,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 34: + { + job_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -652,7 +736,7 @@ public Builder mergeFrom( *
      * Output only. The name of the Cloud Run Service that is associated with a
      * `Rollout`. Format is
-     * projects/{project}/locations/{location}/services/{service}.
+     * `projects/{project}/locations/{location}/services/{service}`.
      * 
* * @@ -678,7 +762,7 @@ public 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}.
+     * `projects/{project}/locations/{location}/services/{service}`.
      * 
* * @@ -704,7 +788,7 @@ public com.google.protobuf.ByteString getServiceBytes() { *
      * Output only. The name of the Cloud Run Service that is associated with a
      * `Rollout`. Format is
-     * projects/{project}/locations/{location}/services/{service}.
+     * `projects/{project}/locations/{location}/services/{service}`.
      * 
* * @@ -729,7 +813,7 @@ public Builder setService(java.lang.String value) { *
      * Output only. The name of the Cloud Run Service that is associated with a
      * `Rollout`. Format is
-     * projects/{project}/locations/{location}/services/{service}.
+     * `projects/{project}/locations/{location}/services/{service}`.
      * 
* * @@ -750,7 +834,7 @@ public Builder clearService() { *
      * Output only. The name of the Cloud Run Service that is associated with a
      * `Rollout`. Format is
-     * projects/{project}/locations/{location}/services/{service}.
+     * `projects/{project}/locations/{location}/services/{service}`.
      * 
* * @@ -1060,6 +1144,132 @@ public Builder setRevisionBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object job_ = ""; + /** + * + * + *
+     * Output only. The name of the Cloud Run job that is associated with a
+     * `Rollout`. Format is
+     * `projects/{project}/locations/{location}/jobs/{job_name}`.
+     * 
+ * + * + * string job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The job. + */ + public java.lang.String getJob() { + java.lang.Object ref = job_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + job_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of the Cloud Run job that is associated with a
+     * `Rollout`. Format is
+     * `projects/{project}/locations/{location}/jobs/{job_name}`.
+     * 
+ * + * + * string job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for job. + */ + public com.google.protobuf.ByteString getJobBytes() { + java.lang.Object ref = job_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + job_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of the Cloud Run job that is associated with a
+     * `Rollout`. Format is
+     * `projects/{project}/locations/{location}/jobs/{job_name}`.
+     * 
+ * + * + * string job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The job to set. + * @return This builder for chaining. + */ + public Builder setJob(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + job_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the Cloud Run job that is associated with a
+     * `Rollout`. Format is
+     * `projects/{project}/locations/{location}/jobs/{job_name}`.
+     * 
+ * + * + * string job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearJob() { + job_ = getDefaultInstance().getJob(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the Cloud Run job that is associated with a
+     * `Rollout`. Format is
+     * `projects/{project}/locations/{location}/jobs/{job_name}`.
+     * 
+ * + * + * string job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for job to set. + * @return This builder for chaining. + */ + public Builder setJobBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + job_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunMetadataOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunMetadataOrBuilder.java index 0de3cc2f4531..480b291c4631 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunMetadataOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunMetadataOrBuilder.java @@ -29,7 +29,7 @@ public interface CloudRunMetadataOrBuilder *
    * Output only. The name of the Cloud Run Service that is associated with a
    * `Rollout`. Format is
-   * projects/{project}/locations/{location}/services/{service}.
+   * `projects/{project}/locations/{location}/services/{service}`.
    * 
* * @@ -45,7 +45,7 @@ public interface CloudRunMetadataOrBuilder *
    * Output only. The name of the Cloud Run Service that is associated with a
    * `Rollout`. Format is
-   * projects/{project}/locations/{location}/services/{service}.
+   * `projects/{project}/locations/{location}/services/{service}`.
    * 
* * @@ -135,4 +135,37 @@ public interface CloudRunMetadataOrBuilder * @return The bytes for revision. */ com.google.protobuf.ByteString getRevisionBytes(); + + /** + * + * + *
+   * Output only. The name of the Cloud Run job that is associated with a
+   * `Rollout`. Format is
+   * `projects/{project}/locations/{location}/jobs/{job_name}`.
+   * 
+ * + * + * string job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The job. + */ + java.lang.String getJob(); + /** + * + * + *
+   * Output only. The name of the Cloud Run job that is associated with a
+   * `Rollout`. Format is
+   * `projects/{project}/locations/{location}/jobs/{job_name}`.
+   * 
+ * + * + * string job = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for job. + */ + com.google.protobuf.ByteString getJobBytes(); } diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunRenderMetadata.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunRenderMetadata.java index a1b665796f74..f4afa0bc80c4 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunRenderMetadata.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunRenderMetadata.java @@ -72,7 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Output only. The name of the Cloud Run Service in the rendered manifest.
-   * Format is projects/{project}/locations/{location}/services/{service}.
+   * Format is `projects/{project}/locations/{location}/services/{service}`.
    * 
* * @@ -98,7 +98,7 @@ public java.lang.String getService() { * *
    * Output only. The name of the Cloud Run Service in the rendered manifest.
-   * Format is projects/{project}/locations/{location}/services/{service}.
+   * Format is `projects/{project}/locations/{location}/services/{service}`.
    * 
* * @@ -469,7 +469,7 @@ public Builder mergeFrom( * *
      * Output only. The name of the Cloud Run Service in the rendered manifest.
-     * Format is projects/{project}/locations/{location}/services/{service}.
+     * Format is `projects/{project}/locations/{location}/services/{service}`.
      * 
* * @@ -494,7 +494,7 @@ public java.lang.String getService() { * *
      * Output only. The name of the Cloud Run Service in the rendered manifest.
-     * Format is projects/{project}/locations/{location}/services/{service}.
+     * Format is `projects/{project}/locations/{location}/services/{service}`.
      * 
* * @@ -519,7 +519,7 @@ public com.google.protobuf.ByteString getServiceBytes() { * *
      * Output only. The name of the Cloud Run Service in the rendered manifest.
-     * Format is projects/{project}/locations/{location}/services/{service}.
+     * Format is `projects/{project}/locations/{location}/services/{service}`.
      * 
* * @@ -543,7 +543,7 @@ public Builder setService(java.lang.String value) { * *
      * Output only. The name of the Cloud Run Service in the rendered manifest.
-     * Format is projects/{project}/locations/{location}/services/{service}.
+     * Format is `projects/{project}/locations/{location}/services/{service}`.
      * 
* * @@ -563,7 +563,7 @@ public Builder clearService() { * *
      * Output only. The name of the Cloud Run Service in the rendered manifest.
-     * Format is projects/{project}/locations/{location}/services/{service}.
+     * Format is `projects/{project}/locations/{location}/services/{service}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunRenderMetadataOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunRenderMetadataOrBuilder.java index 0da6ecaca1b9..04d24243619f 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunRenderMetadataOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CloudRunRenderMetadataOrBuilder.java @@ -28,7 +28,7 @@ public interface CloudRunRenderMetadataOrBuilder * *
    * Output only. The name of the Cloud Run Service in the rendered manifest.
-   * Format is projects/{project}/locations/{location}/services/{service}.
+   * Format is `projects/{project}/locations/{location}/services/{service}`.
    * 
* * @@ -43,7 +43,7 @@ public interface CloudRunRenderMetadataOrBuilder * *
    * Output only. The name of the Cloud Run Service in the rendered manifest.
-   * Format is projects/{project}/locations/{location}/services/{service}.
+   * Format is `projects/{project}/locations/{location}/services/{service}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateAutomationRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateAutomationRequest.java new file mode 100644 index 000000000000..d18021d6692d --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateAutomationRequest.java @@ -0,0 +1,1485 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 for `CreateAutomation`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.CreateAutomationRequest} + */ +public final class CreateAutomationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.CreateAutomationRequest) + CreateAutomationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateAutomationRequest.newBuilder() to construct. + private CreateAutomationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateAutomationRequest() { + parent_ = ""; + automationId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateAutomationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateAutomationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateAutomationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.CreateAutomationRequest.class, + com.google.cloud.deploy.v1.CreateAutomationRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent collection in which the `Automation` should be
+   * created. Format should be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent collection in which the `Automation` should be
+   * created. Format should be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+   * 
+ * + * + * 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 AUTOMATION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object automationId_ = ""; + /** + * + * + *
+   * Required. ID of the `Automation`.
+   * 
+ * + * string automation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The automationId. + */ + @java.lang.Override + public java.lang.String getAutomationId() { + java.lang.Object ref = automationId_; + 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(); + automationId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. ID of the `Automation`.
+   * 
+ * + * string automation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for automationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAutomationIdBytes() { + java.lang.Object ref = automationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + automationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTOMATION_FIELD_NUMBER = 3; + private com.google.cloud.deploy.v1.Automation automation_; + /** + * + * + *
+   * Required. The `Automation` to create.
+   * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the automation field is set. + */ + @java.lang.Override + public boolean hasAutomation() { + return automation_ != null; + } + /** + * + * + *
+   * Required. The `Automation` to create.
+   * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The automation. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Automation getAutomation() { + return automation_ == null + ? com.google.cloud.deploy.v1.Automation.getDefaultInstance() + : automation_; + } + /** + * + * + *
+   * Required. The `Automation` to create.
+   * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationOrBuilder getAutomationOrBuilder() { + return automation_ == null + ? com.google.cloud.deploy.v1.Automation.getDefaultInstance() + : automation_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 5; + private boolean validateOnly_ = false; + /** + * + * + *
+   * Optional. If set to true, the request is validated and the user is provided
+   * with an expected result, but no actual change is made.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(automationId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, automationId_); + } + if (automation_ != null) { + output.writeMessage(3, getAutomation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + if (validateOnly_ != false) { + output.writeBool(5, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(automationId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, automationId_); + } + if (automation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAutomation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.CreateAutomationRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.CreateAutomationRequest other = + (com.google.cloud.deploy.v1.CreateAutomationRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getAutomationId().equals(other.getAutomationId())) return false; + if (hasAutomation() != other.hasAutomation()) return false; + if (hasAutomation()) { + if (!getAutomation().equals(other.getAutomation())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + AUTOMATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getAutomationId().hashCode(); + if (hasAutomation()) { + hash = (37 * hash) + AUTOMATION_FIELD_NUMBER; + hash = (53 * hash) + getAutomation().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.CreateAutomationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CreateAutomationRequest 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.CreateAutomationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CreateAutomationRequest 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.CreateAutomationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.CreateAutomationRequest 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.CreateAutomationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CreateAutomationRequest 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.CreateAutomationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.CreateAutomationRequest 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.CreateAutomationRequest 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.CreateAutomationRequest 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.CreateAutomationRequest 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 for `CreateAutomation`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.CreateAutomationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.CreateAutomationRequest) + com.google.cloud.deploy.v1.CreateAutomationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateAutomationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_CreateAutomationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.CreateAutomationRequest.class, + com.google.cloud.deploy.v1.CreateAutomationRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.CreateAutomationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + automationId_ = ""; + automation_ = null; + if (automationBuilder_ != null) { + automationBuilder_.dispose(); + automationBuilder_ = null; + } + requestId_ = ""; + validateOnly_ = 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_CreateAutomationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CreateAutomationRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.CreateAutomationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CreateAutomationRequest build() { + com.google.cloud.deploy.v1.CreateAutomationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.CreateAutomationRequest buildPartial() { + com.google.cloud.deploy.v1.CreateAutomationRequest result = + new com.google.cloud.deploy.v1.CreateAutomationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.CreateAutomationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.automationId_ = automationId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.automation_ = automationBuilder_ == null ? automation_ : automationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.validateOnly_ = validateOnly_; + } + } + + @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.CreateAutomationRequest) { + return mergeFrom((com.google.cloud.deploy.v1.CreateAutomationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.CreateAutomationRequest other) { + if (other == com.google.cloud.deploy.v1.CreateAutomationRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAutomationId().isEmpty()) { + automationId_ = other.automationId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasAutomation()) { + mergeAutomation(other.getAutomation()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + automationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getAutomationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000010; + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent collection in which the `Automation` should be
+     * created. Format should be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent collection in which the `Automation` should be
+     * created. Format should be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent collection in which the `Automation` should be
+     * created. Format should be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent collection in which the `Automation` should be
+     * created. Format should be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent collection in which the `Automation` should be
+     * created. Format should be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object automationId_ = ""; + /** + * + * + *
+     * Required. ID of the `Automation`.
+     * 
+ * + * string automation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The automationId. + */ + public java.lang.String getAutomationId() { + java.lang.Object ref = automationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + automationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. ID of the `Automation`.
+     * 
+ * + * string automation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for automationId. + */ + public com.google.protobuf.ByteString getAutomationIdBytes() { + java.lang.Object ref = automationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + automationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. ID of the `Automation`.
+     * 
+ * + * string automation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The automationId to set. + * @return This builder for chaining. + */ + public Builder setAutomationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + automationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the `Automation`.
+     * 
+ * + * string automation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAutomationId() { + automationId_ = getDefaultInstance().getAutomationId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the `Automation`.
+     * 
+ * + * string automation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for automationId to set. + * @return This builder for chaining. + */ + public Builder setAutomationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + automationId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.deploy.v1.Automation automation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Automation, + com.google.cloud.deploy.v1.Automation.Builder, + com.google.cloud.deploy.v1.AutomationOrBuilder> + automationBuilder_; + /** + * + * + *
+     * Required. The `Automation` to create.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the automation field is set. + */ + public boolean hasAutomation() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The `Automation` to create.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The automation. + */ + public com.google.cloud.deploy.v1.Automation getAutomation() { + if (automationBuilder_ == null) { + return automation_ == null + ? com.google.cloud.deploy.v1.Automation.getDefaultInstance() + : automation_; + } else { + return automationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The `Automation` to create.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutomation(com.google.cloud.deploy.v1.Automation value) { + if (automationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + automation_ = value; + } else { + automationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `Automation` to create.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutomation(com.google.cloud.deploy.v1.Automation.Builder builderForValue) { + if (automationBuilder_ == null) { + automation_ = builderForValue.build(); + } else { + automationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `Automation` to create.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAutomation(com.google.cloud.deploy.v1.Automation value) { + if (automationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && automation_ != null + && automation_ != com.google.cloud.deploy.v1.Automation.getDefaultInstance()) { + getAutomationBuilder().mergeFrom(value); + } else { + automation_ = value; + } + } else { + automationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `Automation` to create.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAutomation() { + bitField0_ = (bitField0_ & ~0x00000004); + automation_ = null; + if (automationBuilder_ != null) { + automationBuilder_.dispose(); + automationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `Automation` to create.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.Automation.Builder getAutomationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAutomationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The `Automation` to create.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.AutomationOrBuilder getAutomationOrBuilder() { + if (automationBuilder_ != null) { + return automationBuilder_.getMessageOrBuilder(); + } else { + return automation_ == null + ? com.google.cloud.deploy.v1.Automation.getDefaultInstance() + : automation_; + } + } + /** + * + * + *
+     * Required. The `Automation` to create.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Automation, + com.google.cloud.deploy.v1.Automation.Builder, + com.google.cloud.deploy.v1.AutomationOrBuilder> + getAutomationFieldBuilder() { + if (automationBuilder_ == null) { + automationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Automation, + com.google.cloud.deploy.v1.Automation.Builder, + com.google.cloud.deploy.v1.AutomationOrBuilder>( + getAutomation(), getParentForChildren(), isClean()); + automation_ = null; + } + return automationBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided
+     * with an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided
+     * with an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided
+     * with an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000010); + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.CreateAutomationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.CreateAutomationRequest) + private static final com.google.cloud.deploy.v1.CreateAutomationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.CreateAutomationRequest(); + } + + public static com.google.cloud.deploy.v1.CreateAutomationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAutomationRequest 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.CreateAutomationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateAutomationRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateAutomationRequestOrBuilder.java new file mode 100644 index 000000000000..8e52292e0b66 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateAutomationRequestOrBuilder.java @@ -0,0 +1,187 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 CreateAutomationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.CreateAutomationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent collection in which the `Automation` should be
+   * created. Format should be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent collection in which the `Automation` should be
+   * created. Format should be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. ID of the `Automation`.
+   * 
+ * + * string automation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The automationId. + */ + java.lang.String getAutomationId(); + /** + * + * + *
+   * Required. ID of the `Automation`.
+   * 
+ * + * string automation_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for automationId. + */ + com.google.protobuf.ByteString getAutomationIdBytes(); + + /** + * + * + *
+   * Required. The `Automation` to create.
+   * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the automation field is set. + */ + boolean hasAutomation(); + /** + * + * + *
+   * Required. The `Automation` to create.
+   * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The automation. + */ + com.google.cloud.deploy.v1.Automation getAutomation(); + /** + * + * + *
+   * Required. The `Automation` to create.
+   * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.deploy.v1.AutomationOrBuilder getAutomationOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, the request is validated and the user is provided
+   * with an expected result, but no actual change is made.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateChildRolloutJobRun.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateChildRolloutJobRun.java index ff2faea83c81..c20fe178b56b 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateChildRolloutJobRun.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateChildRolloutJobRun.java @@ -72,9 +72,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Output only. Name of the `ChildRollout`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * Output only. Name of the `ChildRollout`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -97,9 +96,8 @@ public java.lang.String getRollout() { * * *
-   * Output only. Name of the `ChildRollout`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * Output only. Name of the `ChildRollout`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -542,9 +540,8 @@ public Builder mergeFrom( * * *
-     * Output only. Name of the `ChildRollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Output only. Name of the `ChildRollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -566,9 +563,8 @@ public java.lang.String getRollout() { * * *
-     * Output only. Name of the `ChildRollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Output only. Name of the `ChildRollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -590,9 +586,8 @@ public com.google.protobuf.ByteString getRolloutBytes() { * * *
-     * Output only. Name of the `ChildRollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Output only. Name of the `ChildRollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -613,9 +608,8 @@ public Builder setRollout(java.lang.String value) { * * *
-     * Output only. Name of the `ChildRollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Output only. Name of the `ChildRollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -632,9 +626,8 @@ public Builder clearRollout() { * * *
-     * Output only. Name of the `ChildRollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Output only. Name of the `ChildRollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateChildRolloutJobRunOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateChildRolloutJobRunOrBuilder.java index 3434515fcac8..f83512083ce4 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateChildRolloutJobRunOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateChildRolloutJobRunOrBuilder.java @@ -27,9 +27,8 @@ public interface CreateChildRolloutJobRunOrBuilder * * *
-   * Output only. Name of the `ChildRollout`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * Output only. Name of the `ChildRollout`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -41,9 +40,8 @@ public interface CreateChildRolloutJobRunOrBuilder * * *
-   * Output only. Name of the `ChildRollout`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * Output only. Name of the `ChildRollout`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequest.java index 8cc2eb6d7ab8..14cec2a7a79c 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequest.java @@ -73,7 +73,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The parent collection in which the `DeliveryPipeline` should be
-   * created. Format should be projects/{project_id}/locations/{location_name}.
+   * created. Format should be
+   * `projects/{project_id}/locations/{location_name}`.
    * 
* * @@ -99,7 +100,8 @@ public java.lang.String getParent() { * *
    * Required. The parent collection in which the `DeliveryPipeline` should be
-   * created. Format should be projects/{project_id}/locations/{location_name}.
+   * created. Format should be
+   * `projects/{project_id}/locations/{location_name}`.
    * 
* * @@ -774,7 +776,8 @@ public Builder mergeFrom( * *
      * Required. The parent collection in which the `DeliveryPipeline` should be
-     * created. Format should be projects/{project_id}/locations/{location_name}.
+     * created. Format should be
+     * `projects/{project_id}/locations/{location_name}`.
      * 
* * @@ -799,7 +802,8 @@ public java.lang.String getParent() { * *
      * Required. The parent collection in which the `DeliveryPipeline` should be
-     * created. Format should be projects/{project_id}/locations/{location_name}.
+     * created. Format should be
+     * `projects/{project_id}/locations/{location_name}`.
      * 
* * @@ -824,7 +828,8 @@ public com.google.protobuf.ByteString getParentBytes() { * *
      * Required. The parent collection in which the `DeliveryPipeline` should be
-     * created. Format should be projects/{project_id}/locations/{location_name}.
+     * created. Format should be
+     * `projects/{project_id}/locations/{location_name}`.
      * 
* * @@ -848,7 +853,8 @@ public Builder setParent(java.lang.String value) { * *
      * Required. The parent collection in which the `DeliveryPipeline` should be
-     * created. Format should be projects/{project_id}/locations/{location_name}.
+     * created. Format should be
+     * `projects/{project_id}/locations/{location_name}`.
      * 
* * @@ -868,7 +874,8 @@ public Builder clearParent() { * *
      * Required. The parent collection in which the `DeliveryPipeline` should be
-     * created. Format should be projects/{project_id}/locations/{location_name}.
+     * created. Format should be
+     * `projects/{project_id}/locations/{location_name}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequestOrBuilder.java index ea9072f47599..d4fd8bc0e5d7 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateDeliveryPipelineRequestOrBuilder.java @@ -28,7 +28,8 @@ public interface CreateDeliveryPipelineRequestOrBuilder * *
    * Required. The parent collection in which the `DeliveryPipeline` should be
-   * created. Format should be projects/{project_id}/locations/{location_name}.
+   * created. Format should be
+   * `projects/{project_id}/locations/{location_name}`.
    * 
* * @@ -43,7 +44,8 @@ public interface CreateDeliveryPipelineRequestOrBuilder * *
    * Required. The parent collection in which the `DeliveryPipeline` should be
-   * created. Format should be projects/{project_id}/locations/{location_name}.
+   * created. Format should be
+   * `projects/{project_id}/locations/{location_name}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequest.java index 12558d633e73..ff21736c70ea 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequest.java @@ -74,7 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Required. The parent collection in which the `Release` should be created.
    * Format should be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
    * 
* * @@ -101,7 +101,7 @@ public java.lang.String getParent() { *
    * Required. The parent collection in which the `Release` should be created.
    * Format should be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
    * 
* * @@ -767,7 +767,7 @@ public Builder mergeFrom( *
      * Required. The parent collection in which the `Release` should be created.
      * Format should be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
      * 
* * @@ -793,7 +793,7 @@ public java.lang.String getParent() { *
      * Required. The parent collection in which the `Release` should be created.
      * Format should be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
      * 
* * @@ -819,7 +819,7 @@ public com.google.protobuf.ByteString getParentBytes() { *
      * Required. The parent collection in which the `Release` should be created.
      * Format should be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
      * 
* * @@ -844,7 +844,7 @@ public Builder setParent(java.lang.String value) { *
      * Required. The parent collection in which the `Release` should be created.
      * Format should be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
      * 
* * @@ -865,7 +865,7 @@ public Builder clearParent() { *
      * Required. The parent collection in which the `Release` should be created.
      * Format should be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequestOrBuilder.java index 93a9773f0f07..b7c2db44f815 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateReleaseRequestOrBuilder.java @@ -29,7 +29,7 @@ public interface CreateReleaseRequestOrBuilder *
    * Required. The parent collection in which the `Release` should be created.
    * Format should be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
    * 
* * @@ -45,7 +45,7 @@ public interface CreateReleaseRequestOrBuilder *
    * Required. The parent collection in which the `Release` should be created.
    * Format should be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequest.java index 9f940429668c..3a522401cd27 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequest.java @@ -75,7 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Required. The parent collection in which the `Rollout` should be created.
    * Format should be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
    * 
* * @@ -102,7 +102,7 @@ public java.lang.String getParent() { *
    * Required. The parent collection in which the `Rollout` should be created.
    * Format should be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
    * 
* * @@ -845,7 +845,7 @@ public Builder mergeFrom( *
      * Required. The parent collection in which the `Rollout` should be created.
      * Format should be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
      * 
* * @@ -871,7 +871,7 @@ public java.lang.String getParent() { *
      * Required. The parent collection in which the `Rollout` should be created.
      * Format should be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
      * 
* * @@ -897,7 +897,7 @@ public com.google.protobuf.ByteString getParentBytes() { *
      * Required. The parent collection in which the `Rollout` should be created.
      * Format should be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
      * 
* * @@ -922,7 +922,7 @@ public Builder setParent(java.lang.String value) { *
      * Required. The parent collection in which the `Rollout` should be created.
      * Format should be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
      * 
* * @@ -943,7 +943,7 @@ public Builder clearParent() { *
      * Required. The parent collection in which the `Rollout` should be created.
      * Format should be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequestOrBuilder.java index c369fb777081..d9adc6ae740e 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateRolloutRequestOrBuilder.java @@ -29,7 +29,7 @@ public interface CreateRolloutRequestOrBuilder *
    * Required. The parent collection in which the `Rollout` should be created.
    * Format should be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
    * 
* * @@ -45,7 +45,7 @@ public interface CreateRolloutRequestOrBuilder *
    * Required. The parent collection in which the `Rollout` should be created.
    * Format should be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequest.java index 45eac5ebc034..8d658368a3b7 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequest.java @@ -74,7 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * Required. The parent collection in which the `Target` should be created.
    * Format should be
-   * projects/{project_id}/locations/{location_name}.
+   * `projects/{project_id}/locations/{location_name}`.
    * 
* * @@ -101,7 +101,7 @@ public java.lang.String getParent() { *
    * Required. The parent collection in which the `Target` should be created.
    * Format should be
-   * projects/{project_id}/locations/{location_name}.
+   * `projects/{project_id}/locations/{location_name}`.
    * 
* * @@ -766,7 +766,7 @@ public Builder mergeFrom( *
      * Required. The parent collection in which the `Target` should be created.
      * Format should be
-     * projects/{project_id}/locations/{location_name}.
+     * `projects/{project_id}/locations/{location_name}`.
      * 
* * @@ -792,7 +792,7 @@ public java.lang.String getParent() { *
      * Required. The parent collection in which the `Target` should be created.
      * Format should be
-     * projects/{project_id}/locations/{location_name}.
+     * `projects/{project_id}/locations/{location_name}`.
      * 
* * @@ -818,7 +818,7 @@ public com.google.protobuf.ByteString getParentBytes() { *
      * Required. The parent collection in which the `Target` should be created.
      * Format should be
-     * projects/{project_id}/locations/{location_name}.
+     * `projects/{project_id}/locations/{location_name}`.
      * 
* * @@ -843,7 +843,7 @@ public Builder setParent(java.lang.String value) { *
      * Required. The parent collection in which the `Target` should be created.
      * Format should be
-     * projects/{project_id}/locations/{location_name}.
+     * `projects/{project_id}/locations/{location_name}`.
      * 
* * @@ -864,7 +864,7 @@ public Builder clearParent() { *
      * Required. The parent collection in which the `Target` should be created.
      * Format should be
-     * projects/{project_id}/locations/{location_name}.
+     * `projects/{project_id}/locations/{location_name}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequestOrBuilder.java index 67ac9f745004..bab9e40a2ebd 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CreateTargetRequestOrBuilder.java @@ -29,7 +29,7 @@ public interface CreateTargetRequestOrBuilder *
    * Required. The parent collection in which the `Target` should be created.
    * Format should be
-   * projects/{project_id}/locations/{location_name}.
+   * `projects/{project_id}/locations/{location_name}`.
    * 
* * @@ -45,7 +45,7 @@ public interface CreateTargetRequestOrBuilder *
    * Required. The parent collection in which the `Target` should be created.
    * Format should be
-   * projects/{project_id}/locations/{location_name}.
+   * `projects/{project_id}/locations/{location_name}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CustomCanaryDeployment.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CustomCanaryDeployment.java index 08e77ffb1c41..bbee964f7442 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CustomCanaryDeployment.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/CustomCanaryDeployment.java @@ -191,7 +191,7 @@ public interface PhaseConfigOrBuilder * *
      * Optional. Configuration for the predeploy job of this phase. If this is
-     * not configured, predeploy job will not be present for this phase.
+     * not configured, there will be no predeploy job for this phase.
      * 
* * @@ -206,7 +206,7 @@ public interface PhaseConfigOrBuilder * *
      * Optional. Configuration for the predeploy job of this phase. If this is
-     * not configured, predeploy job will not be present for this phase.
+     * not configured, there will be no predeploy job for this phase.
      * 
* * @@ -221,7 +221,7 @@ public interface PhaseConfigOrBuilder * *
      * Optional. Configuration for the predeploy job of this phase. If this is
-     * not configured, predeploy job will not be present for this phase.
+     * not configured, there will be no predeploy job for this phase.
      * 
* * @@ -235,7 +235,7 @@ public interface PhaseConfigOrBuilder * *
      * Optional. Configuration for the postdeploy job of this phase. If this is
-     * not configured, postdeploy job will not be present for this phase.
+     * not configured, there will be no postdeploy job for this phase.
      * 
* * @@ -250,7 +250,7 @@ public interface PhaseConfigOrBuilder * *
      * Optional. Configuration for the postdeploy job of this phase. If this is
-     * not configured, postdeploy job will not be present for this phase.
+     * not configured, there will be no postdeploy job for this phase.
      * 
* * @@ -265,7 +265,7 @@ public interface PhaseConfigOrBuilder * *
      * Optional. Configuration for the postdeploy job of this phase. If this is
-     * not configured, postdeploy job will not be present for this phase.
+     * not configured, there will be no postdeploy job for this phase.
      * 
* * @@ -494,7 +494,7 @@ public boolean getVerify() { * *
      * Optional. Configuration for the predeploy job of this phase. If this is
-     * not configured, predeploy job will not be present for this phase.
+     * not configured, there will be no predeploy job for this phase.
      * 
* * @@ -512,7 +512,7 @@ public boolean hasPredeploy() { * *
      * Optional. Configuration for the predeploy job of this phase. If this is
-     * not configured, predeploy job will not be present for this phase.
+     * not configured, there will be no predeploy job for this phase.
      * 
* * @@ -532,7 +532,7 @@ public com.google.cloud.deploy.v1.Predeploy getPredeploy() { * *
      * Optional. Configuration for the predeploy job of this phase. If this is
-     * not configured, predeploy job will not be present for this phase.
+     * not configured, there will be no predeploy job for this phase.
      * 
* * @@ -553,7 +553,7 @@ public com.google.cloud.deploy.v1.PredeployOrBuilder getPredeployOrBuilder() { * *
      * Optional. Configuration for the postdeploy job of this phase. If this is
-     * not configured, postdeploy job will not be present for this phase.
+     * not configured, there will be no postdeploy job for this phase.
      * 
* * @@ -571,7 +571,7 @@ public boolean hasPostdeploy() { * *
      * Optional. Configuration for the postdeploy job of this phase. If this is
-     * not configured, postdeploy job will not be present for this phase.
+     * not configured, there will be no postdeploy job for this phase.
      * 
* * @@ -591,7 +591,7 @@ public com.google.cloud.deploy.v1.Postdeploy getPostdeploy() { * *
      * Optional. Configuration for the postdeploy job of this phase. If this is
-     * not configured, postdeploy job will not be present for this phase.
+     * not configured, there will be no postdeploy job for this phase.
      * 
* * @@ -1537,7 +1537,7 @@ public Builder clearVerify() { * *
        * Optional. Configuration for the predeploy job of this phase. If this is
-       * not configured, predeploy job will not be present for this phase.
+       * not configured, there will be no predeploy job for this phase.
        * 
* * @@ -1554,7 +1554,7 @@ public boolean hasPredeploy() { * *
        * Optional. Configuration for the predeploy job of this phase. If this is
-       * not configured, predeploy job will not be present for this phase.
+       * not configured, there will be no predeploy job for this phase.
        * 
* * @@ -1577,7 +1577,7 @@ public com.google.cloud.deploy.v1.Predeploy getPredeploy() { * *
        * Optional. Configuration for the predeploy job of this phase. If this is
-       * not configured, predeploy job will not be present for this phase.
+       * not configured, there will be no predeploy job for this phase.
        * 
* * @@ -1602,7 +1602,7 @@ public Builder setPredeploy(com.google.cloud.deploy.v1.Predeploy value) { * *
        * Optional. Configuration for the predeploy job of this phase. If this is
-       * not configured, predeploy job will not be present for this phase.
+       * not configured, there will be no predeploy job for this phase.
        * 
* * @@ -1624,7 +1624,7 @@ public Builder setPredeploy(com.google.cloud.deploy.v1.Predeploy.Builder builder * *
        * Optional. Configuration for the predeploy job of this phase. If this is
-       * not configured, predeploy job will not be present for this phase.
+       * not configured, there will be no predeploy job for this phase.
        * 
* * @@ -1652,7 +1652,7 @@ public Builder mergePredeploy(com.google.cloud.deploy.v1.Predeploy value) { * *
        * Optional. Configuration for the predeploy job of this phase. If this is
-       * not configured, predeploy job will not be present for this phase.
+       * not configured, there will be no predeploy job for this phase.
        * 
* * @@ -1674,7 +1674,7 @@ public Builder clearPredeploy() { * *
        * Optional. Configuration for the predeploy job of this phase. If this is
-       * not configured, predeploy job will not be present for this phase.
+       * not configured, there will be no predeploy job for this phase.
        * 
* * @@ -1691,7 +1691,7 @@ public com.google.cloud.deploy.v1.Predeploy.Builder getPredeployBuilder() { * *
        * Optional. Configuration for the predeploy job of this phase. If this is
-       * not configured, predeploy job will not be present for this phase.
+       * not configured, there will be no predeploy job for this phase.
        * 
* * @@ -1712,7 +1712,7 @@ public com.google.cloud.deploy.v1.PredeployOrBuilder getPredeployOrBuilder() { * *
        * Optional. Configuration for the predeploy job of this phase. If this is
-       * not configured, predeploy job will not be present for this phase.
+       * not configured, there will be no predeploy job for this phase.
        * 
* * @@ -1747,7 +1747,7 @@ public com.google.cloud.deploy.v1.PredeployOrBuilder getPredeployOrBuilder() { * *
        * Optional. Configuration for the postdeploy job of this phase. If this is
-       * not configured, postdeploy job will not be present for this phase.
+       * not configured, there will be no postdeploy job for this phase.
        * 
* * @@ -1764,7 +1764,7 @@ public boolean hasPostdeploy() { * *
        * Optional. Configuration for the postdeploy job of this phase. If this is
-       * not configured, postdeploy job will not be present for this phase.
+       * not configured, there will be no postdeploy job for this phase.
        * 
* * @@ -1787,7 +1787,7 @@ public com.google.cloud.deploy.v1.Postdeploy getPostdeploy() { * *
        * Optional. Configuration for the postdeploy job of this phase. If this is
-       * not configured, postdeploy job will not be present for this phase.
+       * not configured, there will be no postdeploy job for this phase.
        * 
* * @@ -1812,7 +1812,7 @@ public Builder setPostdeploy(com.google.cloud.deploy.v1.Postdeploy value) { * *
        * Optional. Configuration for the postdeploy job of this phase. If this is
-       * not configured, postdeploy job will not be present for this phase.
+       * not configured, there will be no postdeploy job for this phase.
        * 
* * @@ -1834,7 +1834,7 @@ public Builder setPostdeploy(com.google.cloud.deploy.v1.Postdeploy.Builder build * *
        * Optional. Configuration for the postdeploy job of this phase. If this is
-       * not configured, postdeploy job will not be present for this phase.
+       * not configured, there will be no postdeploy job for this phase.
        * 
* * @@ -1862,7 +1862,7 @@ public Builder mergePostdeploy(com.google.cloud.deploy.v1.Postdeploy value) { * *
        * Optional. Configuration for the postdeploy job of this phase. If this is
-       * not configured, postdeploy job will not be present for this phase.
+       * not configured, there will be no postdeploy job for this phase.
        * 
* * @@ -1884,7 +1884,7 @@ public Builder clearPostdeploy() { * *
        * Optional. Configuration for the postdeploy job of this phase. If this is
-       * not configured, postdeploy job will not be present for this phase.
+       * not configured, there will be no postdeploy job for this phase.
        * 
* * @@ -1901,7 +1901,7 @@ public com.google.cloud.deploy.v1.Postdeploy.Builder getPostdeployBuilder() { * *
        * Optional. Configuration for the postdeploy job of this phase. If this is
-       * not configured, postdeploy job will not be present for this phase.
+       * not configured, there will be no postdeploy job for this phase.
        * 
* * @@ -1922,7 +1922,7 @@ public com.google.cloud.deploy.v1.PostdeployOrBuilder getPostdeployOrBuilder() { * *
        * Optional. Configuration for the postdeploy job of this phase. If this is
-       * not configured, postdeploy job will not be present for this phase.
+       * not configured, there will be no postdeploy job for this phase.
        * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteAutomationRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteAutomationRequest.java new file mode 100644 index 000000000000..3c74efe81a46 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteAutomationRequest.java @@ -0,0 +1,1308 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 for `DeleteAutomation`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.DeleteAutomationRequest} + */ +public final class DeleteAutomationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.DeleteAutomationRequest) + DeleteAutomationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteAutomationRequest.newBuilder() to construct. + private DeleteAutomationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteAutomationRequest() { + name_ = ""; + requestId_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteAutomationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeleteAutomationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeleteAutomationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.DeleteAutomationRequest.class, + com.google.cloud.deploy.v1.DeleteAutomationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the `Automation` to delete. Format should be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_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. The name of the `Automation` to delete. Format should be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_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; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 3; + private boolean allowMissing_ = false; + /** + * + * + *
+   * Optional. If set to true, then deleting an already deleted or non-existing
+   * `Automation` will succeed.
+   * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_ = false; + /** + * + * + *
+   * Optional. If set, validate the request and verify whether the resource
+   * exists, but do not actually post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + public static final int ETAG_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + /** + * + * + *
+   * Optional. The weak etag of the request.
+   * 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 = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The weak etag of the request.
+   * 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 = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + if (allowMissing_ != false) { + output.writeBool(3, allowMissing_); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, 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(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowMissing_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, 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.DeleteAutomationRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.DeleteAutomationRequest other = + (com.google.cloud.deploy.v1.DeleteAutomationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (getAllowMissing() != other.getAllowMissing()) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + 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 = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.DeleteAutomationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeleteAutomationRequest 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.DeleteAutomationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeleteAutomationRequest 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.DeleteAutomationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.DeleteAutomationRequest 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.DeleteAutomationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeleteAutomationRequest 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.DeleteAutomationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.DeleteAutomationRequest 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.DeleteAutomationRequest 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.DeleteAutomationRequest 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.DeleteAutomationRequest 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 for `DeleteAutomation`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.DeleteAutomationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.DeleteAutomationRequest) + com.google.cloud.deploy.v1.DeleteAutomationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeleteAutomationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_DeleteAutomationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.DeleteAutomationRequest.class, + com.google.cloud.deploy.v1.DeleteAutomationRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.DeleteAutomationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + allowMissing_ = false; + validateOnly_ = false; + etag_ = ""; + 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_DeleteAutomationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeleteAutomationRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.DeleteAutomationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeleteAutomationRequest build() { + com.google.cloud.deploy.v1.DeleteAutomationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.DeleteAutomationRequest buildPartial() { + com.google.cloud.deploy.v1.DeleteAutomationRequest result = + new com.google.cloud.deploy.v1.DeleteAutomationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.DeleteAutomationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.allowMissing_ = allowMissing_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.validateOnly_ = validateOnly_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.etag_ = etag_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.DeleteAutomationRequest) { + return mergeFrom((com.google.cloud.deploy.v1.DeleteAutomationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.DeleteAutomationRequest other) { + if (other == com.google.cloud.deploy.v1.DeleteAutomationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + allowMissing_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the `Automation` to delete. Format should be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_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. The name of the `Automation` to delete. Format should be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_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. The name of the `Automation` to delete. Format should be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the `Automation` to delete. Format should be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the `Automation` to delete. Format should be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes after the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean allowMissing_; + /** + * + * + *
+     * Optional. If set to true, then deleting an already deleted or non-existing
+     * `Automation` will succeed.
+     * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * Optional. If set to true, then deleting an already deleted or non-existing
+     * `Automation` will succeed.
+     * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, then deleting an already deleted or non-existing
+     * `Automation` will succeed.
+     * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + bitField0_ = (bitField0_ & ~0x00000004); + allowMissing_ = false; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. If set, validate the request and verify whether the resource
+     * exists, but do not actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. If set, validate the request and verify whether the resource
+     * exists, but do not actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, validate the request and verify whether the resource
+     * exists, but do not actually post it.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000008); + validateOnly_ = false; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Optional. The weak etag of the request.
+     * 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 = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The weak etag of the request.
+     * 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 = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The weak etag of the request.
+     * 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 = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The weak etag of the request.
+     * 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 = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The weak etag of the request.
+     * 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 = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.DeleteAutomationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.DeleteAutomationRequest) + private static final com.google.cloud.deploy.v1.DeleteAutomationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.DeleteAutomationRequest(); + } + + public static com.google.cloud.deploy.v1.DeleteAutomationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAutomationRequest 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.DeleteAutomationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteAutomationRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteAutomationRequestOrBuilder.java new file mode 100644 index 000000000000..cd3c05887469 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteAutomationRequestOrBuilder.java @@ -0,0 +1,164 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 DeleteAutomationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.DeleteAutomationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the `Automation` to delete. Format should be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the `Automation` to delete. Format should be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes after the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, then deleting an already deleted or non-existing
+   * `Automation` will succeed.
+   * 
+ * + * bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); + + /** + * + * + *
+   * Optional. If set, validate the request and verify whether the resource
+   * exists, but do not actually post it.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); + + /** + * + * + *
+   * Optional. The weak etag of the request.
+   * 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 = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Optional. The weak etag of the request.
+   * 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 = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequest.java index f36ee92268ad..aa78179591fe 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequest.java @@ -73,7 +73,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The name of the `DeliveryPipeline` to delete. Format should be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
    * 
* * @@ -99,7 +99,7 @@ public java.lang.String getName() { * *
    * Required. The name of the `DeliveryPipeline` to delete. Format should be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
    * 
* * @@ -772,7 +772,7 @@ public Builder mergeFrom( * *
      * Required. The name of the `DeliveryPipeline` to delete. Format should be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
      * 
* * @@ -797,7 +797,7 @@ public java.lang.String getName() { * *
      * Required. The name of the `DeliveryPipeline` to delete. Format should be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
      * 
* * @@ -822,7 +822,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. The name of the `DeliveryPipeline` to delete. Format should be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
      * 
* * @@ -846,7 +846,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. The name of the `DeliveryPipeline` to delete. Format should be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
      * 
* * @@ -866,7 +866,7 @@ public Builder clearName() { * *
      * Required. The name of the `DeliveryPipeline` to delete. Format should be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequestOrBuilder.java index 6c9be1123ab9..972553473e0b 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteDeliveryPipelineRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface DeleteDeliveryPipelineRequestOrBuilder * *
    * Required. The name of the `DeliveryPipeline` to delete. Format should be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
    * 
* * @@ -43,7 +43,7 @@ public interface DeleteDeliveryPipelineRequestOrBuilder * *
    * Required. The name of the `DeliveryPipeline` to delete. Format should be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequest.java index 75a3dc4f836c..87663bcb8915 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequest.java @@ -73,7 +73,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The name of the `Target` to delete. Format should be
-   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
    * 
* * @@ -99,7 +99,7 @@ public java.lang.String getName() { * *
    * Required. The name of the `Target` to delete. Format should be
-   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
    * 
* * @@ -728,7 +728,7 @@ public Builder mergeFrom( * *
      * Required. The name of the `Target` to delete. Format should be
-     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
      * 
* * @@ -753,7 +753,7 @@ public java.lang.String getName() { * *
      * Required. The name of the `Target` to delete. Format should be
-     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
      * 
* * @@ -778,7 +778,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. The name of the `Target` to delete. Format should be
-     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
      * 
* * @@ -802,7 +802,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. The name of the `Target` to delete. Format should be
-     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
      * 
* * @@ -822,7 +822,7 @@ public Builder clearName() { * *
      * Required. The name of the `Target` to delete. Format should be
-     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequestOrBuilder.java index 45cdb990a0f2..cd2ec5960ccb 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeleteTargetRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface DeleteTargetRequestOrBuilder * *
    * Required. The name of the `Target` to delete. Format should be
-   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
    * 
* * @@ -43,7 +43,7 @@ public interface DeleteTargetRequestOrBuilder * *
    * Required. The name of the `Target` to delete. Format should be
-   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipeline.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipeline.java index 7e5367242cfe..cc8404e060f8 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipeline.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipeline.java @@ -135,8 +135,8 @@ public PipelineCase getPipelineCase() { * * *
-   * Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
+   * Optional. Name of the `DeliveryPipeline`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -159,8 +159,8 @@ public java.lang.String getName() { * * *
-   * Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
+   * Optional. Name of the `DeliveryPipeline`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1514,8 +1514,8 @@ public Builder clearPipeline() { * * *
-     * Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
+     * Optional. Name of the `DeliveryPipeline`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1537,8 +1537,8 @@ public java.lang.String getName() { * * *
-     * Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
+     * Optional. Name of the `DeliveryPipeline`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1560,8 +1560,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
+     * Optional. Name of the `DeliveryPipeline`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1582,8 +1582,8 @@ public Builder setName(java.lang.String value) { * * *
-     * Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
+     * Optional. Name of the `DeliveryPipeline`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1600,8 +1600,8 @@ public Builder clearName() { * * *
-     * Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
+     * Optional. Name of the `DeliveryPipeline`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineOrBuilder.java index f5472b191acf..bf306cdb4d94 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeliveryPipelineOrBuilder.java @@ -27,8 +27,8 @@ public interface DeliveryPipelineOrBuilder * * *
-   * Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
+   * Optional. Name of the `DeliveryPipeline`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -40,8 +40,8 @@ public interface DeliveryPipelineOrBuilder * * *
-   * Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
+   * Optional. Name of the `DeliveryPipeline`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRun.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRun.java index 924059514dce..e352bd6a9c53 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRun.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRun.java @@ -111,7 +111,7 @@ public enum FailureCause implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The deploy build did not complete within the alloted time.
+     * The deploy job run did not complete within the alloted time.
      * 
* * DEADLINE_EXCEEDED = 3; @@ -179,7 +179,7 @@ public enum FailureCause implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The deploy build did not complete within the alloted time.
+     * The deploy job run did not complete within the alloted time.
      * 
* * DEADLINE_EXCEEDED = 3; @@ -307,7 +307,7 @@ private FailureCause(int value) { *
    * Output only. The resource name of the Cloud Build `Build` object that is
    * used to deploy. Format is
-   * projects/{project}/locations/{location}/builds/{build}.
+   * `projects/{project}/locations/{location}/builds/{build}`.
    * 
* * @@ -334,7 +334,7 @@ public 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}.
+   * `projects/{project}/locations/{location}/builds/{build}`.
    * 
* * @@ -1021,7 +1021,7 @@ public Builder mergeFrom( *
      * Output only. The resource name of the Cloud Build `Build` object that is
      * used to deploy. Format is
-     * projects/{project}/locations/{location}/builds/{build}.
+     * `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * @@ -1047,7 +1047,7 @@ public 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}.
+     * `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * @@ -1073,7 +1073,7 @@ public com.google.protobuf.ByteString getBuildBytes() { *
      * Output only. The resource name of the Cloud Build `Build` object that is
      * used to deploy. Format is
-     * projects/{project}/locations/{location}/builds/{build}.
+     * `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * @@ -1098,7 +1098,7 @@ public Builder setBuild(java.lang.String value) { *
      * Output only. The resource name of the Cloud Build `Build` object that is
      * used to deploy. Format is
-     * projects/{project}/locations/{location}/builds/{build}.
+     * `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * @@ -1119,7 +1119,7 @@ public Builder clearBuild() { *
      * Output only. The resource name of the Cloud Build `Build` object that is
      * used to deploy. Format is
-     * projects/{project}/locations/{location}/builds/{build}.
+     * `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRunOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRunOrBuilder.java index 4cccd726189e..28549b6d3f53 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRunOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeployJobRunOrBuilder.java @@ -29,7 +29,7 @@ public interface DeployJobRunOrBuilder *
    * Output only. The resource name of the Cloud Build `Build` object that is
    * used to deploy. Format is
-   * projects/{project}/locations/{location}/builds/{build}.
+   * `projects/{project}/locations/{location}/builds/{build}`.
    * 
* * @@ -45,7 +45,7 @@ public interface DeployJobRunOrBuilder *
    * Output only. The resource name of the Cloud Build `Build` object that is
    * used to deploy. Format is
-   * projects/{project}/locations/{location}/builds/{build}.
+   * `projects/{project}/locations/{location}/builds/{build}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeploymentJobs.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeploymentJobs.java index fb824dff2153..b95765670a9d 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeploymentJobs.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeploymentJobs.java @@ -164,8 +164,7 @@ public com.google.cloud.deploy.v1.JobOrBuilder getVerifyJobOrBuilder() { * * *
-   * Output only. The predeploy Job. This is the predeploy job in the phase.
-   * This is the first job of the phase.
+   * Output only. The predeploy Job, which is the first job on the phase.
    * 
* * @@ -182,8 +181,7 @@ public boolean hasPredeployJob() { * * *
-   * Output only. The predeploy Job. This is the predeploy job in the phase.
-   * This is the first job of the phase.
+   * Output only. The predeploy Job, which is the first job on the phase.
    * 
* * @@ -202,8 +200,7 @@ public com.google.cloud.deploy.v1.Job getPredeployJob() { * * *
-   * Output only. The predeploy Job. This is the predeploy job in the phase.
-   * This is the first job of the phase.
+   * Output only. The predeploy Job, which is the first job on the phase.
    * 
* * @@ -223,8 +220,7 @@ public com.google.cloud.deploy.v1.JobOrBuilder getPredeployJobOrBuilder() { * * *
-   * Output only. The postdeploy Job. This is the postdeploy job in the phase.
-   * This is the last job of the phase.
+   * Output only. The postdeploy Job, which is the last job on the phase.
    * 
* * @@ -241,8 +237,7 @@ public boolean hasPostdeployJob() { * * *
-   * Output only. The postdeploy Job. This is the postdeploy job in the phase.
-   * This is the last job of the phase.
+   * Output only. The postdeploy Job, which is the last job on the phase.
    * 
* * @@ -261,8 +256,7 @@ public com.google.cloud.deploy.v1.Job getPostdeployJob() { * * *
-   * Output only. The postdeploy Job. This is the postdeploy job in the phase.
-   * This is the last job of the phase.
+   * Output only. The postdeploy Job, which is the last job on the phase.
    * 
* * @@ -1131,8 +1125,7 @@ public com.google.cloud.deploy.v1.JobOrBuilder getVerifyJobOrBuilder() { * * *
-     * Output only. The predeploy Job. This is the predeploy job in the phase.
-     * This is the first job of the phase.
+     * Output only. The predeploy Job, which is the first job on the phase.
      * 
* * @@ -1148,8 +1141,7 @@ public boolean hasPredeployJob() { * * *
-     * Output only. The predeploy Job. This is the predeploy job in the phase.
-     * This is the first job of the phase.
+     * Output only. The predeploy Job, which is the first job on the phase.
      * 
* * @@ -1171,8 +1163,7 @@ public com.google.cloud.deploy.v1.Job getPredeployJob() { * * *
-     * Output only. The predeploy Job. This is the predeploy job in the phase.
-     * This is the first job of the phase.
+     * Output only. The predeploy Job, which is the first job on the phase.
      * 
* * @@ -1196,8 +1187,7 @@ public Builder setPredeployJob(com.google.cloud.deploy.v1.Job value) { * * *
-     * Output only. The predeploy Job. This is the predeploy job in the phase.
-     * This is the first job of the phase.
+     * Output only. The predeploy Job, which is the first job on the phase.
      * 
* * @@ -1218,8 +1208,7 @@ public Builder setPredeployJob(com.google.cloud.deploy.v1.Job.Builder builderFor * * *
-     * Output only. The predeploy Job. This is the predeploy job in the phase.
-     * This is the first job of the phase.
+     * Output only. The predeploy Job, which is the first job on the phase.
      * 
* * @@ -1246,8 +1235,7 @@ public Builder mergePredeployJob(com.google.cloud.deploy.v1.Job value) { * * *
-     * Output only. The predeploy Job. This is the predeploy job in the phase.
-     * This is the first job of the phase.
+     * Output only. The predeploy Job, which is the first job on the phase.
      * 
* * @@ -1268,8 +1256,7 @@ public Builder clearPredeployJob() { * * *
-     * Output only. The predeploy Job. This is the predeploy job in the phase.
-     * This is the first job of the phase.
+     * Output only. The predeploy Job, which is the first job on the phase.
      * 
* * @@ -1285,8 +1272,7 @@ public com.google.cloud.deploy.v1.Job.Builder getPredeployJobBuilder() { * * *
-     * Output only. The predeploy Job. This is the predeploy job in the phase.
-     * This is the first job of the phase.
+     * Output only. The predeploy Job, which is the first job on the phase.
      * 
* * @@ -1306,8 +1292,7 @@ public com.google.cloud.deploy.v1.JobOrBuilder getPredeployJobOrBuilder() { * * *
-     * Output only. The predeploy Job. This is the predeploy job in the phase.
-     * This is the first job of the phase.
+     * Output only. The predeploy Job, which is the first job on the phase.
      * 
* * @@ -1341,8 +1326,7 @@ public com.google.cloud.deploy.v1.JobOrBuilder getPredeployJobOrBuilder() { * * *
-     * Output only. The postdeploy Job. This is the postdeploy job in the phase.
-     * This is the last job of the phase.
+     * Output only. The postdeploy Job, which is the last job on the phase.
      * 
* * @@ -1358,8 +1342,7 @@ public boolean hasPostdeployJob() { * * *
-     * Output only. The postdeploy Job. This is the postdeploy job in the phase.
-     * This is the last job of the phase.
+     * Output only. The postdeploy Job, which is the last job on the phase.
      * 
* * @@ -1381,8 +1364,7 @@ public com.google.cloud.deploy.v1.Job getPostdeployJob() { * * *
-     * Output only. The postdeploy Job. This is the postdeploy job in the phase.
-     * This is the last job of the phase.
+     * Output only. The postdeploy Job, which is the last job on the phase.
      * 
* * @@ -1406,8 +1388,7 @@ public Builder setPostdeployJob(com.google.cloud.deploy.v1.Job value) { * * *
-     * Output only. The postdeploy Job. This is the postdeploy job in the phase.
-     * This is the last job of the phase.
+     * Output only. The postdeploy Job, which is the last job on the phase.
      * 
* * @@ -1428,8 +1409,7 @@ public Builder setPostdeployJob(com.google.cloud.deploy.v1.Job.Builder builderFo * * *
-     * Output only. The postdeploy Job. This is the postdeploy job in the phase.
-     * This is the last job of the phase.
+     * Output only. The postdeploy Job, which is the last job on the phase.
      * 
* * @@ -1456,8 +1436,7 @@ public Builder mergePostdeployJob(com.google.cloud.deploy.v1.Job value) { * * *
-     * Output only. The postdeploy Job. This is the postdeploy job in the phase.
-     * This is the last job of the phase.
+     * Output only. The postdeploy Job, which is the last job on the phase.
      * 
* * @@ -1478,8 +1457,7 @@ public Builder clearPostdeployJob() { * * *
-     * Output only. The postdeploy Job. This is the postdeploy job in the phase.
-     * This is the last job of the phase.
+     * Output only. The postdeploy Job, which is the last job on the phase.
      * 
* * @@ -1495,8 +1473,7 @@ public com.google.cloud.deploy.v1.Job.Builder getPostdeployJobBuilder() { * * *
-     * Output only. The postdeploy Job. This is the postdeploy job in the phase.
-     * This is the last job of the phase.
+     * Output only. The postdeploy Job, which is the last job on the phase.
      * 
* * @@ -1516,8 +1493,7 @@ public com.google.cloud.deploy.v1.JobOrBuilder getPostdeployJobOrBuilder() { * * *
-     * Output only. The postdeploy Job. This is the postdeploy job in the phase.
-     * This is the last job of the phase.
+     * Output only. The postdeploy Job, which is the last job on the phase.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeploymentJobsOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeploymentJobsOrBuilder.java index 267399feb4a8..bb21be956fce 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeploymentJobsOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/DeploymentJobsOrBuilder.java @@ -103,8 +103,7 @@ public interface DeploymentJobsOrBuilder * * *
-   * Output only. The predeploy Job. This is the predeploy job in the phase.
-   * This is the first job of the phase.
+   * Output only. The predeploy Job, which is the first job on the phase.
    * 
* * @@ -118,8 +117,7 @@ public interface DeploymentJobsOrBuilder * * *
-   * Output only. The predeploy Job. This is the predeploy job in the phase.
-   * This is the first job of the phase.
+   * Output only. The predeploy Job, which is the first job on the phase.
    * 
* * @@ -133,8 +131,7 @@ public interface DeploymentJobsOrBuilder * * *
-   * Output only. The predeploy Job. This is the predeploy job in the phase.
-   * This is the first job of the phase.
+   * Output only. The predeploy Job, which is the first job on the phase.
    * 
* * @@ -147,8 +144,7 @@ public interface DeploymentJobsOrBuilder * * *
-   * Output only. The postdeploy Job. This is the postdeploy job in the phase.
-   * This is the last job of the phase.
+   * Output only. The postdeploy Job, which is the last job on the phase.
    * 
* * @@ -162,8 +158,7 @@ public interface DeploymentJobsOrBuilder * * *
-   * Output only. The postdeploy Job. This is the postdeploy job in the phase.
-   * This is the last job of the phase.
+   * Output only. The postdeploy Job, which is the last job on the phase.
    * 
* * @@ -177,8 +172,7 @@ public interface DeploymentJobsOrBuilder * * *
-   * Output only. The postdeploy Job. This is the postdeploy job in the phase.
-   * This is the last job of the phase.
+   * Output only. The postdeploy Job, which is the last job on the phase.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetAutomationRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetAutomationRequest.java new file mode 100644 index 000000000000..15f0e847076f --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetAutomationRequest.java @@ -0,0 +1,645 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 for `GetAutomation`
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.GetAutomationRequest} + */ +public final class GetAutomationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.GetAutomationRequest) + GetAutomationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAutomationRequest.newBuilder() to construct. + private GetAutomationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAutomationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAutomationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetAutomationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetAutomationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.GetAutomationRequest.class, + com.google.cloud.deploy.v1.GetAutomationRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the `Automation`. Format must be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_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 `Automation`. Format must be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_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.GetAutomationRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.GetAutomationRequest other = + (com.google.cloud.deploy.v1.GetAutomationRequest) 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.GetAutomationRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetAutomationRequest 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.GetAutomationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetAutomationRequest 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.GetAutomationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetAutomationRequest 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.GetAutomationRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetAutomationRequest 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.GetAutomationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetAutomationRequest 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.GetAutomationRequest 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.GetAutomationRequest 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.GetAutomationRequest 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 for `GetAutomation`
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.GetAutomationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.GetAutomationRequest) + com.google.cloud.deploy.v1.GetAutomationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetAutomationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetAutomationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.GetAutomationRequest.class, + com.google.cloud.deploy.v1.GetAutomationRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.GetAutomationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetAutomationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetAutomationRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.GetAutomationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetAutomationRequest build() { + com.google.cloud.deploy.v1.GetAutomationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetAutomationRequest buildPartial() { + com.google.cloud.deploy.v1.GetAutomationRequest result = + new com.google.cloud.deploy.v1.GetAutomationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.GetAutomationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.GetAutomationRequest) { + return mergeFrom((com.google.cloud.deploy.v1.GetAutomationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.GetAutomationRequest other) { + if (other == com.google.cloud.deploy.v1.GetAutomationRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the `Automation`. Format must be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_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 `Automation`. Format must be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_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 `Automation`. Format must be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the `Automation`. Format must be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the `Automation`. Format must be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.GetAutomationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.GetAutomationRequest) + private static final com.google.cloud.deploy.v1.GetAutomationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.GetAutomationRequest(); + } + + public static com.google.cloud.deploy.v1.GetAutomationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAutomationRequest 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.GetAutomationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetAutomationRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetAutomationRequestOrBuilder.java new file mode 100644 index 000000000000..79ec3c3595cc --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetAutomationRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 GetAutomationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.GetAutomationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the `Automation`. Format must be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the `Automation`. Format must be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_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/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetAutomationRunRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetAutomationRunRequest.java new file mode 100644 index 000000000000..b61a0410088c --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetAutomationRunRequest.java @@ -0,0 +1,645 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 for `GetAutomationRun`
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.GetAutomationRunRequest} + */ +public final class GetAutomationRunRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.GetAutomationRunRequest) + GetAutomationRunRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAutomationRunRequest.newBuilder() to construct. + private GetAutomationRunRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAutomationRunRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAutomationRunRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetAutomationRunRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetAutomationRunRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.GetAutomationRunRequest.class, + com.google.cloud.deploy.v1.GetAutomationRunRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the `AutomationRun`. Format must be
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+   * 
+ * + * + * 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 `AutomationRun`. Format must be
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+   * 
+ * + * + * 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.GetAutomationRunRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.GetAutomationRunRequest other = + (com.google.cloud.deploy.v1.GetAutomationRunRequest) 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.GetAutomationRunRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetAutomationRunRequest 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.GetAutomationRunRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetAutomationRunRequest 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.GetAutomationRunRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.GetAutomationRunRequest 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.GetAutomationRunRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetAutomationRunRequest 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.GetAutomationRunRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.GetAutomationRunRequest 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.GetAutomationRunRequest 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.GetAutomationRunRequest 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.GetAutomationRunRequest 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 for `GetAutomationRun`
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.GetAutomationRunRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.GetAutomationRunRequest) + com.google.cloud.deploy.v1.GetAutomationRunRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetAutomationRunRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetAutomationRunRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.GetAutomationRunRequest.class, + com.google.cloud.deploy.v1.GetAutomationRunRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.GetAutomationRunRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_GetAutomationRunRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetAutomationRunRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.GetAutomationRunRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetAutomationRunRequest build() { + com.google.cloud.deploy.v1.GetAutomationRunRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.GetAutomationRunRequest buildPartial() { + com.google.cloud.deploy.v1.GetAutomationRunRequest result = + new com.google.cloud.deploy.v1.GetAutomationRunRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.GetAutomationRunRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.GetAutomationRunRequest) { + return mergeFrom((com.google.cloud.deploy.v1.GetAutomationRunRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.GetAutomationRunRequest other) { + if (other == com.google.cloud.deploy.v1.GetAutomationRunRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the `AutomationRun`. Format must be
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+     * 
+ * + * + * 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 `AutomationRun`. Format must be
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+     * 
+ * + * + * 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 `AutomationRun`. Format must be
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the `AutomationRun`. Format must be
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the `AutomationRun`. Format must be
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.GetAutomationRunRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.GetAutomationRunRequest) + private static final com.google.cloud.deploy.v1.GetAutomationRunRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.GetAutomationRunRequest(); + } + + public static com.google.cloud.deploy.v1.GetAutomationRunRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAutomationRunRequest 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.GetAutomationRunRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetAutomationRunRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetAutomationRunRequestOrBuilder.java new file mode 100644 index 000000000000..02aca60fd3ea --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetAutomationRunRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 GetAutomationRunRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.GetAutomationRunRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the `AutomationRun`. Format must be
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the `AutomationRun`. Format must be
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequest.java index db60614eef0f..483e1bd58c1a 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequest.java @@ -71,7 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. Name of the `DeliveryPipeline`. Format must be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
    * 
* * @@ -97,7 +97,7 @@ public java.lang.String getName() { * *
    * Required. Name of the `DeliveryPipeline`. Format must be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
    * 
* * @@ -468,7 +468,7 @@ public Builder mergeFrom( * *
      * Required. Name of the `DeliveryPipeline`. Format must be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
      * 
* * @@ -493,7 +493,7 @@ public java.lang.String getName() { * *
      * Required. Name of the `DeliveryPipeline`. Format must be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
      * 
* * @@ -518,7 +518,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. Name of the `DeliveryPipeline`. Format must be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
      * 
* * @@ -542,7 +542,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. Name of the `DeliveryPipeline`. Format must be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
      * 
* * @@ -562,7 +562,7 @@ public Builder clearName() { * *
      * Required. Name of the `DeliveryPipeline`. Format must be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequestOrBuilder.java index c87336e5b656..0b27f6f8fb77 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetDeliveryPipelineRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface GetDeliveryPipelineRequestOrBuilder * *
    * Required. Name of the `DeliveryPipeline`. Format must be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
    * 
* * @@ -43,7 +43,7 @@ public interface GetDeliveryPipelineRequestOrBuilder * *
    * Required. Name of the `DeliveryPipeline`. Format must be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetJobRunRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetJobRunRequest.java index f3cb808a21d4..07f0d6ca8f84 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetJobRunRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetJobRunRequest.java @@ -71,7 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * 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}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`.
    * 
* * @@ -97,7 +97,7 @@ public 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}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`.
    * 
* * @@ -466,7 +466,7 @@ public Builder mergeFrom( * *
      * 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}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`.
      * 
* * @@ -491,7 +491,7 @@ public 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}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`.
      * 
* * @@ -516,7 +516,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * 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}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`.
      * 
* * @@ -540,7 +540,7 @@ public Builder setName(java.lang.String value) { * *
      * 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}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`.
      * 
* * @@ -560,7 +560,7 @@ public Builder clearName() { * *
      * 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}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetJobRunRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetJobRunRequestOrBuilder.java index d646b8496dc2..152f1f580cbb 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetJobRunRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetJobRunRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface GetJobRunRequestOrBuilder * *
    * 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}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`.
    * 
* * @@ -43,7 +43,7 @@ public interface GetJobRunRequestOrBuilder * *
    * 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}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequest.java index 43b3ead79096..2c809b813199 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequest.java @@ -71,7 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. Name of the `Release`. Format must be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
    * 
* * @@ -97,7 +97,7 @@ public java.lang.String getName() { * *
    * Required. Name of the `Release`. Format must be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
    * 
* * @@ -466,7 +466,7 @@ public Builder mergeFrom( * *
      * Required. Name of the `Release`. Format must be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
      * 
* * @@ -491,7 +491,7 @@ public java.lang.String getName() { * *
      * Required. Name of the `Release`. Format must be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
      * 
* * @@ -516,7 +516,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. Name of the `Release`. Format must be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
      * 
* * @@ -540,7 +540,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. Name of the `Release`. Format must be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
      * 
* * @@ -560,7 +560,7 @@ public Builder clearName() { * *
      * Required. Name of the `Release`. Format must be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequestOrBuilder.java index 2b41c9a454e3..94408307cf47 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetReleaseRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface GetReleaseRequestOrBuilder * *
    * Required. Name of the `Release`. Format must be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
    * 
* * @@ -43,7 +43,7 @@ public interface GetReleaseRequestOrBuilder * *
    * Required. Name of the `Release`. Format must be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequest.java index 56ebf651c81a..082037e71207 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequest.java @@ -71,7 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. Name of the `Rollout`. Format must be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`.
    * 
* * @@ -97,7 +97,7 @@ public java.lang.String getName() { * *
    * Required. Name of the `Rollout`. Format must be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`.
    * 
* * @@ -466,7 +466,7 @@ public Builder mergeFrom( * *
      * Required. Name of the `Rollout`. Format must be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`.
      * 
* * @@ -491,7 +491,7 @@ public java.lang.String getName() { * *
      * Required. Name of the `Rollout`. Format must be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`.
      * 
* * @@ -516,7 +516,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. Name of the `Rollout`. Format must be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`.
      * 
* * @@ -540,7 +540,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. Name of the `Rollout`. Format must be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`.
      * 
* * @@ -560,7 +560,7 @@ public Builder clearName() { * *
      * Required. Name of the `Rollout`. Format must be
-     * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequestOrBuilder.java index 5455188d7484..fcb9ad424be2 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetRolloutRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface GetRolloutRequestOrBuilder * *
    * Required. Name of the `Rollout`. Format must be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`.
    * 
* * @@ -43,7 +43,7 @@ public interface GetRolloutRequestOrBuilder * *
    * Required. Name of the `Rollout`. Format must be
-   * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequest.java index 279b9be37b22..0c08334615f0 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequest.java @@ -71,7 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. Name of the `Target`. Format must be
-   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
    * 
* * @@ -97,7 +97,7 @@ public java.lang.String getName() { * *
    * Required. Name of the `Target`. Format must be
-   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
    * 
* * @@ -466,7 +466,7 @@ public Builder mergeFrom( * *
      * Required. Name of the `Target`. Format must be
-     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
      * 
* * @@ -491,7 +491,7 @@ public java.lang.String getName() { * *
      * Required. Name of the `Target`. Format must be
-     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
      * 
* * @@ -516,7 +516,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. Name of the `Target`. Format must be
-     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
      * 
* * @@ -540,7 +540,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. Name of the `Target`. Format must be
-     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
      * 
* * @@ -560,7 +560,7 @@ public Builder clearName() { * *
      * Required. Name of the `Target`. Format must be
-     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequestOrBuilder.java index b5fa5e91a2d9..3f02b7ed6998 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GetTargetRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface GetTargetRequestOrBuilder * *
    * Required. Name of the `Target`. Format must be
-   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
    * 
* * @@ -43,7 +43,7 @@ public interface GetTargetRequestOrBuilder * *
    * Required. Name of the `Target`. Format must be
-   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeCluster.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeCluster.java index 7b924bd1a9db..f29b8d554b55 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeCluster.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeCluster.java @@ -71,7 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Information specifying a GKE Cluster. Format is
-   * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
+   * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`.
    * 
* * string cluster = 1 [(.google.api.resource_reference) = { ... } @@ -95,7 +95,7 @@ public java.lang.String getCluster() { * *
    * Information specifying a GKE Cluster. Format is
-   * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
+   * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`.
    * 
* * string cluster = 1 [(.google.api.resource_reference) = { ... } @@ -507,7 +507,7 @@ public Builder mergeFrom( * *
      * Information specifying a GKE Cluster. Format is
-     * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
+     * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`.
      * 
* * string cluster = 1 [(.google.api.resource_reference) = { ... } @@ -530,7 +530,7 @@ public java.lang.String getCluster() { * *
      * Information specifying a GKE Cluster. Format is
-     * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
+     * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`.
      * 
* * string cluster = 1 [(.google.api.resource_reference) = { ... } @@ -553,7 +553,7 @@ public com.google.protobuf.ByteString getClusterBytes() { * *
      * Information specifying a GKE Cluster. Format is
-     * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
+     * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`.
      * 
* * string cluster = 1 [(.google.api.resource_reference) = { ... } @@ -575,7 +575,7 @@ public Builder setCluster(java.lang.String value) { * *
      * Information specifying a GKE Cluster. Format is
-     * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
+     * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`.
      * 
* * string cluster = 1 [(.google.api.resource_reference) = { ... } @@ -593,7 +593,7 @@ public Builder clearCluster() { * *
      * Information specifying a GKE Cluster. Format is
-     * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
+     * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`.
      * 
* * string cluster = 1 [(.google.api.resource_reference) = { ... } diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeClusterOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeClusterOrBuilder.java index c881d61d17ca..55204747d1e3 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeClusterOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/GkeClusterOrBuilder.java @@ -28,7 +28,7 @@ public interface GkeClusterOrBuilder * *
    * Information specifying a GKE Cluster. Format is
-   * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
+   * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`.
    * 
* * string cluster = 1 [(.google.api.resource_reference) = { ... } @@ -41,7 +41,7 @@ public interface GkeClusterOrBuilder * *
    * Information specifying a GKE Cluster. Format is
-   * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
+   * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`.
    * 
* * string cluster = 1 [(.google.api.resource_reference) = { ... } diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/IgnoreJobRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/IgnoreJobRequest.java index 0ecbd682580c..069f2750a71e 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/IgnoreJobRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/IgnoreJobRequest.java @@ -73,8 +73,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * @@ -100,8 +99,7 @@ public java.lang.String getRollout() { * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * @@ -620,8 +618,7 @@ public Builder mergeFrom( * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -646,8 +643,7 @@ public java.lang.String getRollout() { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -672,8 +668,7 @@ public com.google.protobuf.ByteString getRolloutBytes() { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -697,8 +692,7 @@ public Builder setRollout(java.lang.String value) { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -718,8 +712,7 @@ public Builder clearRollout() { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/IgnoreJobRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/IgnoreJobRequestOrBuilder.java index 380f1981a2f6..712f26ff27e0 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/IgnoreJobRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/IgnoreJobRequestOrBuilder.java @@ -28,8 +28,7 @@ public interface IgnoreJobRequestOrBuilder * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * @@ -44,8 +43,7 @@ public interface IgnoreJobRequestOrBuilder * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRun.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRun.java index 6cb307e439c3..cf47d0ec981c 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRun.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRun.java @@ -362,9 +362,7 @@ public JobRunCase getJobRunCase() { * *
    * Optional. Name of the `JobRun`. Format is
-   * projects/{project}/locations/{location}/
-   * deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/
-   * {rollouts}/jobRuns/{uuid}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/{rollouts}/jobRuns/{uuid}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -388,9 +386,7 @@ public java.lang.String getName() { * *
    * Optional. Name of the `JobRun`. Format is
-   * projects/{project}/locations/{location}/
-   * deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/
-   * {rollouts}/jobRuns/{uuid}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/{rollouts}/jobRuns/{uuid}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1939,9 +1935,7 @@ public Builder clearJobRun() { * *
      * Optional. Name of the `JobRun`. Format is
-     * projects/{project}/locations/{location}/
-     * deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/
-     * {rollouts}/jobRuns/{uuid}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/{rollouts}/jobRuns/{uuid}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1964,9 +1958,7 @@ public java.lang.String getName() { * *
      * Optional. Name of the `JobRun`. Format is
-     * projects/{project}/locations/{location}/
-     * deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/
-     * {rollouts}/jobRuns/{uuid}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/{rollouts}/jobRuns/{uuid}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1989,9 +1981,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Optional. Name of the `JobRun`. Format is
-     * projects/{project}/locations/{location}/
-     * deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/
-     * {rollouts}/jobRuns/{uuid}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/{rollouts}/jobRuns/{uuid}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2013,9 +2003,7 @@ public Builder setName(java.lang.String value) { * *
      * Optional. Name of the `JobRun`. Format is
-     * projects/{project}/locations/{location}/
-     * deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/
-     * {rollouts}/jobRuns/{uuid}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/{rollouts}/jobRuns/{uuid}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2033,9 +2021,7 @@ public Builder clearName() { * *
      * Optional. Name of the `JobRun`. Format is
-     * projects/{project}/locations/{location}/
-     * deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/
-     * {rollouts}/jobRuns/{uuid}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/{rollouts}/jobRuns/{uuid}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRunOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRunOrBuilder.java index d4f4c09dbfa5..4ca279d302cd 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRunOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/JobRunOrBuilder.java @@ -28,9 +28,7 @@ public interface JobRunOrBuilder * *
    * Optional. Name of the `JobRun`. Format is
-   * projects/{project}/locations/{location}/
-   * deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/
-   * {rollouts}/jobRuns/{uuid}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/{rollouts}/jobRuns/{uuid}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -43,9 +41,7 @@ public interface JobRunOrBuilder * *
    * Optional. Name of the `JobRun`. Format is
-   * projects/{project}/locations/{location}/
-   * deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/
-   * {rollouts}/jobRuns/{uuid}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/{rollouts}/jobRuns/{uuid}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationRunsRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationRunsRequest.java new file mode 100644 index 000000000000..3026b17008ea --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationRunsRequest.java @@ -0,0 +1,1338 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 for `ListAutomationRuns`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListAutomationRunsRequest} + */ +public final class ListAutomationRunsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.ListAutomationRunsRequest) + ListAutomationRunsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAutomationRunsRequest.newBuilder() to construct. + private ListAutomationRunsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAutomationRunsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAutomationRunsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListAutomationRunsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListAutomationRunsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListAutomationRunsRequest.class, + com.google.cloud.deploy.v1.ListAutomationRunsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent, which owns this collection of automationRuns. Format
+   * must be
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent, which owns this collection of automationRuns. Format
+   * must be
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of automationRuns to return. The service may return
+   * fewer than this value. If unspecified, at most 50 automationRuns will
+   * be returned. The maximum value is 1000; values above 1000 will be set
+   * to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A page token, received from a previous `ListAutomationRuns` 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; + * + * @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; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListAutomationRuns` 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; + * + * @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; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filter automationRuns to be returned. All fields can be used in the
+   * filter.
+   * 
+ * + * string filter = 4; + * + * @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; + } + } + /** + * + * + *
+   * Filter automationRuns to be returned. All fields can be used in the
+   * filter.
+   * 
+ * + * string filter = 4; + * + * @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; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Field to sort by.
+   * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+   * Field to sort by.
+   * 
+ * + * string order_by = 5; + * + * @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.ListAutomationRunsRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.ListAutomationRunsRequest other = + (com.google.cloud.deploy.v1.ListAutomationRunsRequest) 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.ListAutomationRunsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListAutomationRunsRequest 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.ListAutomationRunsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListAutomationRunsRequest 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.ListAutomationRunsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListAutomationRunsRequest 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.ListAutomationRunsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListAutomationRunsRequest 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.ListAutomationRunsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListAutomationRunsRequest 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.ListAutomationRunsRequest 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.ListAutomationRunsRequest 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.ListAutomationRunsRequest 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 for `ListAutomationRuns`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListAutomationRunsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.ListAutomationRunsRequest) + com.google.cloud.deploy.v1.ListAutomationRunsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListAutomationRunsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListAutomationRunsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListAutomationRunsRequest.class, + com.google.cloud.deploy.v1.ListAutomationRunsRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.ListAutomationRunsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + 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_ListAutomationRunsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListAutomationRunsRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.ListAutomationRunsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListAutomationRunsRequest build() { + com.google.cloud.deploy.v1.ListAutomationRunsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListAutomationRunsRequest buildPartial() { + com.google.cloud.deploy.v1.ListAutomationRunsRequest result = + new com.google.cloud.deploy.v1.ListAutomationRunsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.ListAutomationRunsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @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.ListAutomationRunsRequest) { + return mergeFrom((com.google.cloud.deploy.v1.ListAutomationRunsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.ListAutomationRunsRequest other) { + if (other == com.google.cloud.deploy.v1.ListAutomationRunsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent, which owns this collection of automationRuns. Format
+     * must be
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of automationRuns. Format
+     * must be
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of automationRuns. Format
+     * must be
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of automationRuns. Format
+     * must be
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of automationRuns. Format
+     * must be
+     * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of automationRuns to return. The service may return
+     * fewer than this value. If unspecified, at most 50 automationRuns will
+     * be returned. The maximum value is 1000; values above 1000 will be set
+     * to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of automationRuns to return. The service may return
+     * fewer than this value. If unspecified, at most 50 automationRuns will
+     * be returned. The maximum value is 1000; values above 1000 will be set
+     * to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of automationRuns to return. The service may return
+     * fewer than this value. If unspecified, at most 50 automationRuns will
+     * be returned. The maximum value is 1000; values above 1000 will be set
+     * to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListAutomationRuns` 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; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListAutomationRuns` 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; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListAutomationRuns` 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; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListAutomationRuns` 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; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListAutomationRuns` 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; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filter automationRuns to be returned. All fields can be used in the
+     * filter.
+     * 
+ * + * string filter = 4; + * + * @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; + } + } + /** + * + * + *
+     * Filter automationRuns to be returned. All fields can be used in the
+     * filter.
+     * 
+ * + * string filter = 4; + * + * @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; + } + } + /** + * + * + *
+     * Filter automationRuns to be returned. All fields can be used in the
+     * filter.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filter automationRuns to be returned. All fields can be used in the
+     * filter.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filter automationRuns to be returned. All fields can be used in the
+     * filter.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Field to sort by.
+     * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+     * Field to sort by.
+     * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+     * Field to sort by.
+     * 
+ * + * string order_by = 5; + * + * @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; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by.
+     * 
+ * + * string order_by = 5; + * + * @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; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.ListAutomationRunsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.ListAutomationRunsRequest) + private static final com.google.cloud.deploy.v1.ListAutomationRunsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.ListAutomationRunsRequest(); + } + + public static com.google.cloud.deploy.v1.ListAutomationRunsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAutomationRunsRequest 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.ListAutomationRunsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationRunsRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationRunsRequestOrBuilder.java new file mode 100644 index 000000000000..64a13f9bc75e --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationRunsRequestOrBuilder.java @@ -0,0 +1,159 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 ListAutomationRunsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.ListAutomationRunsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent, which owns this collection of automationRuns. Format
+   * must be
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent, which owns this collection of automationRuns. Format
+   * must be
+   * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of automationRuns to return. The service may return
+   * fewer than this value. If unspecified, at most 50 automationRuns will
+   * be returned. The maximum value is 1000; values above 1000 will be set
+   * to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListAutomationRuns` 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; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListAutomationRuns` 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; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filter automationRuns to be returned. All fields can be used in the
+   * filter.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filter automationRuns to be returned. All fields can be used in the
+   * filter.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Field to sort by.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Field to sort by.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationRunsResponse.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationRunsResponse.java new file mode 100644 index 000000000000..0d1f0062bcf9 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationRunsResponse.java @@ -0,0 +1,1407 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 `ListAutomationRuns`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListAutomationRunsResponse} + */ +public final class ListAutomationRunsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.ListAutomationRunsResponse) + ListAutomationRunsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAutomationRunsResponse.newBuilder() to construct. + private ListAutomationRunsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAutomationRunsResponse() { + automationRuns_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAutomationRunsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListAutomationRunsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListAutomationRunsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListAutomationRunsResponse.class, + com.google.cloud.deploy.v1.ListAutomationRunsResponse.Builder.class); + } + + public static final int AUTOMATION_RUNS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List automationRuns_; + /** + * + * + *
+   * The `AutomationRuns` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + @java.lang.Override + public java.util.List getAutomationRunsList() { + return automationRuns_; + } + /** + * + * + *
+   * The `AutomationRuns` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + @java.lang.Override + public java.util.List + getAutomationRunsOrBuilderList() { + return automationRuns_; + } + /** + * + * + *
+   * The `AutomationRuns` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + @java.lang.Override + public int getAutomationRunsCount() { + return automationRuns_.size(); + } + /** + * + * + *
+   * The `AutomationRuns` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRun getAutomationRuns(int index) { + return automationRuns_.get(index); + } + /** + * + * + *
+   * The `AutomationRuns` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRunOrBuilder getAutomationRunsOrBuilder(int index) { + return automationRuns_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + 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; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * 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 < automationRuns_.size(); i++) { + output.writeMessage(1, automationRuns_.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 < automationRuns_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, automationRuns_.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.ListAutomationRunsResponse)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.ListAutomationRunsResponse other = + (com.google.cloud.deploy.v1.ListAutomationRunsResponse) obj; + + if (!getAutomationRunsList().equals(other.getAutomationRunsList())) 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 (getAutomationRunsCount() > 0) { + hash = (37 * hash) + AUTOMATION_RUNS_FIELD_NUMBER; + hash = (53 * hash) + getAutomationRunsList().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.ListAutomationRunsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListAutomationRunsResponse 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.ListAutomationRunsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListAutomationRunsResponse 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.ListAutomationRunsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListAutomationRunsResponse 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.ListAutomationRunsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListAutomationRunsResponse 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.ListAutomationRunsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListAutomationRunsResponse 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.ListAutomationRunsResponse 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.ListAutomationRunsResponse 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.ListAutomationRunsResponse 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 `ListAutomationRuns`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListAutomationRunsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.ListAutomationRunsResponse) + com.google.cloud.deploy.v1.ListAutomationRunsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListAutomationRunsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListAutomationRunsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListAutomationRunsResponse.class, + com.google.cloud.deploy.v1.ListAutomationRunsResponse.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.ListAutomationRunsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (automationRunsBuilder_ == null) { + automationRuns_ = java.util.Collections.emptyList(); + } else { + automationRuns_ = null; + automationRunsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + 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_ListAutomationRunsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListAutomationRunsResponse getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.ListAutomationRunsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListAutomationRunsResponse build() { + com.google.cloud.deploy.v1.ListAutomationRunsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListAutomationRunsResponse buildPartial() { + com.google.cloud.deploy.v1.ListAutomationRunsResponse result = + new com.google.cloud.deploy.v1.ListAutomationRunsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.deploy.v1.ListAutomationRunsResponse result) { + if (automationRunsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + automationRuns_ = java.util.Collections.unmodifiableList(automationRuns_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.automationRuns_ = automationRuns_; + } else { + result.automationRuns_ = automationRunsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.deploy.v1.ListAutomationRunsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.ListAutomationRunsResponse) { + return mergeFrom((com.google.cloud.deploy.v1.ListAutomationRunsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.ListAutomationRunsResponse other) { + if (other == com.google.cloud.deploy.v1.ListAutomationRunsResponse.getDefaultInstance()) + return this; + if (automationRunsBuilder_ == null) { + if (!other.automationRuns_.isEmpty()) { + if (automationRuns_.isEmpty()) { + automationRuns_ = other.automationRuns_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAutomationRunsIsMutable(); + automationRuns_.addAll(other.automationRuns_); + } + onChanged(); + } + } else { + if (!other.automationRuns_.isEmpty()) { + if (automationRunsBuilder_.isEmpty()) { + automationRunsBuilder_.dispose(); + automationRunsBuilder_ = null; + automationRuns_ = other.automationRuns_; + bitField0_ = (bitField0_ & ~0x00000001); + automationRunsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAutomationRunsFieldBuilder() + : null; + } else { + automationRunsBuilder_.addAllMessages(other.automationRuns_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } 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.AutomationRun m = + input.readMessage( + com.google.cloud.deploy.v1.AutomationRun.parser(), extensionRegistry); + if (automationRunsBuilder_ == null) { + ensureAutomationRunsIsMutable(); + automationRuns_.add(m); + } else { + automationRunsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 automationRuns_ = + java.util.Collections.emptyList(); + + private void ensureAutomationRunsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + automationRuns_ = + new java.util.ArrayList(automationRuns_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationRun, + com.google.cloud.deploy.v1.AutomationRun.Builder, + com.google.cloud.deploy.v1.AutomationRunOrBuilder> + automationRunsBuilder_; + + /** + * + * + *
+     * The `AutomationRuns` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + public java.util.List getAutomationRunsList() { + if (automationRunsBuilder_ == null) { + return java.util.Collections.unmodifiableList(automationRuns_); + } else { + return automationRunsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The `AutomationRuns` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + public int getAutomationRunsCount() { + if (automationRunsBuilder_ == null) { + return automationRuns_.size(); + } else { + return automationRunsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The `AutomationRuns` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + public com.google.cloud.deploy.v1.AutomationRun getAutomationRuns(int index) { + if (automationRunsBuilder_ == null) { + return automationRuns_.get(index); + } else { + return automationRunsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The `AutomationRuns` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + public Builder setAutomationRuns(int index, com.google.cloud.deploy.v1.AutomationRun value) { + if (automationRunsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAutomationRunsIsMutable(); + automationRuns_.set(index, value); + onChanged(); + } else { + automationRunsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The `AutomationRuns` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + public Builder setAutomationRuns( + int index, com.google.cloud.deploy.v1.AutomationRun.Builder builderForValue) { + if (automationRunsBuilder_ == null) { + ensureAutomationRunsIsMutable(); + automationRuns_.set(index, builderForValue.build()); + onChanged(); + } else { + automationRunsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `AutomationRuns` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + public Builder addAutomationRuns(com.google.cloud.deploy.v1.AutomationRun value) { + if (automationRunsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAutomationRunsIsMutable(); + automationRuns_.add(value); + onChanged(); + } else { + automationRunsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The `AutomationRuns` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + public Builder addAutomationRuns(int index, com.google.cloud.deploy.v1.AutomationRun value) { + if (automationRunsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAutomationRunsIsMutable(); + automationRuns_.add(index, value); + onChanged(); + } else { + automationRunsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The `AutomationRuns` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + public Builder addAutomationRuns( + com.google.cloud.deploy.v1.AutomationRun.Builder builderForValue) { + if (automationRunsBuilder_ == null) { + ensureAutomationRunsIsMutable(); + automationRuns_.add(builderForValue.build()); + onChanged(); + } else { + automationRunsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `AutomationRuns` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + public Builder addAutomationRuns( + int index, com.google.cloud.deploy.v1.AutomationRun.Builder builderForValue) { + if (automationRunsBuilder_ == null) { + ensureAutomationRunsIsMutable(); + automationRuns_.add(index, builderForValue.build()); + onChanged(); + } else { + automationRunsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `AutomationRuns` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + public Builder addAllAutomationRuns( + java.lang.Iterable values) { + if (automationRunsBuilder_ == null) { + ensureAutomationRunsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, automationRuns_); + onChanged(); + } else { + automationRunsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The `AutomationRuns` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + public Builder clearAutomationRuns() { + if (automationRunsBuilder_ == null) { + automationRuns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + automationRunsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The `AutomationRuns` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + public Builder removeAutomationRuns(int index) { + if (automationRunsBuilder_ == null) { + ensureAutomationRunsIsMutable(); + automationRuns_.remove(index); + onChanged(); + } else { + automationRunsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The `AutomationRuns` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + public com.google.cloud.deploy.v1.AutomationRun.Builder getAutomationRunsBuilder(int index) { + return getAutomationRunsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The `AutomationRuns` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + public com.google.cloud.deploy.v1.AutomationRunOrBuilder getAutomationRunsOrBuilder(int index) { + if (automationRunsBuilder_ == null) { + return automationRuns_.get(index); + } else { + return automationRunsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The `AutomationRuns` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + public java.util.List + getAutomationRunsOrBuilderList() { + if (automationRunsBuilder_ != null) { + return automationRunsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(automationRuns_); + } + } + /** + * + * + *
+     * The `AutomationRuns` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + public com.google.cloud.deploy.v1.AutomationRun.Builder addAutomationRunsBuilder() { + return getAutomationRunsFieldBuilder() + .addBuilder(com.google.cloud.deploy.v1.AutomationRun.getDefaultInstance()); + } + /** + * + * + *
+     * The `AutomationRuns` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + public com.google.cloud.deploy.v1.AutomationRun.Builder addAutomationRunsBuilder(int index) { + return getAutomationRunsFieldBuilder() + .addBuilder(index, com.google.cloud.deploy.v1.AutomationRun.getDefaultInstance()); + } + /** + * + * + *
+     * The `AutomationRuns` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + public java.util.List + getAutomationRunsBuilderList() { + return getAutomationRunsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationRun, + com.google.cloud.deploy.v1.AutomationRun.Builder, + com.google.cloud.deploy.v1.AutomationRunOrBuilder> + getAutomationRunsFieldBuilder() { + if (automationRunsBuilder_ == null) { + automationRunsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationRun, + com.google.cloud.deploy.v1.AutomationRun.Builder, + com.google.cloud.deploy.v1.AutomationRunOrBuilder>( + automationRuns_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + automationRuns_ = null; + } + return automationRunsBuilder_; + } + + 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; + bitField0_ |= 0x00000002; + 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(); + bitField0_ = (bitField0_ & ~0x00000002); + 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + 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); + } + /** + * + * + *
+     * 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); + bitField0_ |= 0x00000004; + 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); + bitField0_ |= 0x00000004; + 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_); + bitField0_ |= 0x00000004; + 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.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + 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); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.ListAutomationRunsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.ListAutomationRunsResponse) + private static final com.google.cloud.deploy.v1.ListAutomationRunsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.ListAutomationRunsResponse(); + } + + public static com.google.cloud.deploy.v1.ListAutomationRunsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAutomationRunsResponse 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.ListAutomationRunsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationRunsResponseOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationRunsResponseOrBuilder.java new file mode 100644 index 000000000000..2e220310fb7f --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationRunsResponseOrBuilder.java @@ -0,0 +1,155 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 ListAutomationRunsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.ListAutomationRunsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The `AutomationRuns` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + java.util.List getAutomationRunsList(); + /** + * + * + *
+   * The `AutomationRuns` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + com.google.cloud.deploy.v1.AutomationRun getAutomationRuns(int index); + /** + * + * + *
+   * The `AutomationRuns` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + int getAutomationRunsCount(); + /** + * + * + *
+   * The `AutomationRuns` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + java.util.List + getAutomationRunsOrBuilderList(); + /** + * + * + *
+   * The `AutomationRuns` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.AutomationRun automation_runs = 1; + */ + com.google.cloud.deploy.v1.AutomationRunOrBuilder getAutomationRunsOrBuilder(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/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationsRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationsRequest.java new file mode 100644 index 000000000000..4606212e0595 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationsRequest.java @@ -0,0 +1,1338 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 for `ListAutomations`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListAutomationsRequest} + */ +public final class ListAutomationsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.ListAutomationsRequest) + ListAutomationsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAutomationsRequest.newBuilder() to construct. + private ListAutomationsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAutomationsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAutomationsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListAutomationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListAutomationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListAutomationsRequest.class, + com.google.cloud.deploy.v1.ListAutomationsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The parent, which owns this collection of automations. Format
+   * must be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent, which owns this collection of automations. Format
+   * must be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of automations to return. The service may return
+   * fewer than this value. If unspecified, at most 50 automations will
+   * be returned. The maximum value is 1000; values above 1000 will be set
+   * to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * A page token, received from a previous `ListAutomations` 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; + * + * @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; + } + } + /** + * + * + *
+   * A page token, received from a previous `ListAutomations` 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; + * + * @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; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Filter automations to be returned. All fields can be used in the
+   * filter.
+   * 
+ * + * string filter = 4; + * + * @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; + } + } + /** + * + * + *
+   * Filter automations to be returned. All fields can be used in the
+   * filter.
+   * 
+ * + * string filter = 4; + * + * @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; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Field to sort by.
+   * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+   * Field to sort by.
+   * 
+ * + * string order_by = 5; + * + * @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.ListAutomationsRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.ListAutomationsRequest other = + (com.google.cloud.deploy.v1.ListAutomationsRequest) 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.ListAutomationsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListAutomationsRequest 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.ListAutomationsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListAutomationsRequest 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.ListAutomationsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListAutomationsRequest 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.ListAutomationsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListAutomationsRequest 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.ListAutomationsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListAutomationsRequest 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.ListAutomationsRequest 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.ListAutomationsRequest 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.ListAutomationsRequest 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 for `ListAutomations`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListAutomationsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.ListAutomationsRequest) + com.google.cloud.deploy.v1.ListAutomationsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListAutomationsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListAutomationsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListAutomationsRequest.class, + com.google.cloud.deploy.v1.ListAutomationsRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.ListAutomationsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + 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_ListAutomationsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListAutomationsRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.ListAutomationsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListAutomationsRequest build() { + com.google.cloud.deploy.v1.ListAutomationsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListAutomationsRequest buildPartial() { + com.google.cloud.deploy.v1.ListAutomationsRequest result = + new com.google.cloud.deploy.v1.ListAutomationsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.ListAutomationsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @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.ListAutomationsRequest) { + return mergeFrom((com.google.cloud.deploy.v1.ListAutomationsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.ListAutomationsRequest other) { + if (other == com.google.cloud.deploy.v1.ListAutomationsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent, which owns this collection of automations. Format
+     * must be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of automations. Format
+     * must be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent, which owns this collection of automations. Format
+     * must be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of automations. Format
+     * must be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent, which owns this collection of automations. Format
+     * must be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of automations to return. The service may return
+     * fewer than this value. If unspecified, at most 50 automations will
+     * be returned. The maximum value is 1000; values above 1000 will be set
+     * to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of automations to return. The service may return
+     * fewer than this value. If unspecified, at most 50 automations will
+     * be returned. The maximum value is 1000; values above 1000 will be set
+     * to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of automations to return. The service may return
+     * fewer than this value. If unspecified, at most 50 automations will
+     * be returned. The maximum value is 1000; values above 1000 will be set
+     * to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A page token, received from a previous `ListAutomations` 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; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListAutomations` 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; + * + * @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; + } + } + /** + * + * + *
+     * A page token, received from a previous `ListAutomations` 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; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListAutomations` 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; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A page token, received from a previous `ListAutomations` 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; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Filter automations to be returned. All fields can be used in the
+     * filter.
+     * 
+ * + * string filter = 4; + * + * @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; + } + } + /** + * + * + *
+     * Filter automations to be returned. All fields can be used in the
+     * filter.
+     * 
+ * + * string filter = 4; + * + * @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; + } + } + /** + * + * + *
+     * Filter automations to be returned. All fields can be used in the
+     * filter.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Filter automations to be returned. All fields can be used in the
+     * filter.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Filter automations to be returned. All fields can be used in the
+     * filter.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Field to sort by.
+     * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+     * Field to sort by.
+     * 
+ * + * string order_by = 5; + * + * @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; + } + } + /** + * + * + *
+     * Field to sort by.
+     * 
+ * + * string order_by = 5; + * + * @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; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by.
+     * 
+ * + * string order_by = 5; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Field to sort by.
+     * 
+ * + * string order_by = 5; + * + * @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; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.ListAutomationsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.ListAutomationsRequest) + private static final com.google.cloud.deploy.v1.ListAutomationsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.ListAutomationsRequest(); + } + + public static com.google.cloud.deploy.v1.ListAutomationsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAutomationsRequest 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.ListAutomationsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationsRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationsRequestOrBuilder.java new file mode 100644 index 000000000000..2cccbd27415d --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationsRequestOrBuilder.java @@ -0,0 +1,159 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 ListAutomationsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.ListAutomationsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent, which owns this collection of automations. Format
+   * must be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent, which owns this collection of automations. Format
+   * must be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of automations to return. The service may return
+   * fewer than this value. If unspecified, at most 50 automations will
+   * be returned. The maximum value is 1000; values above 1000 will be set
+   * to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListAutomations` 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; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A page token, received from a previous `ListAutomations` 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; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Filter automations to be returned. All fields can be used in the
+   * filter.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Filter automations to be returned. All fields can be used in the
+   * filter.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Field to sort by.
+   * 
+ * + * string order_by = 5; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Field to sort by.
+   * 
+ * + * string order_by = 5; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationsResponse.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationsResponse.java new file mode 100644 index 000000000000..54fad3f6b54e --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationsResponse.java @@ -0,0 +1,1401 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 `ListAutomations`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListAutomationsResponse} + */ +public final class ListAutomationsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.ListAutomationsResponse) + ListAutomationsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAutomationsResponse.newBuilder() to construct. + private ListAutomationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAutomationsResponse() { + automations_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAutomationsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListAutomationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListAutomationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListAutomationsResponse.class, + com.google.cloud.deploy.v1.ListAutomationsResponse.Builder.class); + } + + public static final int AUTOMATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List automations_; + /** + * + * + *
+   * The `Automations` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + @java.lang.Override + public java.util.List getAutomationsList() { + return automations_; + } + /** + * + * + *
+   * The `Automations` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + @java.lang.Override + public java.util.List + getAutomationsOrBuilderList() { + return automations_; + } + /** + * + * + *
+   * The `Automations` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + @java.lang.Override + public int getAutomationsCount() { + return automations_.size(); + } + /** + * + * + *
+   * The `Automations` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Automation getAutomations(int index) { + return automations_.get(index); + } + /** + * + * + *
+   * The `Automations` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationOrBuilder getAutomationsOrBuilder(int index) { + return automations_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + 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; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * 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 < automations_.size(); i++) { + output.writeMessage(1, automations_.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 < automations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, automations_.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.ListAutomationsResponse)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.ListAutomationsResponse other = + (com.google.cloud.deploy.v1.ListAutomationsResponse) obj; + + if (!getAutomationsList().equals(other.getAutomationsList())) 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 (getAutomationsCount() > 0) { + hash = (37 * hash) + AUTOMATIONS_FIELD_NUMBER; + hash = (53 * hash) + getAutomationsList().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.ListAutomationsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListAutomationsResponse 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.ListAutomationsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListAutomationsResponse 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.ListAutomationsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.ListAutomationsResponse 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.ListAutomationsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListAutomationsResponse 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.ListAutomationsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.ListAutomationsResponse 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.ListAutomationsResponse 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.ListAutomationsResponse 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.ListAutomationsResponse 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 `ListAutomations`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.ListAutomationsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.ListAutomationsResponse) + com.google.cloud.deploy.v1.ListAutomationsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListAutomationsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_ListAutomationsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.ListAutomationsResponse.class, + com.google.cloud.deploy.v1.ListAutomationsResponse.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.ListAutomationsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (automationsBuilder_ == null) { + automations_ = java.util.Collections.emptyList(); + } else { + automations_ = null; + automationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + 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_ListAutomationsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListAutomationsResponse getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.ListAutomationsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListAutomationsResponse build() { + com.google.cloud.deploy.v1.ListAutomationsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.ListAutomationsResponse buildPartial() { + com.google.cloud.deploy.v1.ListAutomationsResponse result = + new com.google.cloud.deploy.v1.ListAutomationsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.deploy.v1.ListAutomationsResponse result) { + if (automationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + automations_ = java.util.Collections.unmodifiableList(automations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.automations_ = automations_; + } else { + result.automations_ = automationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.deploy.v1.ListAutomationsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.ListAutomationsResponse) { + return mergeFrom((com.google.cloud.deploy.v1.ListAutomationsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.ListAutomationsResponse other) { + if (other == com.google.cloud.deploy.v1.ListAutomationsResponse.getDefaultInstance()) + return this; + if (automationsBuilder_ == null) { + if (!other.automations_.isEmpty()) { + if (automations_.isEmpty()) { + automations_ = other.automations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAutomationsIsMutable(); + automations_.addAll(other.automations_); + } + onChanged(); + } + } else { + if (!other.automations_.isEmpty()) { + if (automationsBuilder_.isEmpty()) { + automationsBuilder_.dispose(); + automationsBuilder_ = null; + automations_ = other.automations_; + bitField0_ = (bitField0_ & ~0x00000001); + automationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAutomationsFieldBuilder() + : null; + } else { + automationsBuilder_.addAllMessages(other.automations_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } 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.Automation m = + input.readMessage( + com.google.cloud.deploy.v1.Automation.parser(), extensionRegistry); + if (automationsBuilder_ == null) { + ensureAutomationsIsMutable(); + automations_.add(m); + } else { + automationsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 automations_ = + java.util.Collections.emptyList(); + + private void ensureAutomationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + automations_ = new java.util.ArrayList(automations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Automation, + com.google.cloud.deploy.v1.Automation.Builder, + com.google.cloud.deploy.v1.AutomationOrBuilder> + automationsBuilder_; + + /** + * + * + *
+     * The `Automations` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + public java.util.List getAutomationsList() { + if (automationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(automations_); + } else { + return automationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The `Automations` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + public int getAutomationsCount() { + if (automationsBuilder_ == null) { + return automations_.size(); + } else { + return automationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The `Automations` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + public com.google.cloud.deploy.v1.Automation getAutomations(int index) { + if (automationsBuilder_ == null) { + return automations_.get(index); + } else { + return automationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The `Automations` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + public Builder setAutomations(int index, com.google.cloud.deploy.v1.Automation value) { + if (automationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAutomationsIsMutable(); + automations_.set(index, value); + onChanged(); + } else { + automationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The `Automations` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + public Builder setAutomations( + int index, com.google.cloud.deploy.v1.Automation.Builder builderForValue) { + if (automationsBuilder_ == null) { + ensureAutomationsIsMutable(); + automations_.set(index, builderForValue.build()); + onChanged(); + } else { + automationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `Automations` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + public Builder addAutomations(com.google.cloud.deploy.v1.Automation value) { + if (automationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAutomationsIsMutable(); + automations_.add(value); + onChanged(); + } else { + automationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The `Automations` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + public Builder addAutomations(int index, com.google.cloud.deploy.v1.Automation value) { + if (automationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAutomationsIsMutable(); + automations_.add(index, value); + onChanged(); + } else { + automationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The `Automations` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + public Builder addAutomations(com.google.cloud.deploy.v1.Automation.Builder builderForValue) { + if (automationsBuilder_ == null) { + ensureAutomationsIsMutable(); + automations_.add(builderForValue.build()); + onChanged(); + } else { + automationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `Automations` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + public Builder addAutomations( + int index, com.google.cloud.deploy.v1.Automation.Builder builderForValue) { + if (automationsBuilder_ == null) { + ensureAutomationsIsMutable(); + automations_.add(index, builderForValue.build()); + onChanged(); + } else { + automationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The `Automations` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + public Builder addAllAutomations( + java.lang.Iterable values) { + if (automationsBuilder_ == null) { + ensureAutomationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, automations_); + onChanged(); + } else { + automationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The `Automations` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + public Builder clearAutomations() { + if (automationsBuilder_ == null) { + automations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + automationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The `Automations` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + public Builder removeAutomations(int index) { + if (automationsBuilder_ == null) { + ensureAutomationsIsMutable(); + automations_.remove(index); + onChanged(); + } else { + automationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The `Automations` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + public com.google.cloud.deploy.v1.Automation.Builder getAutomationsBuilder(int index) { + return getAutomationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The `Automations` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + public com.google.cloud.deploy.v1.AutomationOrBuilder getAutomationsOrBuilder(int index) { + if (automationsBuilder_ == null) { + return automations_.get(index); + } else { + return automationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The `Automations` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + public java.util.List + getAutomationsOrBuilderList() { + if (automationsBuilder_ != null) { + return automationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(automations_); + } + } + /** + * + * + *
+     * The `Automations` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + public com.google.cloud.deploy.v1.Automation.Builder addAutomationsBuilder() { + return getAutomationsFieldBuilder() + .addBuilder(com.google.cloud.deploy.v1.Automation.getDefaultInstance()); + } + /** + * + * + *
+     * The `Automations` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + public com.google.cloud.deploy.v1.Automation.Builder addAutomationsBuilder(int index) { + return getAutomationsFieldBuilder() + .addBuilder(index, com.google.cloud.deploy.v1.Automation.getDefaultInstance()); + } + /** + * + * + *
+     * The `Automations` objects.
+     * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + public java.util.List + getAutomationsBuilderList() { + return getAutomationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Automation, + com.google.cloud.deploy.v1.Automation.Builder, + com.google.cloud.deploy.v1.AutomationOrBuilder> + getAutomationsFieldBuilder() { + if (automationsBuilder_ == null) { + automationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.Automation, + com.google.cloud.deploy.v1.Automation.Builder, + com.google.cloud.deploy.v1.AutomationOrBuilder>( + automations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + automations_ = null; + } + return automationsBuilder_; + } + + 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; + bitField0_ |= 0x00000002; + 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(); + bitField0_ = (bitField0_ & ~0x00000002); + 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + 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); + } + /** + * + * + *
+     * 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); + bitField0_ |= 0x00000004; + 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); + bitField0_ |= 0x00000004; + 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_); + bitField0_ |= 0x00000004; + 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.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + 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); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.ListAutomationsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.ListAutomationsResponse) + private static final com.google.cloud.deploy.v1.ListAutomationsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.ListAutomationsResponse(); + } + + public static com.google.cloud.deploy.v1.ListAutomationsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAutomationsResponse 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.ListAutomationsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationsResponseOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationsResponseOrBuilder.java new file mode 100644 index 000000000000..e7ea716299d1 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListAutomationsResponseOrBuilder.java @@ -0,0 +1,155 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 ListAutomationsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.ListAutomationsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The `Automations` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + java.util.List getAutomationsList(); + /** + * + * + *
+   * The `Automations` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + com.google.cloud.deploy.v1.Automation getAutomations(int index); + /** + * + * + *
+   * The `Automations` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + int getAutomationsCount(); + /** + * + * + *
+   * The `Automations` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + java.util.List + getAutomationsOrBuilderList(); + /** + * + * + *
+   * The `Automations` objects.
+   * 
+ * + * repeated .google.cloud.deploy.v1.Automation automations = 1; + */ + com.google.cloud.deploy.v1.AutomationOrBuilder getAutomationsOrBuilder(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/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequest.java index d7166bf9e0cf..b2510978b6f8 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequest.java @@ -74,7 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The parent, which owns this collection of pipelines. Format must
-   * be projects/{project_id}/locations/{location_name}.
+   * be `projects/{project_id}/locations/{location_name}`.
    * 
* * @@ -100,7 +100,7 @@ public java.lang.String getParent() { * *
    * Required. The parent, which owns this collection of pipelines. Format must
-   * be projects/{project_id}/locations/{location_name}.
+   * be `projects/{project_id}/locations/{location_name}`.
    * 
* * @@ -749,7 +749,7 @@ public Builder mergeFrom( * *
      * Required. The parent, which owns this collection of pipelines. Format must
-     * be projects/{project_id}/locations/{location_name}.
+     * be `projects/{project_id}/locations/{location_name}`.
      * 
* * @@ -774,7 +774,7 @@ public java.lang.String getParent() { * *
      * Required. The parent, which owns this collection of pipelines. Format must
-     * be projects/{project_id}/locations/{location_name}.
+     * be `projects/{project_id}/locations/{location_name}`.
      * 
* * @@ -799,7 +799,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
      * Required. The parent, which owns this collection of pipelines. Format must
-     * be projects/{project_id}/locations/{location_name}.
+     * be `projects/{project_id}/locations/{location_name}`.
      * 
* * @@ -823,7 +823,7 @@ public Builder setParent(java.lang.String value) { * *
      * Required. The parent, which owns this collection of pipelines. Format must
-     * be projects/{project_id}/locations/{location_name}.
+     * be `projects/{project_id}/locations/{location_name}`.
      * 
* * @@ -843,7 +843,7 @@ public Builder clearParent() { * *
      * Required. The parent, which owns this collection of pipelines. Format must
-     * be projects/{project_id}/locations/{location_name}.
+     * be `projects/{project_id}/locations/{location_name}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequestOrBuilder.java index 98d2c0c76934..1406d543d2a3 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListDeliveryPipelinesRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface ListDeliveryPipelinesRequestOrBuilder * *
    * Required. The parent, which owns this collection of pipelines. Format must
-   * be projects/{project_id}/locations/{location_name}.
+   * be `projects/{project_id}/locations/{location_name}`.
    * 
* * @@ -43,7 +43,7 @@ public interface ListDeliveryPipelinesRequestOrBuilder * *
    * Required. The parent, which owns this collection of pipelines. Format must
-   * be projects/{project_id}/locations/{location_name}.
+   * be `projects/{project_id}/locations/{location_name}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequest.java index 5bd1ae7fabce..4afe7ea247f2 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequest.java @@ -74,7 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The parent, which owns this collection of targets. Format must be
-   * projects/{project_id}/locations/{location_name}.
+   * `projects/{project_id}/locations/{location_name}`.
    * 
* * @@ -100,7 +100,7 @@ public java.lang.String getParent() { * *
    * Required. The parent, which owns this collection of targets. Format must be
-   * projects/{project_id}/locations/{location_name}.
+   * `projects/{project_id}/locations/{location_name}`.
    * 
* * @@ -749,7 +749,7 @@ public Builder mergeFrom( * *
      * Required. The parent, which owns this collection of targets. Format must be
-     * projects/{project_id}/locations/{location_name}.
+     * `projects/{project_id}/locations/{location_name}`.
      * 
* * @@ -774,7 +774,7 @@ public java.lang.String getParent() { * *
      * Required. The parent, which owns this collection of targets. Format must be
-     * projects/{project_id}/locations/{location_name}.
+     * `projects/{project_id}/locations/{location_name}`.
      * 
* * @@ -799,7 +799,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
      * Required. The parent, which owns this collection of targets. Format must be
-     * projects/{project_id}/locations/{location_name}.
+     * `projects/{project_id}/locations/{location_name}`.
      * 
* * @@ -823,7 +823,7 @@ public Builder setParent(java.lang.String value) { * *
      * Required. The parent, which owns this collection of targets. Format must be
-     * projects/{project_id}/locations/{location_name}.
+     * `projects/{project_id}/locations/{location_name}`.
      * 
* * @@ -843,7 +843,7 @@ public Builder clearParent() { * *
      * Required. The parent, which owns this collection of targets. Format must be
-     * projects/{project_id}/locations/{location_name}.
+     * `projects/{project_id}/locations/{location_name}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequestOrBuilder.java index d989ae90c6db..4855d0f7a917 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ListTargetsRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface ListTargetsRequestOrBuilder * *
    * Required. The parent, which owns this collection of targets. Format must be
-   * projects/{project_id}/locations/{location_name}.
+   * `projects/{project_id}/locations/{location_name}`.
    * 
* * @@ -43,7 +43,7 @@ public interface ListTargetsRequestOrBuilder * *
    * Required. The parent, which owns this collection of targets. Format must be
-   * projects/{project_id}/locations/{location_name}.
+   * `projects/{project_id}/locations/{location_name}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Metadata.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Metadata.java index b5d82dd8a402..292a2753fa71 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Metadata.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Metadata.java @@ -119,6 +119,65 @@ public com.google.cloud.deploy.v1.CloudRunMetadataOrBuilder getCloudRunOrBuilder : cloudRun_; } + public static final int AUTOMATION_FIELD_NUMBER = 2; + private com.google.cloud.deploy.v1.AutomationRolloutMetadata automation_; + /** + * + * + *
+   * Output only. AutomationRolloutMetadata contains the information about the
+   * interactions between Automation service and this rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRolloutMetadata automation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the automation field is set. + */ + @java.lang.Override + public boolean hasAutomation() { + return automation_ != null; + } + /** + * + * + *
+   * Output only. AutomationRolloutMetadata contains the information about the
+   * interactions between Automation service and this rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRolloutMetadata automation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The automation. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRolloutMetadata getAutomation() { + return automation_ == null + ? com.google.cloud.deploy.v1.AutomationRolloutMetadata.getDefaultInstance() + : automation_; + } + /** + * + * + *
+   * Output only. AutomationRolloutMetadata contains the information about the
+   * interactions between Automation service and this rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRolloutMetadata automation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRolloutMetadataOrBuilder getAutomationOrBuilder() { + return automation_ == null + ? com.google.cloud.deploy.v1.AutomationRolloutMetadata.getDefaultInstance() + : automation_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -136,6 +195,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (cloudRun_ != null) { output.writeMessage(1, getCloudRun()); } + if (automation_ != null) { + output.writeMessage(2, getAutomation()); + } getUnknownFields().writeTo(output); } @@ -148,6 +210,9 @@ public int getSerializedSize() { if (cloudRun_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCloudRun()); } + if (automation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAutomation()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -167,6 +232,10 @@ public boolean equals(final java.lang.Object obj) { if (hasCloudRun()) { if (!getCloudRun().equals(other.getCloudRun())) return false; } + if (hasAutomation() != other.hasAutomation()) return false; + if (hasAutomation()) { + if (!getAutomation().equals(other.getAutomation())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -182,6 +251,10 @@ public int hashCode() { hash = (37 * hash) + CLOUD_RUN_FIELD_NUMBER; hash = (53 * hash) + getCloudRun().hashCode(); } + if (hasAutomation()) { + hash = (37 * hash) + AUTOMATION_FIELD_NUMBER; + hash = (53 * hash) + getAutomation().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -325,6 +398,11 @@ public Builder clear() { cloudRunBuilder_.dispose(); cloudRunBuilder_ = null; } + automation_ = null; + if (automationBuilder_ != null) { + automationBuilder_.dispose(); + automationBuilder_ = null; + } return this; } @@ -363,6 +441,9 @@ private void buildPartial0(com.google.cloud.deploy.v1.Metadata result) { if (((from_bitField0_ & 0x00000001) != 0)) { result.cloudRun_ = cloudRunBuilder_ == null ? cloudRun_ : cloudRunBuilder_.build(); } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.automation_ = automationBuilder_ == null ? automation_ : automationBuilder_.build(); + } } @java.lang.Override @@ -413,6 +494,9 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.Metadata other) { if (other.hasCloudRun()) { mergeCloudRun(other.getCloudRun()); } + if (other.hasAutomation()) { + mergeAutomation(other.getAutomation()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -445,6 +529,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 + case 18: + { + input.readMessage(getAutomationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -675,6 +765,218 @@ public com.google.cloud.deploy.v1.CloudRunMetadataOrBuilder getCloudRunOrBuilder return cloudRunBuilder_; } + private com.google.cloud.deploy.v1.AutomationRolloutMetadata automation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationRolloutMetadata, + com.google.cloud.deploy.v1.AutomationRolloutMetadata.Builder, + com.google.cloud.deploy.v1.AutomationRolloutMetadataOrBuilder> + automationBuilder_; + /** + * + * + *
+     * Output only. AutomationRolloutMetadata contains the information about the
+     * interactions between Automation service and this rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRolloutMetadata automation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the automation field is set. + */ + public boolean hasAutomation() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. AutomationRolloutMetadata contains the information about the
+     * interactions between Automation service and this rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRolloutMetadata automation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The automation. + */ + public com.google.cloud.deploy.v1.AutomationRolloutMetadata getAutomation() { + if (automationBuilder_ == null) { + return automation_ == null + ? com.google.cloud.deploy.v1.AutomationRolloutMetadata.getDefaultInstance() + : automation_; + } else { + return automationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. AutomationRolloutMetadata contains the information about the
+     * interactions between Automation service and this rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRolloutMetadata automation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAutomation(com.google.cloud.deploy.v1.AutomationRolloutMetadata value) { + if (automationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + automation_ = value; + } else { + automationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. AutomationRolloutMetadata contains the information about the
+     * interactions between Automation service and this rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRolloutMetadata automation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAutomation( + com.google.cloud.deploy.v1.AutomationRolloutMetadata.Builder builderForValue) { + if (automationBuilder_ == null) { + automation_ = builderForValue.build(); + } else { + automationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. AutomationRolloutMetadata contains the information about the
+     * interactions between Automation service and this rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRolloutMetadata automation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAutomation(com.google.cloud.deploy.v1.AutomationRolloutMetadata value) { + if (automationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && automation_ != null + && automation_ + != com.google.cloud.deploy.v1.AutomationRolloutMetadata.getDefaultInstance()) { + getAutomationBuilder().mergeFrom(value); + } else { + automation_ = value; + } + } else { + automationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. AutomationRolloutMetadata contains the information about the
+     * interactions between Automation service and this rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRolloutMetadata automation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAutomation() { + bitField0_ = (bitField0_ & ~0x00000002); + automation_ = null; + if (automationBuilder_ != null) { + automationBuilder_.dispose(); + automationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. AutomationRolloutMetadata contains the information about the
+     * interactions between Automation service and this rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRolloutMetadata automation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.AutomationRolloutMetadata.Builder getAutomationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAutomationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. AutomationRolloutMetadata contains the information about the
+     * interactions between Automation service and this rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRolloutMetadata automation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.AutomationRolloutMetadataOrBuilder getAutomationOrBuilder() { + if (automationBuilder_ != null) { + return automationBuilder_.getMessageOrBuilder(); + } else { + return automation_ == null + ? com.google.cloud.deploy.v1.AutomationRolloutMetadata.getDefaultInstance() + : automation_; + } + } + /** + * + * + *
+     * Output only. AutomationRolloutMetadata contains the information about the
+     * interactions between Automation service and this rollout.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRolloutMetadata automation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationRolloutMetadata, + com.google.cloud.deploy.v1.AutomationRolloutMetadata.Builder, + com.google.cloud.deploy.v1.AutomationRolloutMetadataOrBuilder> + getAutomationFieldBuilder() { + if (automationBuilder_ == null) { + automationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationRolloutMetadata, + com.google.cloud.deploy.v1.AutomationRolloutMetadata.Builder, + com.google.cloud.deploy.v1.AutomationRolloutMetadataOrBuilder>( + getAutomation(), getParentForChildren(), isClean()); + automation_ = null; + } + return automationBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/MetadataOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/MetadataOrBuilder.java index 8c87130ef9bb..18ae06fdfc32 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/MetadataOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/MetadataOrBuilder.java @@ -66,4 +66,48 @@ public interface MetadataOrBuilder *
*/ com.google.cloud.deploy.v1.CloudRunMetadataOrBuilder getCloudRunOrBuilder(); + + /** + * + * + *
+   * Output only. AutomationRolloutMetadata contains the information about the
+   * interactions between Automation service and this rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRolloutMetadata automation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the automation field is set. + */ + boolean hasAutomation(); + /** + * + * + *
+   * Output only. AutomationRolloutMetadata contains the information about the
+   * interactions between Automation service and this rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRolloutMetadata automation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The automation. + */ + com.google.cloud.deploy.v1.AutomationRolloutMetadata getAutomation(); + /** + * + * + *
+   * Output only. AutomationRolloutMetadata contains the information about the
+   * interactions between Automation service and this rollout.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRolloutMetadata automation = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.AutomationRolloutMetadataOrBuilder getAutomationOrBuilder(); } diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Postdeploy.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Postdeploy.java index 2a3fda9ddc1c..d5b377e07d45 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Postdeploy.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Postdeploy.java @@ -71,7 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Optional. A sequence of skaffold custom actions to invoke during execution
+   * Optional. A sequence of Skaffold custom actions to invoke during execution
    * of the postdeploy job.
    * 
* @@ -86,7 +86,7 @@ public com.google.protobuf.ProtocolStringList getActionsList() { * * *
-   * Optional. A sequence of skaffold custom actions to invoke during execution
+   * Optional. A sequence of Skaffold custom actions to invoke during execution
    * of the postdeploy job.
    * 
* @@ -101,7 +101,7 @@ public int getActionsCount() { * * *
-   * Optional. A sequence of skaffold custom actions to invoke during execution
+   * Optional. A sequence of Skaffold custom actions to invoke during execution
    * of the postdeploy job.
    * 
* @@ -117,7 +117,7 @@ public java.lang.String getActions(int index) { * * *
-   * Optional. A sequence of skaffold custom actions to invoke during execution
+   * Optional. A sequence of Skaffold custom actions to invoke during execution
    * of the postdeploy job.
    * 
* @@ -496,7 +496,7 @@ private void ensureActionsIsMutable() { * * *
-     * Optional. A sequence of skaffold custom actions to invoke during execution
+     * Optional. A sequence of Skaffold custom actions to invoke during execution
      * of the postdeploy job.
      * 
* @@ -512,7 +512,7 @@ public com.google.protobuf.ProtocolStringList getActionsList() { * * *
-     * Optional. A sequence of skaffold custom actions to invoke during execution
+     * Optional. A sequence of Skaffold custom actions to invoke during execution
      * of the postdeploy job.
      * 
* @@ -527,7 +527,7 @@ public int getActionsCount() { * * *
-     * Optional. A sequence of skaffold custom actions to invoke during execution
+     * Optional. A sequence of Skaffold custom actions to invoke during execution
      * of the postdeploy job.
      * 
* @@ -543,7 +543,7 @@ public java.lang.String getActions(int index) { * * *
-     * Optional. A sequence of skaffold custom actions to invoke during execution
+     * Optional. A sequence of Skaffold custom actions to invoke during execution
      * of the postdeploy job.
      * 
* @@ -559,7 +559,7 @@ public com.google.protobuf.ByteString getActionsBytes(int index) { * * *
-     * Optional. A sequence of skaffold custom actions to invoke during execution
+     * Optional. A sequence of Skaffold custom actions to invoke during execution
      * of the postdeploy job.
      * 
* @@ -583,7 +583,7 @@ public Builder setActions(int index, java.lang.String value) { * * *
-     * Optional. A sequence of skaffold custom actions to invoke during execution
+     * Optional. A sequence of Skaffold custom actions to invoke during execution
      * of the postdeploy job.
      * 
* @@ -606,7 +606,7 @@ public Builder addActions(java.lang.String value) { * * *
-     * Optional. A sequence of skaffold custom actions to invoke during execution
+     * Optional. A sequence of Skaffold custom actions to invoke during execution
      * of the postdeploy job.
      * 
* @@ -626,7 +626,7 @@ public Builder addAllActions(java.lang.Iterable values) { * * *
-     * Optional. A sequence of skaffold custom actions to invoke during execution
+     * Optional. A sequence of Skaffold custom actions to invoke during execution
      * of the postdeploy job.
      * 
* @@ -645,7 +645,7 @@ public Builder clearActions() { * * *
-     * Optional. A sequence of skaffold custom actions to invoke during execution
+     * Optional. A sequence of Skaffold custom actions to invoke during execution
      * of the postdeploy job.
      * 
* diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PostdeployJobRun.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PostdeployJobRun.java index 2a0199e62b26..c0610ba30213 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PostdeployJobRun.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PostdeployJobRun.java @@ -111,7 +111,7 @@ public enum FailureCause implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The postdeploy build did not complete within the alloted time.
+     * The postdeploy job run did not complete within the alloted time.
      * 
* * DEADLINE_EXCEEDED = 3; @@ -168,7 +168,7 @@ public enum FailureCause implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The postdeploy build did not complete within the alloted time.
+     * The postdeploy job run did not complete within the alloted time.
      * 
* * DEADLINE_EXCEEDED = 3; @@ -283,7 +283,7 @@ private FailureCause(int value) { *
    * Output only. The resource name of the Cloud Build `Build` object that is
    * used to execute the custom actions associated with the postdeploy Job.
-   * Format is projects/{project}/locations/{location}/builds/{build}.
+   * Format is `projects/{project}/locations/{location}/builds/{build}`.
    * 
* * @@ -310,7 +310,7 @@ public java.lang.String getBuild() { *
    * Output only. The resource name of the Cloud Build `Build` object that is
    * used to execute the custom actions associated with the postdeploy Job.
-   * Format is projects/{project}/locations/{location}/builds/{build}.
+   * Format is `projects/{project}/locations/{location}/builds/{build}`.
    * 
* * @@ -826,7 +826,7 @@ public Builder mergeFrom( *
      * Output only. The resource name of the Cloud Build `Build` object that is
      * used to execute the custom actions associated with the postdeploy Job.
-     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * Format is `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * @@ -852,7 +852,7 @@ public java.lang.String getBuild() { *
      * Output only. The resource name of the Cloud Build `Build` object that is
      * used to execute the custom actions associated with the postdeploy Job.
-     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * Format is `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * @@ -878,7 +878,7 @@ public com.google.protobuf.ByteString getBuildBytes() { *
      * Output only. The resource name of the Cloud Build `Build` object that is
      * used to execute the custom actions associated with the postdeploy Job.
-     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * Format is `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * @@ -903,7 +903,7 @@ public Builder setBuild(java.lang.String value) { *
      * Output only. The resource name of the Cloud Build `Build` object that is
      * used to execute the custom actions associated with the postdeploy Job.
-     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * Format is `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * @@ -924,7 +924,7 @@ public Builder clearBuild() { *
      * Output only. The resource name of the Cloud Build `Build` object that is
      * used to execute the custom actions associated with the postdeploy Job.
-     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * Format is `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PostdeployJobRunOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PostdeployJobRunOrBuilder.java index 7af6832f5e92..ff5421c2d88e 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PostdeployJobRunOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PostdeployJobRunOrBuilder.java @@ -29,7 +29,7 @@ public interface PostdeployJobRunOrBuilder *
    * Output only. The resource name of the Cloud Build `Build` object that is
    * used to execute the custom actions associated with the postdeploy Job.
-   * Format is projects/{project}/locations/{location}/builds/{build}.
+   * Format is `projects/{project}/locations/{location}/builds/{build}`.
    * 
* * @@ -45,7 +45,7 @@ public interface PostdeployJobRunOrBuilder *
    * Output only. The resource name of the Cloud Build `Build` object that is
    * used to execute the custom actions associated with the postdeploy Job.
-   * Format is projects/{project}/locations/{location}/builds/{build}.
+   * Format is `projects/{project}/locations/{location}/builds/{build}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PostdeployOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PostdeployOrBuilder.java index d16b303200dd..fce4b94befd3 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PostdeployOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PostdeployOrBuilder.java @@ -27,7 +27,7 @@ public interface PostdeployOrBuilder * * *
-   * Optional. A sequence of skaffold custom actions to invoke during execution
+   * Optional. A sequence of Skaffold custom actions to invoke during execution
    * of the postdeploy job.
    * 
* @@ -40,7 +40,7 @@ public interface PostdeployOrBuilder * * *
-   * Optional. A sequence of skaffold custom actions to invoke during execution
+   * Optional. A sequence of Skaffold custom actions to invoke during execution
    * of the postdeploy job.
    * 
* @@ -53,7 +53,7 @@ public interface PostdeployOrBuilder * * *
-   * Optional. A sequence of skaffold custom actions to invoke during execution
+   * Optional. A sequence of Skaffold custom actions to invoke during execution
    * of the postdeploy job.
    * 
* @@ -67,7 +67,7 @@ public interface PostdeployOrBuilder * * *
-   * Optional. A sequence of skaffold custom actions to invoke during execution
+   * Optional. A sequence of Skaffold custom actions to invoke during execution
    * of the postdeploy job.
    * 
* diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Predeploy.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Predeploy.java index d848a821b3e6..2ab20781c65f 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Predeploy.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Predeploy.java @@ -71,7 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Optional. A sequence of skaffold custom actions to invoke during execution
+   * Optional. A sequence of Skaffold custom actions to invoke during execution
    * of the predeploy job.
    * 
* @@ -86,7 +86,7 @@ public com.google.protobuf.ProtocolStringList getActionsList() { * * *
-   * Optional. A sequence of skaffold custom actions to invoke during execution
+   * Optional. A sequence of Skaffold custom actions to invoke during execution
    * of the predeploy job.
    * 
* @@ -101,7 +101,7 @@ public int getActionsCount() { * * *
-   * Optional. A sequence of skaffold custom actions to invoke during execution
+   * Optional. A sequence of Skaffold custom actions to invoke during execution
    * of the predeploy job.
    * 
* @@ -117,7 +117,7 @@ public java.lang.String getActions(int index) { * * *
-   * Optional. A sequence of skaffold custom actions to invoke during execution
+   * Optional. A sequence of Skaffold custom actions to invoke during execution
    * of the predeploy job.
    * 
* @@ -495,7 +495,7 @@ private void ensureActionsIsMutable() { * * *
-     * Optional. A sequence of skaffold custom actions to invoke during execution
+     * Optional. A sequence of Skaffold custom actions to invoke during execution
      * of the predeploy job.
      * 
* @@ -511,7 +511,7 @@ public com.google.protobuf.ProtocolStringList getActionsList() { * * *
-     * Optional. A sequence of skaffold custom actions to invoke during execution
+     * Optional. A sequence of Skaffold custom actions to invoke during execution
      * of the predeploy job.
      * 
* @@ -526,7 +526,7 @@ public int getActionsCount() { * * *
-     * Optional. A sequence of skaffold custom actions to invoke during execution
+     * Optional. A sequence of Skaffold custom actions to invoke during execution
      * of the predeploy job.
      * 
* @@ -542,7 +542,7 @@ public java.lang.String getActions(int index) { * * *
-     * Optional. A sequence of skaffold custom actions to invoke during execution
+     * Optional. A sequence of Skaffold custom actions to invoke during execution
      * of the predeploy job.
      * 
* @@ -558,7 +558,7 @@ public com.google.protobuf.ByteString getActionsBytes(int index) { * * *
-     * Optional. A sequence of skaffold custom actions to invoke during execution
+     * Optional. A sequence of Skaffold custom actions to invoke during execution
      * of the predeploy job.
      * 
* @@ -582,7 +582,7 @@ public Builder setActions(int index, java.lang.String value) { * * *
-     * Optional. A sequence of skaffold custom actions to invoke during execution
+     * Optional. A sequence of Skaffold custom actions to invoke during execution
      * of the predeploy job.
      * 
* @@ -605,7 +605,7 @@ public Builder addActions(java.lang.String value) { * * *
-     * Optional. A sequence of skaffold custom actions to invoke during execution
+     * Optional. A sequence of Skaffold custom actions to invoke during execution
      * of the predeploy job.
      * 
* @@ -625,7 +625,7 @@ public Builder addAllActions(java.lang.Iterable values) { * * *
-     * Optional. A sequence of skaffold custom actions to invoke during execution
+     * Optional. A sequence of Skaffold custom actions to invoke during execution
      * of the predeploy job.
      * 
* @@ -644,7 +644,7 @@ public Builder clearActions() { * * *
-     * Optional. A sequence of skaffold custom actions to invoke during execution
+     * Optional. A sequence of Skaffold custom actions to invoke during execution
      * of the predeploy job.
      * 
* diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PredeployJobRun.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PredeployJobRun.java index 84b71040293e..45ef172a13f4 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PredeployJobRun.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PredeployJobRun.java @@ -111,7 +111,7 @@ public enum FailureCause implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The predeploy build did not complete within the alloted time.
+     * The predeploy job run did not complete within the alloted time.
      * 
* * DEADLINE_EXCEEDED = 3; @@ -168,7 +168,7 @@ public enum FailureCause implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The predeploy build did not complete within the alloted time.
+     * The predeploy job run did not complete within the alloted time.
      * 
* * DEADLINE_EXCEEDED = 3; @@ -283,7 +283,7 @@ private FailureCause(int value) { *
    * Output only. The resource name of the Cloud Build `Build` object that is
    * used to execute the custom actions associated with the predeploy Job.
-   * Format is projects/{project}/locations/{location}/builds/{build}.
+   * Format is `projects/{project}/locations/{location}/builds/{build}`.
    * 
* * @@ -310,7 +310,7 @@ public java.lang.String getBuild() { *
    * Output only. The resource name of the Cloud Build `Build` object that is
    * used to execute the custom actions associated with the predeploy Job.
-   * Format is projects/{project}/locations/{location}/builds/{build}.
+   * Format is `projects/{project}/locations/{location}/builds/{build}`.
    * 
* * @@ -826,7 +826,7 @@ public Builder mergeFrom( *
      * Output only. The resource name of the Cloud Build `Build` object that is
      * used to execute the custom actions associated with the predeploy Job.
-     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * Format is `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * @@ -852,7 +852,7 @@ public java.lang.String getBuild() { *
      * Output only. The resource name of the Cloud Build `Build` object that is
      * used to execute the custom actions associated with the predeploy Job.
-     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * Format is `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * @@ -878,7 +878,7 @@ public com.google.protobuf.ByteString getBuildBytes() { *
      * Output only. The resource name of the Cloud Build `Build` object that is
      * used to execute the custom actions associated with the predeploy Job.
-     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * Format is `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * @@ -903,7 +903,7 @@ public Builder setBuild(java.lang.String value) { *
      * Output only. The resource name of the Cloud Build `Build` object that is
      * used to execute the custom actions associated with the predeploy Job.
-     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * Format is `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * @@ -924,7 +924,7 @@ public Builder clearBuild() { *
      * Output only. The resource name of the Cloud Build `Build` object that is
      * used to execute the custom actions associated with the predeploy Job.
-     * Format is projects/{project}/locations/{location}/builds/{build}.
+     * Format is `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PredeployJobRunOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PredeployJobRunOrBuilder.java index 15667e37fbb1..1cd21bfb6a21 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PredeployJobRunOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PredeployJobRunOrBuilder.java @@ -29,7 +29,7 @@ public interface PredeployJobRunOrBuilder *
    * Output only. The resource name of the Cloud Build `Build` object that is
    * used to execute the custom actions associated with the predeploy Job.
-   * Format is projects/{project}/locations/{location}/builds/{build}.
+   * Format is `projects/{project}/locations/{location}/builds/{build}`.
    * 
* * @@ -45,7 +45,7 @@ public interface PredeployJobRunOrBuilder *
    * Output only. The resource name of the Cloud Build `Build` object that is
    * used to execute the custom actions associated with the predeploy Job.
-   * Format is projects/{project}/locations/{location}/builds/{build}.
+   * Format is `projects/{project}/locations/{location}/builds/{build}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PredeployOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PredeployOrBuilder.java index 1b57752b7ac3..32e62fad2d37 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PredeployOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PredeployOrBuilder.java @@ -27,7 +27,7 @@ public interface PredeployOrBuilder * * *
-   * Optional. A sequence of skaffold custom actions to invoke during execution
+   * Optional. A sequence of Skaffold custom actions to invoke during execution
    * of the predeploy job.
    * 
* @@ -40,7 +40,7 @@ public interface PredeployOrBuilder * * *
-   * Optional. A sequence of skaffold custom actions to invoke during execution
+   * Optional. A sequence of Skaffold custom actions to invoke during execution
    * of the predeploy job.
    * 
* @@ -53,7 +53,7 @@ public interface PredeployOrBuilder * * *
-   * Optional. A sequence of skaffold custom actions to invoke during execution
+   * Optional. A sequence of Skaffold custom actions to invoke during execution
    * of the predeploy job.
    * 
* @@ -67,7 +67,7 @@ public interface PredeployOrBuilder * * *
-   * Optional. A sequence of skaffold custom actions to invoke during execution
+   * Optional. A sequence of Skaffold custom actions to invoke during execution
    * of the predeploy job.
    * 
* diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PromoteReleaseOperation.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PromoteReleaseOperation.java new file mode 100644 index 000000000000..041363c0981e --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PromoteReleaseOperation.java @@ -0,0 +1,1258 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * Contains the information of an automated promote-release operation.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.PromoteReleaseOperation} + */ +public final class PromoteReleaseOperation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.PromoteReleaseOperation) + PromoteReleaseOperationOrBuilder { + private static final long serialVersionUID = 0L; + // Use PromoteReleaseOperation.newBuilder() to construct. + private PromoteReleaseOperation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PromoteReleaseOperation() { + targetId_ = ""; + rollout_ = ""; + phase_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PromoteReleaseOperation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PromoteReleaseOperation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PromoteReleaseOperation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.PromoteReleaseOperation.class, + com.google.cloud.deploy.v1.PromoteReleaseOperation.Builder.class); + } + + public static final int TARGET_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object targetId_ = ""; + /** + * + * + *
+   * Output only. The ID of the target that represents the promotion stage to
+   * which the release will be promoted. The value of this field is the last
+   * segment of a target name.
+   * 
+ * + * string target_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+   * Output only. The ID of the target that represents the promotion stage to
+   * which the release will be promoted. The value of this field is the last
+   * segment of a target name.
+   * 
+ * + * string target_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 WAIT_FIELD_NUMBER = 2; + private com.google.protobuf.Duration wait_; + /** + * + * + *
+   * Output only. How long the operation will be paused.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the wait field is set. + */ + @java.lang.Override + public boolean hasWait() { + return wait_ != null; + } + /** + * + * + *
+   * Output only. How long the operation will be paused.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The wait. + */ + @java.lang.Override + public com.google.protobuf.Duration getWait() { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } + /** + * + * + *
+   * Output only. How long the operation will be paused.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getWaitOrBuilder() { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } + + public static final int ROLLOUT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object rollout_ = ""; + /** + * + * + *
+   * Output only. The name of the rollout that initiates the `AutomationRun`.
+   * 
+ * + * string rollout = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+   * Output only. The name of the rollout that initiates the `AutomationRun`.
+   * 
+ * + * string rollout = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object phase_ = ""; + /** + * + * + *
+   * Output only. The starting phase of the rollout created by this operation.
+   * 
+ * + * string phase = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The phase. + */ + @java.lang.Override + public java.lang.String getPhase() { + java.lang.Object ref = phase_; + 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(); + phase_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The starting phase of the rollout created by this operation.
+   * 
+ * + * string phase = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for phase. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPhaseBytes() { + java.lang.Object ref = phase_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + phase_ = 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(targetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, targetId_); + } + if (wait_ != null) { + output.writeMessage(2, getWait()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rollout_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, rollout_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(phase_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, phase_); + } + 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(targetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, targetId_); + } + if (wait_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getWait()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rollout_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, rollout_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(phase_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, phase_); + } + 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.PromoteReleaseOperation)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.PromoteReleaseOperation other = + (com.google.cloud.deploy.v1.PromoteReleaseOperation) obj; + + if (!getTargetId().equals(other.getTargetId())) return false; + if (hasWait() != other.hasWait()) return false; + if (hasWait()) { + if (!getWait().equals(other.getWait())) return false; + } + if (!getRollout().equals(other.getRollout())) return false; + if (!getPhase().equals(other.getPhase())) 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) + TARGET_ID_FIELD_NUMBER; + hash = (53 * hash) + getTargetId().hashCode(); + if (hasWait()) { + hash = (37 * hash) + WAIT_FIELD_NUMBER; + hash = (53 * hash) + getWait().hashCode(); + } + hash = (37 * hash) + ROLLOUT_FIELD_NUMBER; + hash = (53 * hash) + getRollout().hashCode(); + hash = (37 * hash) + PHASE_FIELD_NUMBER; + hash = (53 * hash) + getPhase().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.PromoteReleaseOperation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.PromoteReleaseOperation 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.PromoteReleaseOperation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.PromoteReleaseOperation 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.PromoteReleaseOperation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.PromoteReleaseOperation 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.PromoteReleaseOperation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.PromoteReleaseOperation 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.PromoteReleaseOperation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.PromoteReleaseOperation 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.PromoteReleaseOperation 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.PromoteReleaseOperation 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.PromoteReleaseOperation 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; + } + /** + * + * + *
+   * Contains the information of an automated promote-release operation.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.PromoteReleaseOperation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.PromoteReleaseOperation) + com.google.cloud.deploy.v1.PromoteReleaseOperationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PromoteReleaseOperation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PromoteReleaseOperation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.PromoteReleaseOperation.class, + com.google.cloud.deploy.v1.PromoteReleaseOperation.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.PromoteReleaseOperation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + targetId_ = ""; + wait_ = null; + if (waitBuilder_ != null) { + waitBuilder_.dispose(); + waitBuilder_ = null; + } + rollout_ = ""; + phase_ = ""; + 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_PromoteReleaseOperation_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.PromoteReleaseOperation getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.PromoteReleaseOperation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.PromoteReleaseOperation build() { + com.google.cloud.deploy.v1.PromoteReleaseOperation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.PromoteReleaseOperation buildPartial() { + com.google.cloud.deploy.v1.PromoteReleaseOperation result = + new com.google.cloud.deploy.v1.PromoteReleaseOperation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.PromoteReleaseOperation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.targetId_ = targetId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.wait_ = waitBuilder_ == null ? wait_ : waitBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.rollout_ = rollout_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.phase_ = phase_; + } + } + + @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.PromoteReleaseOperation) { + return mergeFrom((com.google.cloud.deploy.v1.PromoteReleaseOperation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.PromoteReleaseOperation other) { + if (other == com.google.cloud.deploy.v1.PromoteReleaseOperation.getDefaultInstance()) + return this; + if (!other.getTargetId().isEmpty()) { + targetId_ = other.targetId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasWait()) { + mergeWait(other.getWait()); + } + if (!other.getRollout().isEmpty()) { + rollout_ = other.rollout_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getPhase().isEmpty()) { + phase_ = other.phase_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + targetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getWaitFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + rollout_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + phase_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object targetId_ = ""; + /** + * + * + *
+     * Output only. The ID of the target that represents the promotion stage to
+     * which the release will be promoted. The value of this field is the last
+     * segment of a target name.
+     * 
+ * + * string target_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The ID of the target that represents the promotion stage to
+     * which the release will be promoted. The value of this field is the last
+     * segment of a target name.
+     * 
+ * + * string target_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The ID of the target that represents the promotion stage to
+     * which the release will be promoted. The value of this field is the last
+     * segment of a target name.
+     * 
+ * + * string target_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ID of the target that represents the promotion stage to
+     * which the release will be promoted. The value of this field is the last
+     * segment of a target name.
+     * 
+ * + * string target_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTargetId() { + targetId_ = getDefaultInstance().getTargetId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The ID of the target that represents the promotion stage to
+     * which the release will be promoted. The value of this field is the last
+     * segment of a target name.
+     * 
+ * + * string target_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Duration wait_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + waitBuilder_; + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the wait field is set. + */ + public boolean hasWait() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The wait. + */ + public com.google.protobuf.Duration getWait() { + if (waitBuilder_ == null) { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } else { + return waitBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setWait(com.google.protobuf.Duration value) { + if (waitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + wait_ = value; + } else { + waitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setWait(com.google.protobuf.Duration.Builder builderForValue) { + if (waitBuilder_ == null) { + wait_ = builderForValue.build(); + } else { + waitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeWait(com.google.protobuf.Duration value) { + if (waitBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && wait_ != null + && wait_ != com.google.protobuf.Duration.getDefaultInstance()) { + getWaitBuilder().mergeFrom(value); + } else { + wait_ = value; + } + } else { + waitBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearWait() { + bitField0_ = (bitField0_ & ~0x00000002); + wait_ = null; + if (waitBuilder_ != null) { + waitBuilder_.dispose(); + waitBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Duration.Builder getWaitBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getWaitFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.DurationOrBuilder getWaitOrBuilder() { + if (waitBuilder_ != null) { + return waitBuilder_.getMessageOrBuilder(); + } else { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getWaitFieldBuilder() { + if (waitBuilder_ == null) { + waitBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getWait(), getParentForChildren(), isClean()); + wait_ = null; + } + return waitBuilder_; + } + + private java.lang.Object rollout_ = ""; + /** + * + * + *
+     * Output only. The name of the rollout that initiates the `AutomationRun`.
+     * 
+ * + * string rollout = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The name of the rollout that initiates the `AutomationRun`.
+     * 
+ * + * string rollout = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The name of the rollout that initiates the `AutomationRun`.
+     * 
+ * + * string rollout = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the rollout that initiates the `AutomationRun`.
+     * 
+ * + * string rollout = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRollout() { + rollout_ = getDefaultInstance().getRollout(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the rollout that initiates the `AutomationRun`.
+     * 
+ * + * string rollout = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object phase_ = ""; + /** + * + * + *
+     * Output only. The starting phase of the rollout created by this operation.
+     * 
+ * + * string phase = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The phase. + */ + public java.lang.String getPhase() { + java.lang.Object ref = phase_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phase_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The starting phase of the rollout created by this operation.
+     * 
+ * + * string phase = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for phase. + */ + public com.google.protobuf.ByteString getPhaseBytes() { + java.lang.Object ref = phase_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + phase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The starting phase of the rollout created by this operation.
+     * 
+ * + * string phase = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The phase to set. + * @return This builder for chaining. + */ + public Builder setPhase(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + phase_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The starting phase of the rollout created by this operation.
+     * 
+ * + * string phase = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPhase() { + phase_ = getDefaultInstance().getPhase(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The starting phase of the rollout created by this operation.
+     * 
+ * + * string phase = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for phase to set. + * @return This builder for chaining. + */ + public Builder setPhaseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + phase_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.PromoteReleaseOperation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.PromoteReleaseOperation) + private static final com.google.cloud.deploy.v1.PromoteReleaseOperation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.PromoteReleaseOperation(); + } + + public static com.google.cloud.deploy.v1.PromoteReleaseOperation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PromoteReleaseOperation 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.PromoteReleaseOperation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PromoteReleaseOperationOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PromoteReleaseOperationOrBuilder.java new file mode 100644 index 000000000000..d3a331e3a40b --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PromoteReleaseOperationOrBuilder.java @@ -0,0 +1,139 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 PromoteReleaseOperationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.PromoteReleaseOperation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The ID of the target that represents the promotion stage to
+   * which the release will be promoted. The value of this field is the last
+   * segment of a target name.
+   * 
+ * + * string target_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The targetId. + */ + java.lang.String getTargetId(); + /** + * + * + *
+   * Output only. The ID of the target that represents the promotion stage to
+   * which the release will be promoted. The value of this field is the last
+   * segment of a target name.
+   * 
+ * + * string target_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for targetId. + */ + com.google.protobuf.ByteString getTargetIdBytes(); + + /** + * + * + *
+   * Output only. How long the operation will be paused.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the wait field is set. + */ + boolean hasWait(); + /** + * + * + *
+   * Output only. How long the operation will be paused.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The wait. + */ + com.google.protobuf.Duration getWait(); + /** + * + * + *
+   * Output only. How long the operation will be paused.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.DurationOrBuilder getWaitOrBuilder(); + + /** + * + * + *
+   * Output only. The name of the rollout that initiates the `AutomationRun`.
+   * 
+ * + * string rollout = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The rollout. + */ + java.lang.String getRollout(); + /** + * + * + *
+   * Output only. The name of the rollout that initiates the `AutomationRun`.
+   * 
+ * + * string rollout = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for rollout. + */ + com.google.protobuf.ByteString getRolloutBytes(); + + /** + * + * + *
+   * Output only. The starting phase of the rollout created by this operation.
+   * 
+ * + * string phase = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The phase. + */ + java.lang.String getPhase(); + /** + * + * + *
+   * Output only. The starting phase of the rollout created by this operation.
+   * 
+ * + * string phase = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for phase. + */ + com.google.protobuf.ByteString getPhaseBytes(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PromoteReleaseRule.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PromoteReleaseRule.java new file mode 100644 index 000000000000..6d708663a4de --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PromoteReleaseRule.java @@ -0,0 +1,1603 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * `PromoteRelease` rule will automatically promote a release from the current
+ * target to a specified target.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.PromoteReleaseRule} + */ +public final class PromoteReleaseRule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.PromoteReleaseRule) + PromoteReleaseRuleOrBuilder { + private static final long serialVersionUID = 0L; + // Use PromoteReleaseRule.newBuilder() to construct. + private PromoteReleaseRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PromoteReleaseRule() { + id_ = ""; + destinationTargetId_ = ""; + destinationPhase_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PromoteReleaseRule(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PromoteReleaseRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PromoteReleaseRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.PromoteReleaseRule.class, + com.google.cloud.deploy.v1.PromoteReleaseRule.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+   * Required. ID of the rule. This id must be unique in the `Automation`
+   * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. ID of the rule. This id must be unique in the `Automation`
+   * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 WAIT_FIELD_NUMBER = 2; + private com.google.protobuf.Duration wait_; + /** + * + * + *
+   * Optional. How long the release need to be paused until being promoted to
+   * the next target.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the wait field is set. + */ + @java.lang.Override + public boolean hasWait() { + return wait_ != null; + } + /** + * + * + *
+   * Optional. How long the release need to be paused until being promoted to
+   * the next target.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The wait. + */ + @java.lang.Override + public com.google.protobuf.Duration getWait() { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } + /** + * + * + *
+   * Optional. How long the release need to be paused until being promoted to
+   * the next target.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getWaitOrBuilder() { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } + + public static final int DESTINATION_TARGET_ID_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object destinationTargetId_ = ""; + /** + * + * + *
+   * Optional. The ID of the stage in the pipeline to which this `Release` is
+   * deploying. If unspecified, default it to the next stage in the promotion
+   * flow. The value of this field could be one of the following:
+   * * The last segment of a target name. It only needs the ID to determine
+   * if the target is one of the stages in the promotion sequence defined
+   * in the pipeline.
+   * * "@next", the next target in the promotion sequence.
+   * 
+ * + * string destination_target_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The destinationTargetId. + */ + @java.lang.Override + public java.lang.String getDestinationTargetId() { + java.lang.Object ref = destinationTargetId_; + 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(); + destinationTargetId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The ID of the stage in the pipeline to which this `Release` is
+   * deploying. If unspecified, default it to the next stage in the promotion
+   * flow. The value of this field could be one of the following:
+   * * The last segment of a target name. It only needs the ID to determine
+   * if the target is one of the stages in the promotion sequence defined
+   * in the pipeline.
+   * * "@next", the next target in the promotion sequence.
+   * 
+ * + * string destination_target_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for destinationTargetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationTargetIdBytes() { + java.lang.Object ref = destinationTargetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationTargetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONDITION_FIELD_NUMBER = 5; + private com.google.cloud.deploy.v1.AutomationRuleCondition condition_; + /** + * + * + *
+   * Output only. Information around the state of the Automation rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the condition field is set. + */ + @java.lang.Override + public boolean hasCondition() { + return condition_ != null; + } + /** + * + * + *
+   * Output only. Information around the state of the Automation rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The condition. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRuleCondition getCondition() { + return condition_ == null + ? com.google.cloud.deploy.v1.AutomationRuleCondition.getDefaultInstance() + : condition_; + } + /** + * + * + *
+   * Output only. Information around the state of the Automation rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRuleConditionOrBuilder getConditionOrBuilder() { + return condition_ == null + ? com.google.cloud.deploy.v1.AutomationRuleCondition.getDefaultInstance() + : condition_; + } + + public static final int DESTINATION_PHASE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object destinationPhase_ = ""; + /** + * + * + *
+   * Optional. The starting phase of the rollout created by this operation.
+   * Default to the first phase.
+   * 
+ * + * string destination_phase = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The destinationPhase. + */ + @java.lang.Override + public java.lang.String getDestinationPhase() { + java.lang.Object ref = destinationPhase_; + 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(); + destinationPhase_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The starting phase of the rollout created by this operation.
+   * Default to the first phase.
+   * 
+ * + * string destination_phase = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for destinationPhase. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationPhaseBytes() { + java.lang.Object ref = destinationPhase_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationPhase_ = 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(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (wait_ != null) { + output.writeMessage(2, getWait()); + } + if (condition_ != null) { + output.writeMessage(5, getCondition()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationTargetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, destinationTargetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationPhase_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, destinationPhase_); + } + 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 (wait_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getWait()); + } + if (condition_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCondition()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationTargetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, destinationTargetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationPhase_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, destinationPhase_); + } + 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.PromoteReleaseRule)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.PromoteReleaseRule other = + (com.google.cloud.deploy.v1.PromoteReleaseRule) obj; + + if (!getId().equals(other.getId())) return false; + if (hasWait() != other.hasWait()) return false; + if (hasWait()) { + if (!getWait().equals(other.getWait())) return false; + } + if (!getDestinationTargetId().equals(other.getDestinationTargetId())) return false; + if (hasCondition() != other.hasCondition()) return false; + if (hasCondition()) { + if (!getCondition().equals(other.getCondition())) return false; + } + if (!getDestinationPhase().equals(other.getDestinationPhase())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasWait()) { + hash = (37 * hash) + WAIT_FIELD_NUMBER; + hash = (53 * hash) + getWait().hashCode(); + } + hash = (37 * hash) + DESTINATION_TARGET_ID_FIELD_NUMBER; + hash = (53 * hash) + getDestinationTargetId().hashCode(); + if (hasCondition()) { + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + } + hash = (37 * hash) + DESTINATION_PHASE_FIELD_NUMBER; + hash = (53 * hash) + getDestinationPhase().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.PromoteReleaseRule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.PromoteReleaseRule 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.PromoteReleaseRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.PromoteReleaseRule 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.PromoteReleaseRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.PromoteReleaseRule 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.PromoteReleaseRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.PromoteReleaseRule 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.PromoteReleaseRule parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.PromoteReleaseRule 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.PromoteReleaseRule 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.PromoteReleaseRule 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.PromoteReleaseRule 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; + } + /** + * + * + *
+   * `PromoteRelease` rule will automatically promote a release from the current
+   * target to a specified target.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.PromoteReleaseRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.PromoteReleaseRule) + com.google.cloud.deploy.v1.PromoteReleaseRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PromoteReleaseRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_PromoteReleaseRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.PromoteReleaseRule.class, + com.google.cloud.deploy.v1.PromoteReleaseRule.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.PromoteReleaseRule.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + wait_ = null; + if (waitBuilder_ != null) { + waitBuilder_.dispose(); + waitBuilder_ = null; + } + destinationTargetId_ = ""; + condition_ = null; + if (conditionBuilder_ != null) { + conditionBuilder_.dispose(); + conditionBuilder_ = null; + } + destinationPhase_ = ""; + 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_PromoteReleaseRule_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.PromoteReleaseRule getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.PromoteReleaseRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.PromoteReleaseRule build() { + com.google.cloud.deploy.v1.PromoteReleaseRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.PromoteReleaseRule buildPartial() { + com.google.cloud.deploy.v1.PromoteReleaseRule result = + new com.google.cloud.deploy.v1.PromoteReleaseRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.PromoteReleaseRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.wait_ = waitBuilder_ == null ? wait_ : waitBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.destinationTargetId_ = destinationTargetId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.condition_ = conditionBuilder_ == null ? condition_ : conditionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.destinationPhase_ = destinationPhase_; + } + } + + @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.PromoteReleaseRule) { + return mergeFrom((com.google.cloud.deploy.v1.PromoteReleaseRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.PromoteReleaseRule other) { + if (other == com.google.cloud.deploy.v1.PromoteReleaseRule.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasWait()) { + mergeWait(other.getWait()); + } + if (!other.getDestinationTargetId().isEmpty()) { + destinationTargetId_ = other.destinationTargetId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasCondition()) { + mergeCondition(other.getCondition()); + } + if (!other.getDestinationPhase().isEmpty()) { + destinationPhase_ = other.destinationPhase_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getWaitFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 42: + { + input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 58: + { + destinationTargetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 58 + case 66: + { + destinationPhase_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * Required. ID of the rule. This id must be unique in the `Automation`
+     * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. ID of the rule. This id must be unique in the `Automation`
+     * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. ID of the rule. This id must be unique in the `Automation`
+     * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the rule. This id must be unique in the `Automation`
+     * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the rule. This id must be unique in the `Automation`
+     * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Duration wait_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + waitBuilder_; + /** + * + * + *
+     * Optional. How long the release need to be paused until being promoted to
+     * the next target.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the wait field is set. + */ + public boolean hasWait() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. How long the release need to be paused until being promoted to
+     * the next target.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The wait. + */ + public com.google.protobuf.Duration getWait() { + if (waitBuilder_ == null) { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } else { + return waitBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. How long the release need to be paused until being promoted to
+     * the next target.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setWait(com.google.protobuf.Duration value) { + if (waitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + wait_ = value; + } else { + waitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. How long the release need to be paused until being promoted to
+     * the next target.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setWait(com.google.protobuf.Duration.Builder builderForValue) { + if (waitBuilder_ == null) { + wait_ = builderForValue.build(); + } else { + waitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. How long the release need to be paused until being promoted to
+     * the next target.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeWait(com.google.protobuf.Duration value) { + if (waitBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && wait_ != null + && wait_ != com.google.protobuf.Duration.getDefaultInstance()) { + getWaitBuilder().mergeFrom(value); + } else { + wait_ = value; + } + } else { + waitBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. How long the release need to be paused until being promoted to
+     * the next target.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearWait() { + bitField0_ = (bitField0_ & ~0x00000002); + wait_ = null; + if (waitBuilder_ != null) { + waitBuilder_.dispose(); + waitBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. How long the release need to be paused until being promoted to
+     * the next target.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.Duration.Builder getWaitBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getWaitFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. How long the release need to be paused until being promoted to
+     * the next target.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.DurationOrBuilder getWaitOrBuilder() { + if (waitBuilder_ != null) { + return waitBuilder_.getMessageOrBuilder(); + } else { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } + } + /** + * + * + *
+     * Optional. How long the release need to be paused until being promoted to
+     * the next target.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getWaitFieldBuilder() { + if (waitBuilder_ == null) { + waitBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getWait(), getParentForChildren(), isClean()); + wait_ = null; + } + return waitBuilder_; + } + + private java.lang.Object destinationTargetId_ = ""; + /** + * + * + *
+     * Optional. The ID of the stage in the pipeline to which this `Release` is
+     * deploying. If unspecified, default it to the next stage in the promotion
+     * flow. The value of this field could be one of the following:
+     * * The last segment of a target name. It only needs the ID to determine
+     * if the target is one of the stages in the promotion sequence defined
+     * in the pipeline.
+     * * "@next", the next target in the promotion sequence.
+     * 
+ * + * string destination_target_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The destinationTargetId. + */ + public java.lang.String getDestinationTargetId() { + java.lang.Object ref = destinationTargetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationTargetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The ID of the stage in the pipeline to which this `Release` is
+     * deploying. If unspecified, default it to the next stage in the promotion
+     * flow. The value of this field could be one of the following:
+     * * The last segment of a target name. It only needs the ID to determine
+     * if the target is one of the stages in the promotion sequence defined
+     * in the pipeline.
+     * * "@next", the next target in the promotion sequence.
+     * 
+ * + * string destination_target_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for destinationTargetId. + */ + public com.google.protobuf.ByteString getDestinationTargetIdBytes() { + java.lang.Object ref = destinationTargetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationTargetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The ID of the stage in the pipeline to which this `Release` is
+     * deploying. If unspecified, default it to the next stage in the promotion
+     * flow. The value of this field could be one of the following:
+     * * The last segment of a target name. It only needs the ID to determine
+     * if the target is one of the stages in the promotion sequence defined
+     * in the pipeline.
+     * * "@next", the next target in the promotion sequence.
+     * 
+ * + * string destination_target_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The destinationTargetId to set. + * @return This builder for chaining. + */ + public Builder setDestinationTargetId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationTargetId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ID of the stage in the pipeline to which this `Release` is
+     * deploying. If unspecified, default it to the next stage in the promotion
+     * flow. The value of this field could be one of the following:
+     * * The last segment of a target name. It only needs the ID to determine
+     * if the target is one of the stages in the promotion sequence defined
+     * in the pipeline.
+     * * "@next", the next target in the promotion sequence.
+     * 
+ * + * string destination_target_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDestinationTargetId() { + destinationTargetId_ = getDefaultInstance().getDestinationTargetId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ID of the stage in the pipeline to which this `Release` is
+     * deploying. If unspecified, default it to the next stage in the promotion
+     * flow. The value of this field could be one of the following:
+     * * The last segment of a target name. It only needs the ID to determine
+     * if the target is one of the stages in the promotion sequence defined
+     * in the pipeline.
+     * * "@next", the next target in the promotion sequence.
+     * 
+ * + * string destination_target_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for destinationTargetId to set. + * @return This builder for chaining. + */ + public Builder setDestinationTargetIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationTargetId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.deploy.v1.AutomationRuleCondition condition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationRuleCondition, + com.google.cloud.deploy.v1.AutomationRuleCondition.Builder, + com.google.cloud.deploy.v1.AutomationRuleConditionOrBuilder> + conditionBuilder_; + /** + * + * + *
+     * Output only. Information around the state of the Automation rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the condition field is set. + */ + public boolean hasCondition() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Information around the state of the Automation rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The condition. + */ + public com.google.cloud.deploy.v1.AutomationRuleCondition getCondition() { + if (conditionBuilder_ == null) { + return condition_ == null + ? com.google.cloud.deploy.v1.AutomationRuleCondition.getDefaultInstance() + : condition_; + } else { + return conditionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Information around the state of the Automation rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCondition(com.google.cloud.deploy.v1.AutomationRuleCondition value) { + if (conditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + } else { + conditionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Information around the state of the Automation rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCondition( + com.google.cloud.deploy.v1.AutomationRuleCondition.Builder builderForValue) { + if (conditionBuilder_ == null) { + condition_ = builderForValue.build(); + } else { + conditionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Information around the state of the Automation rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCondition(com.google.cloud.deploy.v1.AutomationRuleCondition value) { + if (conditionBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && condition_ != null + && condition_ + != com.google.cloud.deploy.v1.AutomationRuleCondition.getDefaultInstance()) { + getConditionBuilder().mergeFrom(value); + } else { + condition_ = value; + } + } else { + conditionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Information around the state of the Automation rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCondition() { + bitField0_ = (bitField0_ & ~0x00000008); + condition_ = null; + if (conditionBuilder_ != null) { + conditionBuilder_.dispose(); + conditionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Information around the state of the Automation rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.AutomationRuleCondition.Builder getConditionBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getConditionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Information around the state of the Automation rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.AutomationRuleConditionOrBuilder getConditionOrBuilder() { + if (conditionBuilder_ != null) { + return conditionBuilder_.getMessageOrBuilder(); + } else { + return condition_ == null + ? com.google.cloud.deploy.v1.AutomationRuleCondition.getDefaultInstance() + : condition_; + } + } + /** + * + * + *
+     * Output only. Information around the state of the Automation rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationRuleCondition, + com.google.cloud.deploy.v1.AutomationRuleCondition.Builder, + com.google.cloud.deploy.v1.AutomationRuleConditionOrBuilder> + getConditionFieldBuilder() { + if (conditionBuilder_ == null) { + conditionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationRuleCondition, + com.google.cloud.deploy.v1.AutomationRuleCondition.Builder, + com.google.cloud.deploy.v1.AutomationRuleConditionOrBuilder>( + getCondition(), getParentForChildren(), isClean()); + condition_ = null; + } + return conditionBuilder_; + } + + private java.lang.Object destinationPhase_ = ""; + /** + * + * + *
+     * Optional. The starting phase of the rollout created by this operation.
+     * Default to the first phase.
+     * 
+ * + * string destination_phase = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The destinationPhase. + */ + public java.lang.String getDestinationPhase() { + java.lang.Object ref = destinationPhase_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationPhase_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The starting phase of the rollout created by this operation.
+     * Default to the first phase.
+     * 
+ * + * string destination_phase = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for destinationPhase. + */ + public com.google.protobuf.ByteString getDestinationPhaseBytes() { + java.lang.Object ref = destinationPhase_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationPhase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The starting phase of the rollout created by this operation.
+     * Default to the first phase.
+     * 
+ * + * string destination_phase = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The destinationPhase to set. + * @return This builder for chaining. + */ + public Builder setDestinationPhase(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationPhase_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The starting phase of the rollout created by this operation.
+     * Default to the first phase.
+     * 
+ * + * string destination_phase = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDestinationPhase() { + destinationPhase_ = getDefaultInstance().getDestinationPhase(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The starting phase of the rollout created by this operation.
+     * Default to the first phase.
+     * 
+ * + * string destination_phase = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for destinationPhase to set. + * @return This builder for chaining. + */ + public Builder setDestinationPhaseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationPhase_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.PromoteReleaseRule) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.PromoteReleaseRule) + private static final com.google.cloud.deploy.v1.PromoteReleaseRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.PromoteReleaseRule(); + } + + public static com.google.cloud.deploy.v1.PromoteReleaseRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PromoteReleaseRule 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.PromoteReleaseRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PromoteReleaseRuleOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PromoteReleaseRuleOrBuilder.java new file mode 100644 index 000000000000..6f611a399a03 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/PromoteReleaseRuleOrBuilder.java @@ -0,0 +1,195 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 PromoteReleaseRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.PromoteReleaseRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. ID of the rule. This id must be unique in the `Automation`
+   * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Required. ID of the rule. This id must be unique in the `Automation`
+   * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Optional. How long the release need to be paused until being promoted to
+   * the next target.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the wait field is set. + */ + boolean hasWait(); + /** + * + * + *
+   * Optional. How long the release need to be paused until being promoted to
+   * the next target.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The wait. + */ + com.google.protobuf.Duration getWait(); + /** + * + * + *
+   * Optional. How long the release need to be paused until being promoted to
+   * the next target.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.DurationOrBuilder getWaitOrBuilder(); + + /** + * + * + *
+   * Optional. The ID of the stage in the pipeline to which this `Release` is
+   * deploying. If unspecified, default it to the next stage in the promotion
+   * flow. The value of this field could be one of the following:
+   * * The last segment of a target name. It only needs the ID to determine
+   * if the target is one of the stages in the promotion sequence defined
+   * in the pipeline.
+   * * "@next", the next target in the promotion sequence.
+   * 
+ * + * string destination_target_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The destinationTargetId. + */ + java.lang.String getDestinationTargetId(); + /** + * + * + *
+   * Optional. The ID of the stage in the pipeline to which this `Release` is
+   * deploying. If unspecified, default it to the next stage in the promotion
+   * flow. The value of this field could be one of the following:
+   * * The last segment of a target name. It only needs the ID to determine
+   * if the target is one of the stages in the promotion sequence defined
+   * in the pipeline.
+   * * "@next", the next target in the promotion sequence.
+   * 
+ * + * string destination_target_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for destinationTargetId. + */ + com.google.protobuf.ByteString getDestinationTargetIdBytes(); + + /** + * + * + *
+   * Output only. Information around the state of the Automation rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the condition field is set. + */ + boolean hasCondition(); + /** + * + * + *
+   * Output only. Information around the state of the Automation rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The condition. + */ + com.google.cloud.deploy.v1.AutomationRuleCondition getCondition(); + /** + * + * + *
+   * Output only. Information around the state of the Automation rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.AutomationRuleConditionOrBuilder getConditionOrBuilder(); + + /** + * + * + *
+   * Optional. The starting phase of the rollout created by this operation.
+   * Default to the first phase.
+   * 
+ * + * string destination_phase = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The destinationPhase. + */ + java.lang.String getDestinationPhase(); + /** + * + * + *
+   * Optional. The starting phase of the rollout created by this operation.
+   * Default to the first phase.
+   * 
+ * + * string destination_phase = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for destinationPhase. + */ + com.google.protobuf.ByteString getDestinationPhaseBytes(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Release.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Release.java index 9ec80832aeb5..7aefe8ccdbe4 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Release.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Release.java @@ -723,6 +723,18 @@ public enum FailureCause implements com.google.protobuf.ProtocolMessageEnum { * CLOUD_BUILD_REQUEST_FAILED = 3; */ CLOUD_BUILD_REQUEST_FAILED(3), + /** + * + * + *
+       * The render operation did not complete successfully because the
+       * verification stanza required for verify was not found on the skaffold
+       * configuration.
+       * 
+ * + * VERIFICATION_CONFIG_NOT_FOUND = 4; + */ + VERIFICATION_CONFIG_NOT_FOUND(4), /** * * @@ -782,6 +794,18 @@ public enum FailureCause implements com.google.protobuf.ProtocolMessageEnum { * CLOUD_BUILD_REQUEST_FAILED = 3; */ public static final int CLOUD_BUILD_REQUEST_FAILED_VALUE = 3; + /** + * + * + *
+       * The render operation did not complete successfully because the
+       * verification stanza required for verify was not found on the skaffold
+       * configuration.
+       * 
+ * + * VERIFICATION_CONFIG_NOT_FOUND = 4; + */ + public static final int VERIFICATION_CONFIG_NOT_FOUND_VALUE = 4; /** * * @@ -827,6 +851,8 @@ public static FailureCause forNumber(int value) { return EXECUTION_FAILED; case 3: return CLOUD_BUILD_REQUEST_FAILED; + case 4: + return VERIFICATION_CONFIG_NOT_FOUND; case 5: return CUSTOM_ACTION_NOT_FOUND; default: @@ -5370,9 +5396,8 @@ public com.google.cloud.deploy.v1.Release.ReleaseCondition getDefaultInstanceFor * * *
-   * Optional. Name of the `Release`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/[a-z][a-z0-9\-]{0,62}.
+   * Optional. Name of the `Release`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -5395,9 +5420,8 @@ public java.lang.String getName() { * * *
-   * Optional. Name of the `Release`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/[a-z][a-z0-9\-]{0,62}.
+   * Optional. Name of the `Release`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -7899,9 +7923,8 @@ public Builder mergeFrom( * * *
-     * Optional. Name of the `Release`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/[a-z][a-z0-9\-]{0,62}.
+     * Optional. Name of the `Release`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -7923,9 +7946,8 @@ public java.lang.String getName() { * * *
-     * Optional. Name of the `Release`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/[a-z][a-z0-9\-]{0,62}.
+     * Optional. Name of the `Release`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -7947,9 +7969,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Optional. Name of the `Release`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/[a-z][a-z0-9\-]{0,62}.
+     * Optional. Name of the `Release`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -7970,9 +7991,8 @@ public Builder setName(java.lang.String value) { * * *
-     * Optional. Name of the `Release`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/[a-z][a-z0-9\-]{0,62}.
+     * Optional. Name of the `Release`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -7989,9 +8009,8 @@ public Builder clearName() { * * *
-     * Optional. Name of the `Release`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/[a-z][a-z0-9\-]{0,62}.
+     * Optional. Name of the `Release`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseOrBuilder.java index 6e35a1914adb..116667d40d16 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseOrBuilder.java @@ -27,9 +27,8 @@ public interface ReleaseOrBuilder * * *
-   * Optional. Name of the `Release`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/[a-z][a-z0-9\-]{0,62}.
+   * Optional. Name of the `Release`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -41,9 +40,8 @@ public interface ReleaseOrBuilder * * *
-   * Optional. Name of the `Release`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/[a-z][a-z0-9\-]{0,62}.
+   * Optional. Name of the `Release`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseRenderEvent.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseRenderEvent.java index 2a39ba7e33a7..ba3637efb559 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseRenderEvent.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseRenderEvent.java @@ -41,6 +41,7 @@ private ReleaseRenderEvent(com.google.protobuf.GeneratedMessageV3.Builder bui private ReleaseRenderEvent() { message_ = ""; release_ = ""; + releaseRenderState_ = 0; } @java.lang.Override @@ -125,7 +126,7 @@ public com.google.protobuf.ByteString getMessageBytes() { * * *
-   * The name of the `Release`.
+   * The name of the release.
    * 
* * string release = 2; @@ -148,7 +149,7 @@ public java.lang.String getRelease() { * * *
-   * The name of the `Release`.
+   * The name of the release.
    * 
* * string release = 2; @@ -168,6 +169,41 @@ public com.google.protobuf.ByteString getReleaseBytes() { } } + public static final int RELEASE_RENDER_STATE_FIELD_NUMBER = 3; + private int releaseRenderState_ = 0; + /** + * + * + *
+   * The state of the release render.
+   * 
+ * + * .google.cloud.deploy.v1.Release.RenderState release_render_state = 3; + * + * @return The enum numeric value on the wire for releaseRenderState. + */ + @java.lang.Override + public int getReleaseRenderStateValue() { + return releaseRenderState_; + } + /** + * + * + *
+   * The state of the release render.
+   * 
+ * + * .google.cloud.deploy.v1.Release.RenderState release_render_state = 3; + * + * @return The releaseRenderState. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Release.RenderState getReleaseRenderState() { + com.google.cloud.deploy.v1.Release.RenderState result = + com.google.cloud.deploy.v1.Release.RenderState.forNumber(releaseRenderState_); + return result == null ? com.google.cloud.deploy.v1.Release.RenderState.UNRECOGNIZED : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -188,6 +224,10 @@ 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_); } + if (releaseRenderState_ + != com.google.cloud.deploy.v1.Release.RenderState.RENDER_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, releaseRenderState_); + } getUnknownFields().writeTo(output); } @@ -203,6 +243,10 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(release_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, release_); } + if (releaseRenderState_ + != com.google.cloud.deploy.v1.Release.RenderState.RENDER_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, releaseRenderState_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -221,6 +265,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMessage().equals(other.getMessage())) return false; if (!getRelease().equals(other.getRelease())) return false; + if (releaseRenderState_ != other.releaseRenderState_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -236,6 +281,8 @@ public int hashCode() { hash = (53 * hash) + getMessage().hashCode(); hash = (37 * hash) + RELEASE_FIELD_NUMBER; hash = (53 * hash) + getRelease().hashCode(); + hash = (37 * hash) + RELEASE_RENDER_STATE_FIELD_NUMBER; + hash = (53 * hash) + releaseRenderState_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -378,6 +425,7 @@ public Builder clear() { bitField0_ = 0; message_ = ""; release_ = ""; + releaseRenderState_ = 0; return this; } @@ -420,6 +468,9 @@ private void buildPartial0(com.google.cloud.deploy.v1.ReleaseRenderEvent result) if (((from_bitField0_ & 0x00000002) != 0)) { result.release_ = release_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.releaseRenderState_ = releaseRenderState_; + } } @java.lang.Override @@ -477,6 +528,9 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.ReleaseRenderEvent other) { bitField0_ |= 0x00000002; onChanged(); } + if (other.releaseRenderState_ != 0) { + setReleaseRenderStateValue(other.getReleaseRenderStateValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -515,6 +569,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 24: + { + releaseRenderState_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -650,7 +710,7 @@ public Builder setMessageBytes(com.google.protobuf.ByteString value) { * * *
-     * The name of the `Release`.
+     * The name of the release.
      * 
* * string release = 2; @@ -672,7 +732,7 @@ public java.lang.String getRelease() { * * *
-     * The name of the `Release`.
+     * The name of the release.
      * 
* * string release = 2; @@ -694,7 +754,7 @@ public com.google.protobuf.ByteString getReleaseBytes() { * * *
-     * The name of the `Release`.
+     * The name of the release.
      * 
* * string release = 2; @@ -715,7 +775,7 @@ public Builder setRelease(java.lang.String value) { * * *
-     * The name of the `Release`.
+     * The name of the release.
      * 
* * string release = 2; @@ -732,7 +792,7 @@ public Builder clearRelease() { * * *
-     * The name of the `Release`.
+     * The name of the release.
      * 
* * string release = 2; @@ -751,6 +811,96 @@ public Builder setReleaseBytes(com.google.protobuf.ByteString value) { return this; } + private int releaseRenderState_ = 0; + /** + * + * + *
+     * The state of the release render.
+     * 
+ * + * .google.cloud.deploy.v1.Release.RenderState release_render_state = 3; + * + * @return The enum numeric value on the wire for releaseRenderState. + */ + @java.lang.Override + public int getReleaseRenderStateValue() { + return releaseRenderState_; + } + /** + * + * + *
+     * The state of the release render.
+     * 
+ * + * .google.cloud.deploy.v1.Release.RenderState release_render_state = 3; + * + * @param value The enum numeric value on the wire for releaseRenderState to set. + * @return This builder for chaining. + */ + public Builder setReleaseRenderStateValue(int value) { + releaseRenderState_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the release render.
+     * 
+ * + * .google.cloud.deploy.v1.Release.RenderState release_render_state = 3; + * + * @return The releaseRenderState. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Release.RenderState getReleaseRenderState() { + com.google.cloud.deploy.v1.Release.RenderState result = + com.google.cloud.deploy.v1.Release.RenderState.forNumber(releaseRenderState_); + return result == null ? com.google.cloud.deploy.v1.Release.RenderState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The state of the release render.
+     * 
+ * + * .google.cloud.deploy.v1.Release.RenderState release_render_state = 3; + * + * @param value The releaseRenderState to set. + * @return This builder for chaining. + */ + public Builder setReleaseRenderState(com.google.cloud.deploy.v1.Release.RenderState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + releaseRenderState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The state of the release render.
+     * 
+ * + * .google.cloud.deploy.v1.Release.RenderState release_render_state = 3; + * + * @return This builder for chaining. + */ + public Builder clearReleaseRenderState() { + bitField0_ = (bitField0_ & ~0x00000004); + releaseRenderState_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseRenderEventOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseRenderEventOrBuilder.java index e74bd0ce8ba1..489ff36facc3 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseRenderEventOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseRenderEventOrBuilder.java @@ -54,7 +54,7 @@ public interface ReleaseRenderEventOrBuilder * * *
-   * The name of the `Release`.
+   * The name of the release.
    * 
* * string release = 2; @@ -66,7 +66,7 @@ public interface ReleaseRenderEventOrBuilder * * *
-   * The name of the `Release`.
+   * The name of the release.
    * 
* * string release = 2; @@ -74,4 +74,29 @@ public interface ReleaseRenderEventOrBuilder * @return The bytes for release. */ com.google.protobuf.ByteString getReleaseBytes(); + + /** + * + * + *
+   * The state of the release render.
+   * 
+ * + * .google.cloud.deploy.v1.Release.RenderState release_render_state = 3; + * + * @return The enum numeric value on the wire for releaseRenderState. + */ + int getReleaseRenderStateValue(); + /** + * + * + *
+   * The state of the release render.
+   * 
+ * + * .google.cloud.deploy.v1.Release.RenderState release_render_state = 3; + * + * @return The releaseRenderState. + */ + com.google.cloud.deploy.v1.Release.RenderState getReleaseRenderState(); } diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseRenderPayloadProto.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseRenderPayloadProto.java index ba594759999c..1d4f7c4ecd9f 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseRenderPayloadProto.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/ReleaseRenderPayloadProto.java @@ -41,24 +41,31 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n3google/cloud/deploy/v1/release_render_" - + "payload.proto\022\026google.cloud.deploy.v1\"6\n" - + "\022ReleaseRenderEvent\022\017\n\007message\030\001 \001(\t\022\017\n\007" - + "release\030\002 \001(\tBm\n\032com.google.cloud.deploy" - + ".v1B\031ReleaseRenderPayloadProtoP\001Z2cloud." - + "google.com/go/deploy/apiv1/deploypb;depl" - + "oypbb\006proto3" + + "payload.proto\022\026google.cloud.deploy.v1\032)g" + + "oogle/cloud/deploy/v1/cloud_deploy.proto" + + "\"\201\001\n\022ReleaseRenderEvent\022\017\n\007message\030\001 \001(\t" + + "\022\017\n\007release\030\002 \001(\t\022I\n\024release_render_stat" + + "e\030\003 \001(\0162+.google.cloud.deploy.v1.Release" + + ".RenderStateBm\n\032com.google.cloud.deploy." + + "v1B\031ReleaseRenderPayloadProtoP\001Z2cloud.g" + + "oogle.com/go/deploy/apiv1/deploypb;deplo" + + "ypbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.deploy.v1.CloudDeployProto.getDescriptor(), + }); internal_static_google_cloud_deploy_v1_ReleaseRenderEvent_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_cloud_deploy_v1_ReleaseRenderEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_deploy_v1_ReleaseRenderEvent_descriptor, new java.lang.String[] { - "Message", "Release", + "Message", "Release", "ReleaseRenderState", }); + com.google.cloud.deploy.v1.CloudDeployProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairMode.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairMode.java new file mode 100644 index 000000000000..7686c06cd9ee --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairMode.java @@ -0,0 +1,1129 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * Configuration of the repair action.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RepairMode} + */ +public final class RepairMode extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.RepairMode) + RepairModeOrBuilder { + private static final long serialVersionUID = 0L; + // Use RepairMode.newBuilder() to construct. + private RepairMode(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RepairMode() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RepairMode(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RepairMode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RepairMode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RepairMode.class, + com.google.cloud.deploy.v1.RepairMode.Builder.class); + } + + private int modeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object mode_; + + public enum ModeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RETRY(1), + ROLLBACK(2), + MODE_NOT_SET(0); + private final int value; + + private ModeCase(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 ModeCase valueOf(int value) { + return forNumber(value); + } + + public static ModeCase forNumber(int value) { + switch (value) { + case 1: + return RETRY; + case 2: + return ROLLBACK; + case 0: + return MODE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ModeCase getModeCase() { + return ModeCase.forNumber(modeCase_); + } + + public static final int RETRY_FIELD_NUMBER = 1; + /** + * + * + *
+   * Optional. Retries a failed job.
+   * 
+ * + * .google.cloud.deploy.v1.Retry retry = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the retry field is set. + */ + @java.lang.Override + public boolean hasRetry() { + return modeCase_ == 1; + } + /** + * + * + *
+   * Optional. Retries a failed job.
+   * 
+ * + * .google.cloud.deploy.v1.Retry retry = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The retry. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Retry getRetry() { + if (modeCase_ == 1) { + return (com.google.cloud.deploy.v1.Retry) mode_; + } + return com.google.cloud.deploy.v1.Retry.getDefaultInstance(); + } + /** + * + * + *
+   * Optional. Retries a failed job.
+   * 
+ * + * .google.cloud.deploy.v1.Retry retry = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RetryOrBuilder getRetryOrBuilder() { + if (modeCase_ == 1) { + return (com.google.cloud.deploy.v1.Retry) mode_; + } + return com.google.cloud.deploy.v1.Retry.getDefaultInstance(); + } + + public static final int ROLLBACK_FIELD_NUMBER = 2; + /** + * + * + *
+   * Optional. Rolls back a `Rollout`.
+   * 
+ * + * .google.cloud.deploy.v1.Rollback rollback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rollback field is set. + */ + @java.lang.Override + public boolean hasRollback() { + return modeCase_ == 2; + } + /** + * + * + *
+   * Optional. Rolls back a `Rollout`.
+   * 
+ * + * .google.cloud.deploy.v1.Rollback rollback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rollback. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Rollback getRollback() { + if (modeCase_ == 2) { + return (com.google.cloud.deploy.v1.Rollback) mode_; + } + return com.google.cloud.deploy.v1.Rollback.getDefaultInstance(); + } + /** + * + * + *
+   * Optional. Rolls back a `Rollout`.
+   * 
+ * + * .google.cloud.deploy.v1.Rollback rollback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackOrBuilder getRollbackOrBuilder() { + if (modeCase_ == 2) { + return (com.google.cloud.deploy.v1.Rollback) mode_; + } + return com.google.cloud.deploy.v1.Rollback.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 (modeCase_ == 1) { + output.writeMessage(1, (com.google.cloud.deploy.v1.Retry) mode_); + } + if (modeCase_ == 2) { + output.writeMessage(2, (com.google.cloud.deploy.v1.Rollback) mode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (modeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.deploy.v1.Retry) mode_); + } + if (modeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.deploy.v1.Rollback) mode_); + } + 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.RepairMode)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.RepairMode other = (com.google.cloud.deploy.v1.RepairMode) obj; + + if (!getModeCase().equals(other.getModeCase())) return false; + switch (modeCase_) { + case 1: + if (!getRetry().equals(other.getRetry())) return false; + break; + case 2: + if (!getRollback().equals(other.getRollback())) 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 (modeCase_) { + case 1: + hash = (37 * hash) + RETRY_FIELD_NUMBER; + hash = (53 * hash) + getRetry().hashCode(); + break; + case 2: + hash = (37 * hash) + ROLLBACK_FIELD_NUMBER; + hash = (53 * hash) + getRollback().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.RepairMode parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RepairMode 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.RepairMode parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RepairMode 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.RepairMode parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RepairMode 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.RepairMode parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RepairMode 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.RepairMode parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RepairMode 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.RepairMode 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.RepairMode 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.RepairMode prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Configuration of the repair action.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RepairMode} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.RepairMode) + com.google.cloud.deploy.v1.RepairModeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RepairMode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RepairMode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RepairMode.class, + com.google.cloud.deploy.v1.RepairMode.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.RepairMode.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (retryBuilder_ != null) { + retryBuilder_.clear(); + } + if (rollbackBuilder_ != null) { + rollbackBuilder_.clear(); + } + modeCase_ = 0; + mode_ = 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_RepairMode_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RepairMode getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.RepairMode.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RepairMode build() { + com.google.cloud.deploy.v1.RepairMode result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RepairMode buildPartial() { + com.google.cloud.deploy.v1.RepairMode result = + new com.google.cloud.deploy.v1.RepairMode(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.RepairMode result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.deploy.v1.RepairMode result) { + result.modeCase_ = modeCase_; + result.mode_ = this.mode_; + if (modeCase_ == 1 && retryBuilder_ != null) { + result.mode_ = retryBuilder_.build(); + } + if (modeCase_ == 2 && rollbackBuilder_ != null) { + result.mode_ = rollbackBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.RepairMode) { + return mergeFrom((com.google.cloud.deploy.v1.RepairMode) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.RepairMode other) { + if (other == com.google.cloud.deploy.v1.RepairMode.getDefaultInstance()) return this; + switch (other.getModeCase()) { + case RETRY: + { + mergeRetry(other.getRetry()); + break; + } + case ROLLBACK: + { + mergeRollback(other.getRollback()); + break; + } + case MODE_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(getRetryFieldBuilder().getBuilder(), extensionRegistry); + modeCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getRollbackFieldBuilder().getBuilder(), extensionRegistry); + modeCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int modeCase_ = 0; + private java.lang.Object mode_; + + public ModeCase getModeCase() { + return ModeCase.forNumber(modeCase_); + } + + public Builder clearMode() { + modeCase_ = 0; + mode_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Retry, + com.google.cloud.deploy.v1.Retry.Builder, + com.google.cloud.deploy.v1.RetryOrBuilder> + retryBuilder_; + /** + * + * + *
+     * Optional. Retries a failed job.
+     * 
+ * + * .google.cloud.deploy.v1.Retry retry = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the retry field is set. + */ + @java.lang.Override + public boolean hasRetry() { + return modeCase_ == 1; + } + /** + * + * + *
+     * Optional. Retries a failed job.
+     * 
+ * + * .google.cloud.deploy.v1.Retry retry = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The retry. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Retry getRetry() { + if (retryBuilder_ == null) { + if (modeCase_ == 1) { + return (com.google.cloud.deploy.v1.Retry) mode_; + } + return com.google.cloud.deploy.v1.Retry.getDefaultInstance(); + } else { + if (modeCase_ == 1) { + return retryBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.Retry.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Retries a failed job.
+     * 
+ * + * .google.cloud.deploy.v1.Retry retry = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRetry(com.google.cloud.deploy.v1.Retry value) { + if (retryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mode_ = value; + onChanged(); + } else { + retryBuilder_.setMessage(value); + } + modeCase_ = 1; + return this; + } + /** + * + * + *
+     * Optional. Retries a failed job.
+     * 
+ * + * .google.cloud.deploy.v1.Retry retry = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRetry(com.google.cloud.deploy.v1.Retry.Builder builderForValue) { + if (retryBuilder_ == null) { + mode_ = builderForValue.build(); + onChanged(); + } else { + retryBuilder_.setMessage(builderForValue.build()); + } + modeCase_ = 1; + return this; + } + /** + * + * + *
+     * Optional. Retries a failed job.
+     * 
+ * + * .google.cloud.deploy.v1.Retry retry = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRetry(com.google.cloud.deploy.v1.Retry value) { + if (retryBuilder_ == null) { + if (modeCase_ == 1 && mode_ != com.google.cloud.deploy.v1.Retry.getDefaultInstance()) { + mode_ = + com.google.cloud.deploy.v1.Retry.newBuilder((com.google.cloud.deploy.v1.Retry) mode_) + .mergeFrom(value) + .buildPartial(); + } else { + mode_ = value; + } + onChanged(); + } else { + if (modeCase_ == 1) { + retryBuilder_.mergeFrom(value); + } else { + retryBuilder_.setMessage(value); + } + } + modeCase_ = 1; + return this; + } + /** + * + * + *
+     * Optional. Retries a failed job.
+     * 
+ * + * .google.cloud.deploy.v1.Retry retry = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRetry() { + if (retryBuilder_ == null) { + if (modeCase_ == 1) { + modeCase_ = 0; + mode_ = null; + onChanged(); + } + } else { + if (modeCase_ == 1) { + modeCase_ = 0; + mode_ = null; + } + retryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Retries a failed job.
+     * 
+ * + * .google.cloud.deploy.v1.Retry retry = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.deploy.v1.Retry.Builder getRetryBuilder() { + return getRetryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Retries a failed job.
+     * 
+ * + * .google.cloud.deploy.v1.Retry retry = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RetryOrBuilder getRetryOrBuilder() { + if ((modeCase_ == 1) && (retryBuilder_ != null)) { + return retryBuilder_.getMessageOrBuilder(); + } else { + if (modeCase_ == 1) { + return (com.google.cloud.deploy.v1.Retry) mode_; + } + return com.google.cloud.deploy.v1.Retry.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Retries a failed job.
+     * 
+ * + * .google.cloud.deploy.v1.Retry retry = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Retry, + com.google.cloud.deploy.v1.Retry.Builder, + com.google.cloud.deploy.v1.RetryOrBuilder> + getRetryFieldBuilder() { + if (retryBuilder_ == null) { + if (!(modeCase_ == 1)) { + mode_ = com.google.cloud.deploy.v1.Retry.getDefaultInstance(); + } + retryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Retry, + com.google.cloud.deploy.v1.Retry.Builder, + com.google.cloud.deploy.v1.RetryOrBuilder>( + (com.google.cloud.deploy.v1.Retry) mode_, getParentForChildren(), isClean()); + mode_ = null; + } + modeCase_ = 1; + onChanged(); + return retryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Rollback, + com.google.cloud.deploy.v1.Rollback.Builder, + com.google.cloud.deploy.v1.RollbackOrBuilder> + rollbackBuilder_; + /** + * + * + *
+     * Optional. Rolls back a `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.Rollback rollback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rollback field is set. + */ + @java.lang.Override + public boolean hasRollback() { + return modeCase_ == 2; + } + /** + * + * + *
+     * Optional. Rolls back a `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.Rollback rollback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rollback. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Rollback getRollback() { + if (rollbackBuilder_ == null) { + if (modeCase_ == 2) { + return (com.google.cloud.deploy.v1.Rollback) mode_; + } + return com.google.cloud.deploy.v1.Rollback.getDefaultInstance(); + } else { + if (modeCase_ == 2) { + return rollbackBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.Rollback.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Rolls back a `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.Rollback rollback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRollback(com.google.cloud.deploy.v1.Rollback value) { + if (rollbackBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mode_ = value; + onChanged(); + } else { + rollbackBuilder_.setMessage(value); + } + modeCase_ = 2; + return this; + } + /** + * + * + *
+     * Optional. Rolls back a `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.Rollback rollback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRollback(com.google.cloud.deploy.v1.Rollback.Builder builderForValue) { + if (rollbackBuilder_ == null) { + mode_ = builderForValue.build(); + onChanged(); + } else { + rollbackBuilder_.setMessage(builderForValue.build()); + } + modeCase_ = 2; + return this; + } + /** + * + * + *
+     * Optional. Rolls back a `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.Rollback rollback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRollback(com.google.cloud.deploy.v1.Rollback value) { + if (rollbackBuilder_ == null) { + if (modeCase_ == 2 && mode_ != com.google.cloud.deploy.v1.Rollback.getDefaultInstance()) { + mode_ = + com.google.cloud.deploy.v1.Rollback.newBuilder( + (com.google.cloud.deploy.v1.Rollback) mode_) + .mergeFrom(value) + .buildPartial(); + } else { + mode_ = value; + } + onChanged(); + } else { + if (modeCase_ == 2) { + rollbackBuilder_.mergeFrom(value); + } else { + rollbackBuilder_.setMessage(value); + } + } + modeCase_ = 2; + return this; + } + /** + * + * + *
+     * Optional. Rolls back a `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.Rollback rollback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRollback() { + if (rollbackBuilder_ == null) { + if (modeCase_ == 2) { + modeCase_ = 0; + mode_ = null; + onChanged(); + } + } else { + if (modeCase_ == 2) { + modeCase_ = 0; + mode_ = null; + } + rollbackBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Rolls back a `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.Rollback rollback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.deploy.v1.Rollback.Builder getRollbackBuilder() { + return getRollbackFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Rolls back a `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.Rollback rollback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackOrBuilder getRollbackOrBuilder() { + if ((modeCase_ == 2) && (rollbackBuilder_ != null)) { + return rollbackBuilder_.getMessageOrBuilder(); + } else { + if (modeCase_ == 2) { + return (com.google.cloud.deploy.v1.Rollback) mode_; + } + return com.google.cloud.deploy.v1.Rollback.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Rolls back a `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.Rollback rollback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Rollback, + com.google.cloud.deploy.v1.Rollback.Builder, + com.google.cloud.deploy.v1.RollbackOrBuilder> + getRollbackFieldBuilder() { + if (rollbackBuilder_ == null) { + if (!(modeCase_ == 2)) { + mode_ = com.google.cloud.deploy.v1.Rollback.getDefaultInstance(); + } + rollbackBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Rollback, + com.google.cloud.deploy.v1.Rollback.Builder, + com.google.cloud.deploy.v1.RollbackOrBuilder>( + (com.google.cloud.deploy.v1.Rollback) mode_, getParentForChildren(), isClean()); + mode_ = null; + } + modeCase_ = 2; + onChanged(); + return rollbackBuilder_; + } + + @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.RepairMode) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.RepairMode) + private static final com.google.cloud.deploy.v1.RepairMode DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.RepairMode(); + } + + public static com.google.cloud.deploy.v1.RepairMode getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RepairMode 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.RepairMode getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairModeOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairModeOrBuilder.java new file mode 100644 index 000000000000..f58c81d5859f --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairModeOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 RepairModeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.RepairMode) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Retries a failed job.
+   * 
+ * + * .google.cloud.deploy.v1.Retry retry = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the retry field is set. + */ + boolean hasRetry(); + /** + * + * + *
+   * Optional. Retries a failed job.
+   * 
+ * + * .google.cloud.deploy.v1.Retry retry = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The retry. + */ + com.google.cloud.deploy.v1.Retry getRetry(); + /** + * + * + *
+   * Optional. Retries a failed job.
+   * 
+ * + * .google.cloud.deploy.v1.Retry retry = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.cloud.deploy.v1.RetryOrBuilder getRetryOrBuilder(); + + /** + * + * + *
+   * Optional. Rolls back a `Rollout`.
+   * 
+ * + * .google.cloud.deploy.v1.Rollback rollback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rollback field is set. + */ + boolean hasRollback(); + /** + * + * + *
+   * Optional. Rolls back a `Rollout`.
+   * 
+ * + * .google.cloud.deploy.v1.Rollback rollback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rollback. + */ + com.google.cloud.deploy.v1.Rollback getRollback(); + /** + * + * + *
+   * Optional. Rolls back a `Rollout`.
+   * 
+ * + * .google.cloud.deploy.v1.Rollback rollback = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.deploy.v1.RollbackOrBuilder getRollbackOrBuilder(); + + com.google.cloud.deploy.v1.RepairMode.ModeCase getModeCase(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairPhase.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairPhase.java new file mode 100644 index 000000000000..9501e7f888b3 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairPhase.java @@ -0,0 +1,1157 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * RepairPhase tracks the repair attempts that have been made for
+ * each `RepairMode` specified in the `Automation` resource.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RepairPhase} + */ +public final class RepairPhase extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.RepairPhase) + RepairPhaseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RepairPhase.newBuilder() to construct. + private RepairPhase(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RepairPhase() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RepairPhase(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RepairPhase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RepairPhase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RepairPhase.class, + com.google.cloud.deploy.v1.RepairPhase.Builder.class); + } + + private int repairPhaseCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object repairPhase_; + + public enum RepairPhaseCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RETRY(1), + ROLLBACK(2), + REPAIRPHASE_NOT_SET(0); + private final int value; + + private RepairPhaseCase(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 RepairPhaseCase valueOf(int value) { + return forNumber(value); + } + + public static RepairPhaseCase forNumber(int value) { + switch (value) { + case 1: + return RETRY; + case 2: + return ROLLBACK; + case 0: + return REPAIRPHASE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RepairPhaseCase getRepairPhaseCase() { + return RepairPhaseCase.forNumber(repairPhaseCase_); + } + + public static final int RETRY_FIELD_NUMBER = 1; + /** + * + * + *
+   * Output only. Records of the retry attempts for retry repair mode.
+   * 
+ * + * + * .google.cloud.deploy.v1.RetryPhase retry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the retry field is set. + */ + @java.lang.Override + public boolean hasRetry() { + return repairPhaseCase_ == 1; + } + /** + * + * + *
+   * Output only. Records of the retry attempts for retry repair mode.
+   * 
+ * + * + * .google.cloud.deploy.v1.RetryPhase retry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The retry. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RetryPhase getRetry() { + if (repairPhaseCase_ == 1) { + return (com.google.cloud.deploy.v1.RetryPhase) repairPhase_; + } + return com.google.cloud.deploy.v1.RetryPhase.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. Records of the retry attempts for retry repair mode.
+   * 
+ * + * + * .google.cloud.deploy.v1.RetryPhase retry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RetryPhaseOrBuilder getRetryOrBuilder() { + if (repairPhaseCase_ == 1) { + return (com.google.cloud.deploy.v1.RetryPhase) repairPhase_; + } + return com.google.cloud.deploy.v1.RetryPhase.getDefaultInstance(); + } + + public static final int ROLLBACK_FIELD_NUMBER = 2; + /** + * + * + *
+   * Output only. Rollback attempt for rollback repair mode .
+   * 
+ * + * + * .google.cloud.deploy.v1.RollbackAttempt rollback = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the rollback field is set. + */ + @java.lang.Override + public boolean hasRollback() { + return repairPhaseCase_ == 2; + } + /** + * + * + *
+   * Output only. Rollback attempt for rollback repair mode .
+   * 
+ * + * + * .google.cloud.deploy.v1.RollbackAttempt rollback = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The rollback. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackAttempt getRollback() { + if (repairPhaseCase_ == 2) { + return (com.google.cloud.deploy.v1.RollbackAttempt) repairPhase_; + } + return com.google.cloud.deploy.v1.RollbackAttempt.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. Rollback attempt for rollback repair mode .
+   * 
+ * + * + * .google.cloud.deploy.v1.RollbackAttempt rollback = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackAttemptOrBuilder getRollbackOrBuilder() { + if (repairPhaseCase_ == 2) { + return (com.google.cloud.deploy.v1.RollbackAttempt) repairPhase_; + } + return com.google.cloud.deploy.v1.RollbackAttempt.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 (repairPhaseCase_ == 1) { + output.writeMessage(1, (com.google.cloud.deploy.v1.RetryPhase) repairPhase_); + } + if (repairPhaseCase_ == 2) { + output.writeMessage(2, (com.google.cloud.deploy.v1.RollbackAttempt) repairPhase_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (repairPhaseCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.deploy.v1.RetryPhase) repairPhase_); + } + if (repairPhaseCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.deploy.v1.RollbackAttempt) repairPhase_); + } + 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.RepairPhase)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.RepairPhase other = (com.google.cloud.deploy.v1.RepairPhase) obj; + + if (!getRepairPhaseCase().equals(other.getRepairPhaseCase())) return false; + switch (repairPhaseCase_) { + case 1: + if (!getRetry().equals(other.getRetry())) return false; + break; + case 2: + if (!getRollback().equals(other.getRollback())) 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 (repairPhaseCase_) { + case 1: + hash = (37 * hash) + RETRY_FIELD_NUMBER; + hash = (53 * hash) + getRetry().hashCode(); + break; + case 2: + hash = (37 * hash) + ROLLBACK_FIELD_NUMBER; + hash = (53 * hash) + getRollback().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.RepairPhase parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RepairPhase 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.RepairPhase parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RepairPhase 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.RepairPhase parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RepairPhase 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.RepairPhase parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RepairPhase 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.RepairPhase parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RepairPhase 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.RepairPhase 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.RepairPhase 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.RepairPhase 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; + } + /** + * + * + *
+   * RepairPhase tracks the repair attempts that have been made for
+   * each `RepairMode` specified in the `Automation` resource.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RepairPhase} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.RepairPhase) + com.google.cloud.deploy.v1.RepairPhaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RepairPhase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RepairPhase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RepairPhase.class, + com.google.cloud.deploy.v1.RepairPhase.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.RepairPhase.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (retryBuilder_ != null) { + retryBuilder_.clear(); + } + if (rollbackBuilder_ != null) { + rollbackBuilder_.clear(); + } + repairPhaseCase_ = 0; + repairPhase_ = 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_RepairPhase_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RepairPhase getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.RepairPhase.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RepairPhase build() { + com.google.cloud.deploy.v1.RepairPhase result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RepairPhase buildPartial() { + com.google.cloud.deploy.v1.RepairPhase result = + new com.google.cloud.deploy.v1.RepairPhase(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.RepairPhase result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.deploy.v1.RepairPhase result) { + result.repairPhaseCase_ = repairPhaseCase_; + result.repairPhase_ = this.repairPhase_; + if (repairPhaseCase_ == 1 && retryBuilder_ != null) { + result.repairPhase_ = retryBuilder_.build(); + } + if (repairPhaseCase_ == 2 && rollbackBuilder_ != null) { + result.repairPhase_ = rollbackBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.RepairPhase) { + return mergeFrom((com.google.cloud.deploy.v1.RepairPhase) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.RepairPhase other) { + if (other == com.google.cloud.deploy.v1.RepairPhase.getDefaultInstance()) return this; + switch (other.getRepairPhaseCase()) { + case RETRY: + { + mergeRetry(other.getRetry()); + break; + } + case ROLLBACK: + { + mergeRollback(other.getRollback()); + break; + } + case REPAIRPHASE_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(getRetryFieldBuilder().getBuilder(), extensionRegistry); + repairPhaseCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getRollbackFieldBuilder().getBuilder(), extensionRegistry); + repairPhaseCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int repairPhaseCase_ = 0; + private java.lang.Object repairPhase_; + + public RepairPhaseCase getRepairPhaseCase() { + return RepairPhaseCase.forNumber(repairPhaseCase_); + } + + public Builder clearRepairPhase() { + repairPhaseCase_ = 0; + repairPhase_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.RetryPhase, + com.google.cloud.deploy.v1.RetryPhase.Builder, + com.google.cloud.deploy.v1.RetryPhaseOrBuilder> + retryBuilder_; + /** + * + * + *
+     * Output only. Records of the retry attempts for retry repair mode.
+     * 
+ * + * + * .google.cloud.deploy.v1.RetryPhase retry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the retry field is set. + */ + @java.lang.Override + public boolean hasRetry() { + return repairPhaseCase_ == 1; + } + /** + * + * + *
+     * Output only. Records of the retry attempts for retry repair mode.
+     * 
+ * + * + * .google.cloud.deploy.v1.RetryPhase retry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The retry. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RetryPhase getRetry() { + if (retryBuilder_ == null) { + if (repairPhaseCase_ == 1) { + return (com.google.cloud.deploy.v1.RetryPhase) repairPhase_; + } + return com.google.cloud.deploy.v1.RetryPhase.getDefaultInstance(); + } else { + if (repairPhaseCase_ == 1) { + return retryBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.RetryPhase.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Records of the retry attempts for retry repair mode.
+     * 
+ * + * + * .google.cloud.deploy.v1.RetryPhase retry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRetry(com.google.cloud.deploy.v1.RetryPhase value) { + if (retryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + repairPhase_ = value; + onChanged(); + } else { + retryBuilder_.setMessage(value); + } + repairPhaseCase_ = 1; + return this; + } + /** + * + * + *
+     * Output only. Records of the retry attempts for retry repair mode.
+     * 
+ * + * + * .google.cloud.deploy.v1.RetryPhase retry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRetry(com.google.cloud.deploy.v1.RetryPhase.Builder builderForValue) { + if (retryBuilder_ == null) { + repairPhase_ = builderForValue.build(); + onChanged(); + } else { + retryBuilder_.setMessage(builderForValue.build()); + } + repairPhaseCase_ = 1; + return this; + } + /** + * + * + *
+     * Output only. Records of the retry attempts for retry repair mode.
+     * 
+ * + * + * .google.cloud.deploy.v1.RetryPhase retry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeRetry(com.google.cloud.deploy.v1.RetryPhase value) { + if (retryBuilder_ == null) { + if (repairPhaseCase_ == 1 + && repairPhase_ != com.google.cloud.deploy.v1.RetryPhase.getDefaultInstance()) { + repairPhase_ = + com.google.cloud.deploy.v1.RetryPhase.newBuilder( + (com.google.cloud.deploy.v1.RetryPhase) repairPhase_) + .mergeFrom(value) + .buildPartial(); + } else { + repairPhase_ = value; + } + onChanged(); + } else { + if (repairPhaseCase_ == 1) { + retryBuilder_.mergeFrom(value); + } else { + retryBuilder_.setMessage(value); + } + } + repairPhaseCase_ = 1; + return this; + } + /** + * + * + *
+     * Output only. Records of the retry attempts for retry repair mode.
+     * 
+ * + * + * .google.cloud.deploy.v1.RetryPhase retry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRetry() { + if (retryBuilder_ == null) { + if (repairPhaseCase_ == 1) { + repairPhaseCase_ = 0; + repairPhase_ = null; + onChanged(); + } + } else { + if (repairPhaseCase_ == 1) { + repairPhaseCase_ = 0; + repairPhase_ = null; + } + retryBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Records of the retry attempts for retry repair mode.
+     * 
+ * + * + * .google.cloud.deploy.v1.RetryPhase retry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.RetryPhase.Builder getRetryBuilder() { + return getRetryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Records of the retry attempts for retry repair mode.
+     * 
+ * + * + * .google.cloud.deploy.v1.RetryPhase retry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RetryPhaseOrBuilder getRetryOrBuilder() { + if ((repairPhaseCase_ == 1) && (retryBuilder_ != null)) { + return retryBuilder_.getMessageOrBuilder(); + } else { + if (repairPhaseCase_ == 1) { + return (com.google.cloud.deploy.v1.RetryPhase) repairPhase_; + } + return com.google.cloud.deploy.v1.RetryPhase.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Records of the retry attempts for retry repair mode.
+     * 
+ * + * + * .google.cloud.deploy.v1.RetryPhase retry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.RetryPhase, + com.google.cloud.deploy.v1.RetryPhase.Builder, + com.google.cloud.deploy.v1.RetryPhaseOrBuilder> + getRetryFieldBuilder() { + if (retryBuilder_ == null) { + if (!(repairPhaseCase_ == 1)) { + repairPhase_ = com.google.cloud.deploy.v1.RetryPhase.getDefaultInstance(); + } + retryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.RetryPhase, + com.google.cloud.deploy.v1.RetryPhase.Builder, + com.google.cloud.deploy.v1.RetryPhaseOrBuilder>( + (com.google.cloud.deploy.v1.RetryPhase) repairPhase_, + getParentForChildren(), + isClean()); + repairPhase_ = null; + } + repairPhaseCase_ = 1; + onChanged(); + return retryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.RollbackAttempt, + com.google.cloud.deploy.v1.RollbackAttempt.Builder, + com.google.cloud.deploy.v1.RollbackAttemptOrBuilder> + rollbackBuilder_; + /** + * + * + *
+     * Output only. Rollback attempt for rollback repair mode .
+     * 
+ * + * + * .google.cloud.deploy.v1.RollbackAttempt rollback = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the rollback field is set. + */ + @java.lang.Override + public boolean hasRollback() { + return repairPhaseCase_ == 2; + } + /** + * + * + *
+     * Output only. Rollback attempt for rollback repair mode .
+     * 
+ * + * + * .google.cloud.deploy.v1.RollbackAttempt rollback = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The rollback. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackAttempt getRollback() { + if (rollbackBuilder_ == null) { + if (repairPhaseCase_ == 2) { + return (com.google.cloud.deploy.v1.RollbackAttempt) repairPhase_; + } + return com.google.cloud.deploy.v1.RollbackAttempt.getDefaultInstance(); + } else { + if (repairPhaseCase_ == 2) { + return rollbackBuilder_.getMessage(); + } + return com.google.cloud.deploy.v1.RollbackAttempt.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Rollback attempt for rollback repair mode .
+     * 
+ * + * + * .google.cloud.deploy.v1.RollbackAttempt rollback = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRollback(com.google.cloud.deploy.v1.RollbackAttempt value) { + if (rollbackBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + repairPhase_ = value; + onChanged(); + } else { + rollbackBuilder_.setMessage(value); + } + repairPhaseCase_ = 2; + return this; + } + /** + * + * + *
+     * Output only. Rollback attempt for rollback repair mode .
+     * 
+ * + * + * .google.cloud.deploy.v1.RollbackAttempt rollback = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRollback(com.google.cloud.deploy.v1.RollbackAttempt.Builder builderForValue) { + if (rollbackBuilder_ == null) { + repairPhase_ = builderForValue.build(); + onChanged(); + } else { + rollbackBuilder_.setMessage(builderForValue.build()); + } + repairPhaseCase_ = 2; + return this; + } + /** + * + * + *
+     * Output only. Rollback attempt for rollback repair mode .
+     * 
+ * + * + * .google.cloud.deploy.v1.RollbackAttempt rollback = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeRollback(com.google.cloud.deploy.v1.RollbackAttempt value) { + if (rollbackBuilder_ == null) { + if (repairPhaseCase_ == 2 + && repairPhase_ != com.google.cloud.deploy.v1.RollbackAttempt.getDefaultInstance()) { + repairPhase_ = + com.google.cloud.deploy.v1.RollbackAttempt.newBuilder( + (com.google.cloud.deploy.v1.RollbackAttempt) repairPhase_) + .mergeFrom(value) + .buildPartial(); + } else { + repairPhase_ = value; + } + onChanged(); + } else { + if (repairPhaseCase_ == 2) { + rollbackBuilder_.mergeFrom(value); + } else { + rollbackBuilder_.setMessage(value); + } + } + repairPhaseCase_ = 2; + return this; + } + /** + * + * + *
+     * Output only. Rollback attempt for rollback repair mode .
+     * 
+ * + * + * .google.cloud.deploy.v1.RollbackAttempt rollback = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRollback() { + if (rollbackBuilder_ == null) { + if (repairPhaseCase_ == 2) { + repairPhaseCase_ = 0; + repairPhase_ = null; + onChanged(); + } + } else { + if (repairPhaseCase_ == 2) { + repairPhaseCase_ = 0; + repairPhase_ = null; + } + rollbackBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Rollback attempt for rollback repair mode .
+     * 
+ * + * + * .google.cloud.deploy.v1.RollbackAttempt rollback = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.RollbackAttempt.Builder getRollbackBuilder() { + return getRollbackFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Rollback attempt for rollback repair mode .
+     * 
+ * + * + * .google.cloud.deploy.v1.RollbackAttempt rollback = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackAttemptOrBuilder getRollbackOrBuilder() { + if ((repairPhaseCase_ == 2) && (rollbackBuilder_ != null)) { + return rollbackBuilder_.getMessageOrBuilder(); + } else { + if (repairPhaseCase_ == 2) { + return (com.google.cloud.deploy.v1.RollbackAttempt) repairPhase_; + } + return com.google.cloud.deploy.v1.RollbackAttempt.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. Rollback attempt for rollback repair mode .
+     * 
+ * + * + * .google.cloud.deploy.v1.RollbackAttempt rollback = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.RollbackAttempt, + com.google.cloud.deploy.v1.RollbackAttempt.Builder, + com.google.cloud.deploy.v1.RollbackAttemptOrBuilder> + getRollbackFieldBuilder() { + if (rollbackBuilder_ == null) { + if (!(repairPhaseCase_ == 2)) { + repairPhase_ = com.google.cloud.deploy.v1.RollbackAttempt.getDefaultInstance(); + } + rollbackBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.RollbackAttempt, + com.google.cloud.deploy.v1.RollbackAttempt.Builder, + com.google.cloud.deploy.v1.RollbackAttemptOrBuilder>( + (com.google.cloud.deploy.v1.RollbackAttempt) repairPhase_, + getParentForChildren(), + isClean()); + repairPhase_ = null; + } + repairPhaseCase_ = 2; + onChanged(); + return rollbackBuilder_; + } + + @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.RepairPhase) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.RepairPhase) + private static final com.google.cloud.deploy.v1.RepairPhase DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.RepairPhase(); + } + + public static com.google.cloud.deploy.v1.RepairPhase getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RepairPhase 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.RepairPhase getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairPhaseOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairPhaseOrBuilder.java new file mode 100644 index 000000000000..9c53bb8ddac7 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairPhaseOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 RepairPhaseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.RepairPhase) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Records of the retry attempts for retry repair mode.
+   * 
+ * + * + * .google.cloud.deploy.v1.RetryPhase retry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the retry field is set. + */ + boolean hasRetry(); + /** + * + * + *
+   * Output only. Records of the retry attempts for retry repair mode.
+   * 
+ * + * + * .google.cloud.deploy.v1.RetryPhase retry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The retry. + */ + com.google.cloud.deploy.v1.RetryPhase getRetry(); + /** + * + * + *
+   * Output only. Records of the retry attempts for retry repair mode.
+   * 
+ * + * + * .google.cloud.deploy.v1.RetryPhase retry = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.RetryPhaseOrBuilder getRetryOrBuilder(); + + /** + * + * + *
+   * Output only. Rollback attempt for rollback repair mode .
+   * 
+ * + * + * .google.cloud.deploy.v1.RollbackAttempt rollback = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the rollback field is set. + */ + boolean hasRollback(); + /** + * + * + *
+   * Output only. Rollback attempt for rollback repair mode .
+   * 
+ * + * + * .google.cloud.deploy.v1.RollbackAttempt rollback = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The rollback. + */ + com.google.cloud.deploy.v1.RollbackAttempt getRollback(); + /** + * + * + *
+   * Output only. Rollback attempt for rollback repair mode .
+   * 
+ * + * + * .google.cloud.deploy.v1.RollbackAttempt rollback = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.RollbackAttemptOrBuilder getRollbackOrBuilder(); + + com.google.cloud.deploy.v1.RepairPhase.RepairPhaseCase getRepairPhaseCase(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairRolloutOperation.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairRolloutOperation.java new file mode 100644 index 000000000000..c6b41de5f5f4 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairRolloutOperation.java @@ -0,0 +1,1283 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * Contains the information for an automated `repair rollout` operation.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RepairRolloutOperation} + */ +public final class RepairRolloutOperation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.RepairRolloutOperation) + RepairRolloutOperationOrBuilder { + private static final long serialVersionUID = 0L; + // Use RepairRolloutOperation.newBuilder() to construct. + private RepairRolloutOperation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RepairRolloutOperation() { + rollout_ = ""; + repairPhases_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RepairRolloutOperation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RepairRolloutOperation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RepairRolloutOperation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RepairRolloutOperation.class, + com.google.cloud.deploy.v1.RepairRolloutOperation.Builder.class); + } + + public static final int ROLLOUT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object rollout_ = ""; + /** + * + * + *
+   * Output only. The name of the rollout that initiates the `AutomationRun`.
+   * 
+ * + * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+   * Output only. The name of the rollout that initiates the `AutomationRun`.
+   * 
+ * + * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 CURRENT_REPAIR_MODE_INDEX_FIELD_NUMBER = 2; + private long currentRepairModeIndex_ = 0L; + /** + * + * + *
+   * Output only. The index of the current repair action in the repair sequence.
+   * 
+ * + * int64 current_repair_mode_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The currentRepairModeIndex. + */ + @java.lang.Override + public long getCurrentRepairModeIndex() { + return currentRepairModeIndex_; + } + + public static final int REPAIR_PHASES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List repairPhases_; + /** + * + * + *
+   * Output only. Records of the repair attempts. Each repair phase may have
+   * multiple retry attempts or single rollback attempt.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getRepairPhasesList() { + return repairPhases_; + } + /** + * + * + *
+   * Output only. Records of the repair attempts. Each repair phase may have
+   * multiple retry attempts or single rollback attempt.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getRepairPhasesOrBuilderList() { + return repairPhases_; + } + /** + * + * + *
+   * Output only. Records of the repair attempts. Each repair phase may have
+   * multiple retry attempts or single rollback attempt.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getRepairPhasesCount() { + return repairPhases_.size(); + } + /** + * + * + *
+   * Output only. Records of the repair attempts. Each repair phase may have
+   * multiple retry attempts or single rollback attempt.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RepairPhase getRepairPhases(int index) { + return repairPhases_.get(index); + } + /** + * + * + *
+   * Output only. Records of the repair attempts. Each repair phase may have
+   * multiple retry attempts or single rollback attempt.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RepairPhaseOrBuilder getRepairPhasesOrBuilder(int index) { + return repairPhases_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rollout_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, rollout_); + } + if (currentRepairModeIndex_ != 0L) { + output.writeInt64(2, currentRepairModeIndex_); + } + for (int i = 0; i < repairPhases_.size(); i++) { + output.writeMessage(3, repairPhases_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rollout_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, rollout_); + } + if (currentRepairModeIndex_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, currentRepairModeIndex_); + } + for (int i = 0; i < repairPhases_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, repairPhases_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.RepairRolloutOperation)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.RepairRolloutOperation other = + (com.google.cloud.deploy.v1.RepairRolloutOperation) obj; + + if (!getRollout().equals(other.getRollout())) return false; + if (getCurrentRepairModeIndex() != other.getCurrentRepairModeIndex()) return false; + if (!getRepairPhasesList().equals(other.getRepairPhasesList())) 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) + CURRENT_REPAIR_MODE_INDEX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCurrentRepairModeIndex()); + if (getRepairPhasesCount() > 0) { + hash = (37 * hash) + REPAIR_PHASES_FIELD_NUMBER; + hash = (53 * hash) + getRepairPhasesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.RepairRolloutOperation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RepairRolloutOperation 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.RepairRolloutOperation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RepairRolloutOperation 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.RepairRolloutOperation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RepairRolloutOperation 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.RepairRolloutOperation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RepairRolloutOperation 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.RepairRolloutOperation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RepairRolloutOperation 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.RepairRolloutOperation 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.RepairRolloutOperation 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.RepairRolloutOperation 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; + } + /** + * + * + *
+   * Contains the information for an automated `repair rollout` operation.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RepairRolloutOperation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.RepairRolloutOperation) + com.google.cloud.deploy.v1.RepairRolloutOperationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RepairRolloutOperation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RepairRolloutOperation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RepairRolloutOperation.class, + com.google.cloud.deploy.v1.RepairRolloutOperation.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.RepairRolloutOperation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rollout_ = ""; + currentRepairModeIndex_ = 0L; + if (repairPhasesBuilder_ == null) { + repairPhases_ = java.util.Collections.emptyList(); + } else { + repairPhases_ = null; + repairPhasesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + 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_RepairRolloutOperation_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RepairRolloutOperation getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.RepairRolloutOperation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RepairRolloutOperation build() { + com.google.cloud.deploy.v1.RepairRolloutOperation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RepairRolloutOperation buildPartial() { + com.google.cloud.deploy.v1.RepairRolloutOperation result = + new com.google.cloud.deploy.v1.RepairRolloutOperation(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.deploy.v1.RepairRolloutOperation result) { + if (repairPhasesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + repairPhases_ = java.util.Collections.unmodifiableList(repairPhases_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.repairPhases_ = repairPhases_; + } else { + result.repairPhases_ = repairPhasesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.deploy.v1.RepairRolloutOperation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rollout_ = rollout_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.currentRepairModeIndex_ = currentRepairModeIndex_; + } + } + + @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.RepairRolloutOperation) { + return mergeFrom((com.google.cloud.deploy.v1.RepairRolloutOperation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.RepairRolloutOperation other) { + if (other == com.google.cloud.deploy.v1.RepairRolloutOperation.getDefaultInstance()) + return this; + if (!other.getRollout().isEmpty()) { + rollout_ = other.rollout_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getCurrentRepairModeIndex() != 0L) { + setCurrentRepairModeIndex(other.getCurrentRepairModeIndex()); + } + if (repairPhasesBuilder_ == null) { + if (!other.repairPhases_.isEmpty()) { + if (repairPhases_.isEmpty()) { + repairPhases_ = other.repairPhases_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRepairPhasesIsMutable(); + repairPhases_.addAll(other.repairPhases_); + } + onChanged(); + } + } else { + if (!other.repairPhases_.isEmpty()) { + if (repairPhasesBuilder_.isEmpty()) { + repairPhasesBuilder_.dispose(); + repairPhasesBuilder_ = null; + repairPhases_ = other.repairPhases_; + bitField0_ = (bitField0_ & ~0x00000004); + repairPhasesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRepairPhasesFieldBuilder() + : null; + } else { + repairPhasesBuilder_.addAllMessages(other.repairPhases_); + } + } + } + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + currentRepairModeIndex_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + com.google.cloud.deploy.v1.RepairPhase m = + input.readMessage( + com.google.cloud.deploy.v1.RepairPhase.parser(), extensionRegistry); + if (repairPhasesBuilder_ == null) { + ensureRepairPhasesIsMutable(); + repairPhases_.add(m); + } else { + repairPhasesBuilder_.addMessage(m); + } + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object rollout_ = ""; + /** + * + * + *
+     * Output only. The name of the rollout that initiates the `AutomationRun`.
+     * 
+ * + * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The name of the rollout that initiates the `AutomationRun`.
+     * 
+ * + * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The name of the rollout that initiates the `AutomationRun`.
+     * 
+ * + * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the rollout that initiates the `AutomationRun`.
+     * 
+ * + * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRollout() { + rollout_ = getDefaultInstance().getRollout(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the rollout that initiates the `AutomationRun`.
+     * 
+ * + * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long currentRepairModeIndex_; + /** + * + * + *
+     * Output only. The index of the current repair action in the repair sequence.
+     * 
+ * + * int64 current_repair_mode_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The currentRepairModeIndex. + */ + @java.lang.Override + public long getCurrentRepairModeIndex() { + return currentRepairModeIndex_; + } + /** + * + * + *
+     * Output only. The index of the current repair action in the repair sequence.
+     * 
+ * + * int64 current_repair_mode_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The currentRepairModeIndex to set. + * @return This builder for chaining. + */ + public Builder setCurrentRepairModeIndex(long value) { + + currentRepairModeIndex_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The index of the current repair action in the repair sequence.
+     * 
+ * + * int64 current_repair_mode_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearCurrentRepairModeIndex() { + bitField0_ = (bitField0_ & ~0x00000002); + currentRepairModeIndex_ = 0L; + onChanged(); + return this; + } + + private java.util.List repairPhases_ = + java.util.Collections.emptyList(); + + private void ensureRepairPhasesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + repairPhases_ = + new java.util.ArrayList(repairPhases_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.RepairPhase, + com.google.cloud.deploy.v1.RepairPhase.Builder, + com.google.cloud.deploy.v1.RepairPhaseOrBuilder> + repairPhasesBuilder_; + + /** + * + * + *
+     * Output only. Records of the repair attempts. Each repair phase may have
+     * multiple retry attempts or single rollback attempt.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getRepairPhasesList() { + if (repairPhasesBuilder_ == null) { + return java.util.Collections.unmodifiableList(repairPhases_); + } else { + return repairPhasesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Records of the repair attempts. Each repair phase may have
+     * multiple retry attempts or single rollback attempt.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getRepairPhasesCount() { + if (repairPhasesBuilder_ == null) { + return repairPhases_.size(); + } else { + return repairPhasesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Records of the repair attempts. Each repair phase may have
+     * multiple retry attempts or single rollback attempt.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.RepairPhase getRepairPhases(int index) { + if (repairPhasesBuilder_ == null) { + return repairPhases_.get(index); + } else { + return repairPhasesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Records of the repair attempts. Each repair phase may have
+     * multiple retry attempts or single rollback attempt.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRepairPhases(int index, com.google.cloud.deploy.v1.RepairPhase value) { + if (repairPhasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRepairPhasesIsMutable(); + repairPhases_.set(index, value); + onChanged(); + } else { + repairPhasesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Records of the repair attempts. Each repair phase may have
+     * multiple retry attempts or single rollback attempt.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setRepairPhases( + int index, com.google.cloud.deploy.v1.RepairPhase.Builder builderForValue) { + if (repairPhasesBuilder_ == null) { + ensureRepairPhasesIsMutable(); + repairPhases_.set(index, builderForValue.build()); + onChanged(); + } else { + repairPhasesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Records of the repair attempts. Each repair phase may have
+     * multiple retry attempts or single rollback attempt.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRepairPhases(com.google.cloud.deploy.v1.RepairPhase value) { + if (repairPhasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRepairPhasesIsMutable(); + repairPhases_.add(value); + onChanged(); + } else { + repairPhasesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Records of the repair attempts. Each repair phase may have
+     * multiple retry attempts or single rollback attempt.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRepairPhases(int index, com.google.cloud.deploy.v1.RepairPhase value) { + if (repairPhasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRepairPhasesIsMutable(); + repairPhases_.add(index, value); + onChanged(); + } else { + repairPhasesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Records of the repair attempts. Each repair phase may have
+     * multiple retry attempts or single rollback attempt.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRepairPhases(com.google.cloud.deploy.v1.RepairPhase.Builder builderForValue) { + if (repairPhasesBuilder_ == null) { + ensureRepairPhasesIsMutable(); + repairPhases_.add(builderForValue.build()); + onChanged(); + } else { + repairPhasesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Records of the repair attempts. Each repair phase may have
+     * multiple retry attempts or single rollback attempt.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addRepairPhases( + int index, com.google.cloud.deploy.v1.RepairPhase.Builder builderForValue) { + if (repairPhasesBuilder_ == null) { + ensureRepairPhasesIsMutable(); + repairPhases_.add(index, builderForValue.build()); + onChanged(); + } else { + repairPhasesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Records of the repair attempts. Each repair phase may have
+     * multiple retry attempts or single rollback attempt.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllRepairPhases( + java.lang.Iterable values) { + if (repairPhasesBuilder_ == null) { + ensureRepairPhasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, repairPhases_); + onChanged(); + } else { + repairPhasesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Records of the repair attempts. Each repair phase may have
+     * multiple retry attempts or single rollback attempt.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearRepairPhases() { + if (repairPhasesBuilder_ == null) { + repairPhases_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + repairPhasesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Records of the repair attempts. Each repair phase may have
+     * multiple retry attempts or single rollback attempt.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeRepairPhases(int index) { + if (repairPhasesBuilder_ == null) { + ensureRepairPhasesIsMutable(); + repairPhases_.remove(index); + onChanged(); + } else { + repairPhasesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Records of the repair attempts. Each repair phase may have
+     * multiple retry attempts or single rollback attempt.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.RepairPhase.Builder getRepairPhasesBuilder(int index) { + return getRepairPhasesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Records of the repair attempts. Each repair phase may have
+     * multiple retry attempts or single rollback attempt.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.RepairPhaseOrBuilder getRepairPhasesOrBuilder(int index) { + if (repairPhasesBuilder_ == null) { + return repairPhases_.get(index); + } else { + return repairPhasesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Records of the repair attempts. Each repair phase may have
+     * multiple retry attempts or single rollback attempt.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getRepairPhasesOrBuilderList() { + if (repairPhasesBuilder_ != null) { + return repairPhasesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(repairPhases_); + } + } + /** + * + * + *
+     * Output only. Records of the repair attempts. Each repair phase may have
+     * multiple retry attempts or single rollback attempt.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.RepairPhase.Builder addRepairPhasesBuilder() { + return getRepairPhasesFieldBuilder() + .addBuilder(com.google.cloud.deploy.v1.RepairPhase.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Records of the repair attempts. Each repair phase may have
+     * multiple retry attempts or single rollback attempt.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.RepairPhase.Builder addRepairPhasesBuilder(int index) { + return getRepairPhasesFieldBuilder() + .addBuilder(index, com.google.cloud.deploy.v1.RepairPhase.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Records of the repair attempts. Each repair phase may have
+     * multiple retry attempts or single rollback attempt.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getRepairPhasesBuilderList() { + return getRepairPhasesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.RepairPhase, + com.google.cloud.deploy.v1.RepairPhase.Builder, + com.google.cloud.deploy.v1.RepairPhaseOrBuilder> + getRepairPhasesFieldBuilder() { + if (repairPhasesBuilder_ == null) { + repairPhasesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.RepairPhase, + com.google.cloud.deploy.v1.RepairPhase.Builder, + com.google.cloud.deploy.v1.RepairPhaseOrBuilder>( + repairPhases_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + repairPhases_ = null; + } + return repairPhasesBuilder_; + } + + @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.RepairRolloutOperation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.RepairRolloutOperation) + private static final com.google.cloud.deploy.v1.RepairRolloutOperation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.RepairRolloutOperation(); + } + + public static com.google.cloud.deploy.v1.RepairRolloutOperation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RepairRolloutOperation 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.RepairRolloutOperation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairRolloutOperationOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairRolloutOperationOrBuilder.java new file mode 100644 index 000000000000..d1f405efcb69 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairRolloutOperationOrBuilder.java @@ -0,0 +1,130 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 RepairRolloutOperationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.RepairRolloutOperation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The name of the rollout that initiates the `AutomationRun`.
+   * 
+ * + * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The rollout. + */ + java.lang.String getRollout(); + /** + * + * + *
+   * Output only. The name of the rollout that initiates the `AutomationRun`.
+   * 
+ * + * string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for rollout. + */ + com.google.protobuf.ByteString getRolloutBytes(); + + /** + * + * + *
+   * Output only. The index of the current repair action in the repair sequence.
+   * 
+ * + * int64 current_repair_mode_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The currentRepairModeIndex. + */ + long getCurrentRepairModeIndex(); + + /** + * + * + *
+   * Output only. Records of the repair attempts. Each repair phase may have
+   * multiple retry attempts or single rollback attempt.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getRepairPhasesList(); + /** + * + * + *
+   * Output only. Records of the repair attempts. Each repair phase may have
+   * multiple retry attempts or single rollback attempt.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.RepairPhase getRepairPhases(int index); + /** + * + * + *
+   * Output only. Records of the repair attempts. Each repair phase may have
+   * multiple retry attempts or single rollback attempt.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getRepairPhasesCount(); + /** + * + * + *
+   * Output only. Records of the repair attempts. Each repair phase may have
+   * multiple retry attempts or single rollback attempt.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getRepairPhasesOrBuilderList(); + /** + * + * + *
+   * Output only. Records of the repair attempts. Each repair phase may have
+   * multiple retry attempts or single rollback attempt.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairPhase repair_phases = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.RepairPhaseOrBuilder getRepairPhasesOrBuilder(int index); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairRolloutRule.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairRolloutRule.java new file mode 100644 index 000000000000..d565ff25fcf9 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairRolloutRule.java @@ -0,0 +1,2157 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 `RepairRolloutRule` automation rule will automatically repair a failed
+ * `Rollout`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RepairRolloutRule} + */ +public final class RepairRolloutRule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.RepairRolloutRule) + RepairRolloutRuleOrBuilder { + private static final long serialVersionUID = 0L; + // Use RepairRolloutRule.newBuilder() to construct. + private RepairRolloutRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RepairRolloutRule() { + id_ = ""; + sourcePhases_ = com.google.protobuf.LazyStringArrayList.emptyList(); + jobs_ = com.google.protobuf.LazyStringArrayList.emptyList(); + repairModes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RepairRolloutRule(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RepairRolloutRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RepairRolloutRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RepairRolloutRule.class, + com.google.cloud.deploy.v1.RepairRolloutRule.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+   * Required. ID of the rule. This id must be unique in the `Automation`
+   * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. ID of the rule. This id must be unique in the `Automation`
+   * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 SOURCE_PHASES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList sourcePhases_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. Phases within which jobs are subject to automatic repair actions
+   * on failure. Proceeds only after phase name matched any one in the list, or
+   * for all phases if unspecified. This value must consist of lower-case
+   * letters, numbers, and hyphens, start with a letter and end with a letter or
+   * a number, and have a max length of 63 characters. In other words, it must
+   * match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string source_phases = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the sourcePhases. + */ + public com.google.protobuf.ProtocolStringList getSourcePhasesList() { + return sourcePhases_; + } + /** + * + * + *
+   * Optional. Phases within which jobs are subject to automatic repair actions
+   * on failure. Proceeds only after phase name matched any one in the list, or
+   * for all phases if unspecified. This value must consist of lower-case
+   * letters, numbers, and hyphens, start with a letter and end with a letter or
+   * a number, and have a max length of 63 characters. In other words, it must
+   * match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string source_phases = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of sourcePhases. + */ + public int getSourcePhasesCount() { + return sourcePhases_.size(); + } + /** + * + * + *
+   * Optional. Phases within which jobs are subject to automatic repair actions
+   * on failure. Proceeds only after phase name matched any one in the list, or
+   * for all phases if unspecified. This value must consist of lower-case
+   * letters, numbers, and hyphens, start with a letter and end with a letter or
+   * a number, and have a max length of 63 characters. In other words, it must
+   * match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string source_phases = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The sourcePhases at the given index. + */ + public java.lang.String getSourcePhases(int index) { + return sourcePhases_.get(index); + } + /** + * + * + *
+   * Optional. Phases within which jobs are subject to automatic repair actions
+   * on failure. Proceeds only after phase name matched any one in the list, or
+   * for all phases if unspecified. This value must consist of lower-case
+   * letters, numbers, and hyphens, start with a letter and end with a letter or
+   * a number, and have a max length of 63 characters. In other words, it must
+   * match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string source_phases = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the sourcePhases at the given index. + */ + public com.google.protobuf.ByteString getSourcePhasesBytes(int index) { + return sourcePhases_.getByteString(index); + } + + public static final int JOBS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList jobs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. Jobs to repair. Proceeds only after job name matched any one in
+   * the list, or for all jobs if unspecified or empty. The phase that includes
+   * the job must match the phase ID specified in `source_phase`. This value
+   * must consist of lower-case letters, numbers, and hyphens, start with a
+   * letter and end with a letter or a number, and have a max length of 63
+   * characters. In other words, it must match the following regex:
+   * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string jobs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the jobs. + */ + public com.google.protobuf.ProtocolStringList getJobsList() { + return jobs_; + } + /** + * + * + *
+   * Optional. Jobs to repair. Proceeds only after job name matched any one in
+   * the list, or for all jobs if unspecified or empty. The phase that includes
+   * the job must match the phase ID specified in `source_phase`. This value
+   * must consist of lower-case letters, numbers, and hyphens, start with a
+   * letter and end with a letter or a number, and have a max length of 63
+   * characters. In other words, it must match the following regex:
+   * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string jobs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of jobs. + */ + public int getJobsCount() { + return jobs_.size(); + } + /** + * + * + *
+   * Optional. Jobs to repair. Proceeds only after job name matched any one in
+   * the list, or for all jobs if unspecified or empty. The phase that includes
+   * the job must match the phase ID specified in `source_phase`. This value
+   * must consist of lower-case letters, numbers, and hyphens, start with a
+   * letter and end with a letter or a number, and have a max length of 63
+   * characters. In other words, it must match the following regex:
+   * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string jobs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The jobs at the given index. + */ + public java.lang.String getJobs(int index) { + return jobs_.get(index); + } + /** + * + * + *
+   * Optional. Jobs to repair. Proceeds only after job name matched any one in
+   * the list, or for all jobs if unspecified or empty. The phase that includes
+   * the job must match the phase ID specified in `source_phase`. This value
+   * must consist of lower-case letters, numbers, and hyphens, start with a
+   * letter and end with a letter or a number, and have a max length of 63
+   * characters. In other words, it must match the following regex:
+   * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string jobs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the jobs at the given index. + */ + public com.google.protobuf.ByteString getJobsBytes(int index) { + return jobs_.getByteString(index); + } + + public static final int REPAIR_MODES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List repairModes_; + /** + * + * + *
+   * Required. Defines the types of automatic repair actions for failed jobs.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getRepairModesList() { + return repairModes_; + } + /** + * + * + *
+   * Required. Defines the types of automatic repair actions for failed jobs.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getRepairModesOrBuilderList() { + return repairModes_; + } + /** + * + * + *
+   * Required. Defines the types of automatic repair actions for failed jobs.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getRepairModesCount() { + return repairModes_.size(); + } + /** + * + * + *
+   * Required. Defines the types of automatic repair actions for failed jobs.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RepairMode getRepairModes(int index) { + return repairModes_.get(index); + } + /** + * + * + *
+   * Required. Defines the types of automatic repair actions for failed jobs.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RepairModeOrBuilder getRepairModesOrBuilder(int index) { + return repairModes_.get(index); + } + + public static final int CONDITION_FIELD_NUMBER = 6; + private com.google.cloud.deploy.v1.AutomationRuleCondition condition_; + /** + * + * + *
+   * Output only. Information around the state of the 'Automation' rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the condition field is set. + */ + @java.lang.Override + public boolean hasCondition() { + return condition_ != null; + } + /** + * + * + *
+   * Output only. Information around the state of the 'Automation' rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The condition. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRuleCondition getCondition() { + return condition_ == null + ? com.google.cloud.deploy.v1.AutomationRuleCondition.getDefaultInstance() + : condition_; + } + /** + * + * + *
+   * Output only. Information around the state of the 'Automation' rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationRuleConditionOrBuilder getConditionOrBuilder() { + return condition_ == null + ? com.google.cloud.deploy.v1.AutomationRuleCondition.getDefaultInstance() + : condition_; + } + + 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_); + } + for (int i = 0; i < sourcePhases_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourcePhases_.getRaw(i)); + } + for (int i = 0; i < jobs_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, jobs_.getRaw(i)); + } + for (int i = 0; i < repairModes_.size(); i++) { + output.writeMessage(4, repairModes_.get(i)); + } + if (condition_ != null) { + output.writeMessage(6, getCondition()); + } + 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_); + } + { + int dataSize = 0; + for (int i = 0; i < sourcePhases_.size(); i++) { + dataSize += computeStringSizeNoTag(sourcePhases_.getRaw(i)); + } + size += dataSize; + size += 1 * getSourcePhasesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < jobs_.size(); i++) { + dataSize += computeStringSizeNoTag(jobs_.getRaw(i)); + } + size += dataSize; + size += 1 * getJobsList().size(); + } + for (int i = 0; i < repairModes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, repairModes_.get(i)); + } + if (condition_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCondition()); + } + 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.RepairRolloutRule)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.RepairRolloutRule other = + (com.google.cloud.deploy.v1.RepairRolloutRule) obj; + + if (!getId().equals(other.getId())) return false; + if (!getSourcePhasesList().equals(other.getSourcePhasesList())) return false; + if (!getJobsList().equals(other.getJobsList())) return false; + if (!getRepairModesList().equals(other.getRepairModesList())) return false; + if (hasCondition() != other.hasCondition()) return false; + if (hasCondition()) { + if (!getCondition().equals(other.getCondition())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (getSourcePhasesCount() > 0) { + hash = (37 * hash) + SOURCE_PHASES_FIELD_NUMBER; + hash = (53 * hash) + getSourcePhasesList().hashCode(); + } + if (getJobsCount() > 0) { + hash = (37 * hash) + JOBS_FIELD_NUMBER; + hash = (53 * hash) + getJobsList().hashCode(); + } + if (getRepairModesCount() > 0) { + hash = (37 * hash) + REPAIR_MODES_FIELD_NUMBER; + hash = (53 * hash) + getRepairModesList().hashCode(); + } + if (hasCondition()) { + hash = (37 * hash) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + getCondition().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.RepairRolloutRule parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RepairRolloutRule 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.RepairRolloutRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RepairRolloutRule 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.RepairRolloutRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RepairRolloutRule 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.RepairRolloutRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RepairRolloutRule 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.RepairRolloutRule parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RepairRolloutRule 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.RepairRolloutRule 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.RepairRolloutRule 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.RepairRolloutRule 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 `RepairRolloutRule` automation rule will automatically repair a failed
+   * `Rollout`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RepairRolloutRule} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.RepairRolloutRule) + com.google.cloud.deploy.v1.RepairRolloutRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RepairRolloutRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RepairRolloutRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RepairRolloutRule.class, + com.google.cloud.deploy.v1.RepairRolloutRule.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.RepairRolloutRule.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + sourcePhases_ = com.google.protobuf.LazyStringArrayList.emptyList(); + jobs_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (repairModesBuilder_ == null) { + repairModes_ = java.util.Collections.emptyList(); + } else { + repairModes_ = null; + repairModesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + condition_ = null; + if (conditionBuilder_ != null) { + conditionBuilder_.dispose(); + conditionBuilder_ = 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_RepairRolloutRule_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RepairRolloutRule getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.RepairRolloutRule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RepairRolloutRule build() { + com.google.cloud.deploy.v1.RepairRolloutRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RepairRolloutRule buildPartial() { + com.google.cloud.deploy.v1.RepairRolloutRule result = + new com.google.cloud.deploy.v1.RepairRolloutRule(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.deploy.v1.RepairRolloutRule result) { + if (repairModesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + repairModes_ = java.util.Collections.unmodifiableList(repairModes_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.repairModes_ = repairModes_; + } else { + result.repairModes_ = repairModesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.deploy.v1.RepairRolloutRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + sourcePhases_.makeImmutable(); + result.sourcePhases_ = sourcePhases_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + jobs_.makeImmutable(); + result.jobs_ = jobs_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.condition_ = conditionBuilder_ == null ? condition_ : conditionBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.RepairRolloutRule) { + return mergeFrom((com.google.cloud.deploy.v1.RepairRolloutRule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.RepairRolloutRule other) { + if (other == com.google.cloud.deploy.v1.RepairRolloutRule.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.sourcePhases_.isEmpty()) { + if (sourcePhases_.isEmpty()) { + sourcePhases_ = other.sourcePhases_; + bitField0_ |= 0x00000002; + } else { + ensureSourcePhasesIsMutable(); + sourcePhases_.addAll(other.sourcePhases_); + } + onChanged(); + } + if (!other.jobs_.isEmpty()) { + if (jobs_.isEmpty()) { + jobs_ = other.jobs_; + bitField0_ |= 0x00000004; + } else { + ensureJobsIsMutable(); + jobs_.addAll(other.jobs_); + } + onChanged(); + } + if (repairModesBuilder_ == null) { + if (!other.repairModes_.isEmpty()) { + if (repairModes_.isEmpty()) { + repairModes_ = other.repairModes_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureRepairModesIsMutable(); + repairModes_.addAll(other.repairModes_); + } + onChanged(); + } + } else { + if (!other.repairModes_.isEmpty()) { + if (repairModesBuilder_.isEmpty()) { + repairModesBuilder_.dispose(); + repairModesBuilder_ = null; + repairModes_ = other.repairModes_; + bitField0_ = (bitField0_ & ~0x00000008); + repairModesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRepairModesFieldBuilder() + : null; + } else { + repairModesBuilder_.addAllMessages(other.repairModes_); + } + } + } + if (other.hasCondition()) { + mergeCondition(other.getCondition()); + } + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSourcePhasesIsMutable(); + sourcePhases_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureJobsIsMutable(); + jobs_.add(s); + break; + } // case 26 + case 34: + { + com.google.cloud.deploy.v1.RepairMode m = + input.readMessage( + com.google.cloud.deploy.v1.RepairMode.parser(), extensionRegistry); + if (repairModesBuilder_ == null) { + ensureRepairModesIsMutable(); + repairModes_.add(m); + } else { + repairModesBuilder_.addMessage(m); + } + break; + } // case 34 + case 50: + { + input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * Required. ID of the rule. This id must be unique in the `Automation`
+     * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. ID of the rule. This id must be unique in the `Automation`
+     * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. ID of the rule. This id must be unique in the `Automation`
+     * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the rule. This id must be unique in the `Automation`
+     * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the rule. This id must be unique in the `Automation`
+     * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList sourcePhases_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureSourcePhasesIsMutable() { + if (!sourcePhases_.isModifiable()) { + sourcePhases_ = new com.google.protobuf.LazyStringArrayList(sourcePhases_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Optional. Phases within which jobs are subject to automatic repair actions
+     * on failure. Proceeds only after phase name matched any one in the list, or
+     * for all phases if unspecified. This value must consist of lower-case
+     * letters, numbers, and hyphens, start with a letter and end with a letter or
+     * a number, and have a max length of 63 characters. In other words, it must
+     * match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string source_phases = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the sourcePhases. + */ + public com.google.protobuf.ProtocolStringList getSourcePhasesList() { + sourcePhases_.makeImmutable(); + return sourcePhases_; + } + /** + * + * + *
+     * Optional. Phases within which jobs are subject to automatic repair actions
+     * on failure. Proceeds only after phase name matched any one in the list, or
+     * for all phases if unspecified. This value must consist of lower-case
+     * letters, numbers, and hyphens, start with a letter and end with a letter or
+     * a number, and have a max length of 63 characters. In other words, it must
+     * match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string source_phases = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of sourcePhases. + */ + public int getSourcePhasesCount() { + return sourcePhases_.size(); + } + /** + * + * + *
+     * Optional. Phases within which jobs are subject to automatic repair actions
+     * on failure. Proceeds only after phase name matched any one in the list, or
+     * for all phases if unspecified. This value must consist of lower-case
+     * letters, numbers, and hyphens, start with a letter and end with a letter or
+     * a number, and have a max length of 63 characters. In other words, it must
+     * match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string source_phases = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The sourcePhases at the given index. + */ + public java.lang.String getSourcePhases(int index) { + return sourcePhases_.get(index); + } + /** + * + * + *
+     * Optional. Phases within which jobs are subject to automatic repair actions
+     * on failure. Proceeds only after phase name matched any one in the list, or
+     * for all phases if unspecified. This value must consist of lower-case
+     * letters, numbers, and hyphens, start with a letter and end with a letter or
+     * a number, and have a max length of 63 characters. In other words, it must
+     * match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string source_phases = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the sourcePhases at the given index. + */ + public com.google.protobuf.ByteString getSourcePhasesBytes(int index) { + return sourcePhases_.getByteString(index); + } + /** + * + * + *
+     * Optional. Phases within which jobs are subject to automatic repair actions
+     * on failure. Proceeds only after phase name matched any one in the list, or
+     * for all phases if unspecified. This value must consist of lower-case
+     * letters, numbers, and hyphens, start with a letter and end with a letter or
+     * a number, and have a max length of 63 characters. In other words, it must
+     * match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string source_phases = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The sourcePhases to set. + * @return This builder for chaining. + */ + public Builder setSourcePhases(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcePhasesIsMutable(); + sourcePhases_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Phases within which jobs are subject to automatic repair actions
+     * on failure. Proceeds only after phase name matched any one in the list, or
+     * for all phases if unspecified. This value must consist of lower-case
+     * letters, numbers, and hyphens, start with a letter and end with a letter or
+     * a number, and have a max length of 63 characters. In other words, it must
+     * match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string source_phases = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The sourcePhases to add. + * @return This builder for chaining. + */ + public Builder addSourcePhases(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcePhasesIsMutable(); + sourcePhases_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Phases within which jobs are subject to automatic repair actions
+     * on failure. Proceeds only after phase name matched any one in the list, or
+     * for all phases if unspecified. This value must consist of lower-case
+     * letters, numbers, and hyphens, start with a letter and end with a letter or
+     * a number, and have a max length of 63 characters. In other words, it must
+     * match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string source_phases = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The sourcePhases to add. + * @return This builder for chaining. + */ + public Builder addAllSourcePhases(java.lang.Iterable values) { + ensureSourcePhasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sourcePhases_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Phases within which jobs are subject to automatic repair actions
+     * on failure. Proceeds only after phase name matched any one in the list, or
+     * for all phases if unspecified. This value must consist of lower-case
+     * letters, numbers, and hyphens, start with a letter and end with a letter or
+     * a number, and have a max length of 63 characters. In other words, it must
+     * match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string source_phases = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSourcePhases() { + sourcePhases_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Phases within which jobs are subject to automatic repair actions
+     * on failure. Proceeds only after phase name matched any one in the list, or
+     * for all phases if unspecified. This value must consist of lower-case
+     * letters, numbers, and hyphens, start with a letter and end with a letter or
+     * a number, and have a max length of 63 characters. In other words, it must
+     * match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string source_phases = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the sourcePhases to add. + * @return This builder for chaining. + */ + public Builder addSourcePhasesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSourcePhasesIsMutable(); + sourcePhases_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList jobs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureJobsIsMutable() { + if (!jobs_.isModifiable()) { + jobs_ = new com.google.protobuf.LazyStringArrayList(jobs_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Optional. Jobs to repair. Proceeds only after job name matched any one in
+     * the list, or for all jobs if unspecified or empty. The phase that includes
+     * the job must match the phase ID specified in `source_phase`. This value
+     * must consist of lower-case letters, numbers, and hyphens, start with a
+     * letter and end with a letter or a number, and have a max length of 63
+     * characters. In other words, it must match the following regex:
+     * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string jobs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the jobs. + */ + public com.google.protobuf.ProtocolStringList getJobsList() { + jobs_.makeImmutable(); + return jobs_; + } + /** + * + * + *
+     * Optional. Jobs to repair. Proceeds only after job name matched any one in
+     * the list, or for all jobs if unspecified or empty. The phase that includes
+     * the job must match the phase ID specified in `source_phase`. This value
+     * must consist of lower-case letters, numbers, and hyphens, start with a
+     * letter and end with a letter or a number, and have a max length of 63
+     * characters. In other words, it must match the following regex:
+     * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string jobs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of jobs. + */ + public int getJobsCount() { + return jobs_.size(); + } + /** + * + * + *
+     * Optional. Jobs to repair. Proceeds only after job name matched any one in
+     * the list, or for all jobs if unspecified or empty. The phase that includes
+     * the job must match the phase ID specified in `source_phase`. This value
+     * must consist of lower-case letters, numbers, and hyphens, start with a
+     * letter and end with a letter or a number, and have a max length of 63
+     * characters. In other words, it must match the following regex:
+     * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string jobs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The jobs at the given index. + */ + public java.lang.String getJobs(int index) { + return jobs_.get(index); + } + /** + * + * + *
+     * Optional. Jobs to repair. Proceeds only after job name matched any one in
+     * the list, or for all jobs if unspecified or empty. The phase that includes
+     * the job must match the phase ID specified in `source_phase`. This value
+     * must consist of lower-case letters, numbers, and hyphens, start with a
+     * letter and end with a letter or a number, and have a max length of 63
+     * characters. In other words, it must match the following regex:
+     * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string jobs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the jobs at the given index. + */ + public com.google.protobuf.ByteString getJobsBytes(int index) { + return jobs_.getByteString(index); + } + /** + * + * + *
+     * Optional. Jobs to repair. Proceeds only after job name matched any one in
+     * the list, or for all jobs if unspecified or empty. The phase that includes
+     * the job must match the phase ID specified in `source_phase`. This value
+     * must consist of lower-case letters, numbers, and hyphens, start with a
+     * letter and end with a letter or a number, and have a max length of 63
+     * characters. In other words, it must match the following regex:
+     * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string jobs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The jobs to set. + * @return This builder for chaining. + */ + public Builder setJobs(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobsIsMutable(); + jobs_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Jobs to repair. Proceeds only after job name matched any one in
+     * the list, or for all jobs if unspecified or empty. The phase that includes
+     * the job must match the phase ID specified in `source_phase`. This value
+     * must consist of lower-case letters, numbers, and hyphens, start with a
+     * letter and end with a letter or a number, and have a max length of 63
+     * characters. In other words, it must match the following regex:
+     * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string jobs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The jobs to add. + * @return This builder for chaining. + */ + public Builder addJobs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureJobsIsMutable(); + jobs_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Jobs to repair. Proceeds only after job name matched any one in
+     * the list, or for all jobs if unspecified or empty. The phase that includes
+     * the job must match the phase ID specified in `source_phase`. This value
+     * must consist of lower-case letters, numbers, and hyphens, start with a
+     * letter and end with a letter or a number, and have a max length of 63
+     * characters. In other words, it must match the following regex:
+     * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string jobs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The jobs to add. + * @return This builder for chaining. + */ + public Builder addAllJobs(java.lang.Iterable values) { + ensureJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jobs_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Jobs to repair. Proceeds only after job name matched any one in
+     * the list, or for all jobs if unspecified or empty. The phase that includes
+     * the job must match the phase ID specified in `source_phase`. This value
+     * must consist of lower-case letters, numbers, and hyphens, start with a
+     * letter and end with a letter or a number, and have a max length of 63
+     * characters. In other words, it must match the following regex:
+     * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string jobs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearJobs() { + jobs_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Jobs to repair. Proceeds only after job name matched any one in
+     * the list, or for all jobs if unspecified or empty. The phase that includes
+     * the job must match the phase ID specified in `source_phase`. This value
+     * must consist of lower-case letters, numbers, and hyphens, start with a
+     * letter and end with a letter or a number, and have a max length of 63
+     * characters. In other words, it must match the following regex:
+     * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+     * 
+ * + * repeated string jobs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the jobs to add. + * @return This builder for chaining. + */ + public Builder addJobsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureJobsIsMutable(); + jobs_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List repairModes_ = + java.util.Collections.emptyList(); + + private void ensureRepairModesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + repairModes_ = new java.util.ArrayList(repairModes_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.RepairMode, + com.google.cloud.deploy.v1.RepairMode.Builder, + com.google.cloud.deploy.v1.RepairModeOrBuilder> + repairModesBuilder_; + + /** + * + * + *
+     * Required. Defines the types of automatic repair actions for failed jobs.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getRepairModesList() { + if (repairModesBuilder_ == null) { + return java.util.Collections.unmodifiableList(repairModes_); + } else { + return repairModesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. Defines the types of automatic repair actions for failed jobs.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getRepairModesCount() { + if (repairModesBuilder_ == null) { + return repairModes_.size(); + } else { + return repairModesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. Defines the types of automatic repair actions for failed jobs.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.RepairMode getRepairModes(int index) { + if (repairModesBuilder_ == null) { + return repairModes_.get(index); + } else { + return repairModesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. Defines the types of automatic repair actions for failed jobs.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRepairModes(int index, com.google.cloud.deploy.v1.RepairMode value) { + if (repairModesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRepairModesIsMutable(); + repairModes_.set(index, value); + onChanged(); + } else { + repairModesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Defines the types of automatic repair actions for failed jobs.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRepairModes( + int index, com.google.cloud.deploy.v1.RepairMode.Builder builderForValue) { + if (repairModesBuilder_ == null) { + ensureRepairModesIsMutable(); + repairModes_.set(index, builderForValue.build()); + onChanged(); + } else { + repairModesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Defines the types of automatic repair actions for failed jobs.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRepairModes(com.google.cloud.deploy.v1.RepairMode value) { + if (repairModesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRepairModesIsMutable(); + repairModes_.add(value); + onChanged(); + } else { + repairModesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. Defines the types of automatic repair actions for failed jobs.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRepairModes(int index, com.google.cloud.deploy.v1.RepairMode value) { + if (repairModesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRepairModesIsMutable(); + repairModes_.add(index, value); + onChanged(); + } else { + repairModesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Defines the types of automatic repair actions for failed jobs.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRepairModes(com.google.cloud.deploy.v1.RepairMode.Builder builderForValue) { + if (repairModesBuilder_ == null) { + ensureRepairModesIsMutable(); + repairModes_.add(builderForValue.build()); + onChanged(); + } else { + repairModesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Defines the types of automatic repair actions for failed jobs.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addRepairModes( + int index, com.google.cloud.deploy.v1.RepairMode.Builder builderForValue) { + if (repairModesBuilder_ == null) { + ensureRepairModesIsMutable(); + repairModes_.add(index, builderForValue.build()); + onChanged(); + } else { + repairModesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Defines the types of automatic repair actions for failed jobs.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllRepairModes( + java.lang.Iterable values) { + if (repairModesBuilder_ == null) { + ensureRepairModesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, repairModes_); + onChanged(); + } else { + repairModesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. Defines the types of automatic repair actions for failed jobs.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRepairModes() { + if (repairModesBuilder_ == null) { + repairModes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + repairModesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. Defines the types of automatic repair actions for failed jobs.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeRepairModes(int index) { + if (repairModesBuilder_ == null) { + ensureRepairModesIsMutable(); + repairModes_.remove(index); + onChanged(); + } else { + repairModesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. Defines the types of automatic repair actions for failed jobs.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.RepairMode.Builder getRepairModesBuilder(int index) { + return getRepairModesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. Defines the types of automatic repair actions for failed jobs.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.RepairModeOrBuilder getRepairModesOrBuilder(int index) { + if (repairModesBuilder_ == null) { + return repairModes_.get(index); + } else { + return repairModesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. Defines the types of automatic repair actions for failed jobs.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getRepairModesOrBuilderList() { + if (repairModesBuilder_ != null) { + return repairModesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(repairModes_); + } + } + /** + * + * + *
+     * Required. Defines the types of automatic repair actions for failed jobs.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.RepairMode.Builder addRepairModesBuilder() { + return getRepairModesFieldBuilder() + .addBuilder(com.google.cloud.deploy.v1.RepairMode.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Defines the types of automatic repair actions for failed jobs.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.RepairMode.Builder addRepairModesBuilder(int index) { + return getRepairModesFieldBuilder() + .addBuilder(index, com.google.cloud.deploy.v1.RepairMode.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Defines the types of automatic repair actions for failed jobs.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getRepairModesBuilderList() { + return getRepairModesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.RepairMode, + com.google.cloud.deploy.v1.RepairMode.Builder, + com.google.cloud.deploy.v1.RepairModeOrBuilder> + getRepairModesFieldBuilder() { + if (repairModesBuilder_ == null) { + repairModesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.RepairMode, + com.google.cloud.deploy.v1.RepairMode.Builder, + com.google.cloud.deploy.v1.RepairModeOrBuilder>( + repairModes_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + repairModes_ = null; + } + return repairModesBuilder_; + } + + private com.google.cloud.deploy.v1.AutomationRuleCondition condition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationRuleCondition, + com.google.cloud.deploy.v1.AutomationRuleCondition.Builder, + com.google.cloud.deploy.v1.AutomationRuleConditionOrBuilder> + conditionBuilder_; + /** + * + * + *
+     * Output only. Information around the state of the 'Automation' rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the condition field is set. + */ + public boolean hasCondition() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. Information around the state of the 'Automation' rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The condition. + */ + public com.google.cloud.deploy.v1.AutomationRuleCondition getCondition() { + if (conditionBuilder_ == null) { + return condition_ == null + ? com.google.cloud.deploy.v1.AutomationRuleCondition.getDefaultInstance() + : condition_; + } else { + return conditionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Information around the state of the 'Automation' rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCondition(com.google.cloud.deploy.v1.AutomationRuleCondition value) { + if (conditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + } else { + conditionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Information around the state of the 'Automation' rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCondition( + com.google.cloud.deploy.v1.AutomationRuleCondition.Builder builderForValue) { + if (conditionBuilder_ == null) { + condition_ = builderForValue.build(); + } else { + conditionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Information around the state of the 'Automation' rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCondition(com.google.cloud.deploy.v1.AutomationRuleCondition value) { + if (conditionBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && condition_ != null + && condition_ + != com.google.cloud.deploy.v1.AutomationRuleCondition.getDefaultInstance()) { + getConditionBuilder().mergeFrom(value); + } else { + condition_ = value; + } + } else { + conditionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Information around the state of the 'Automation' rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCondition() { + bitField0_ = (bitField0_ & ~0x00000010); + condition_ = null; + if (conditionBuilder_ != null) { + conditionBuilder_.dispose(); + conditionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Information around the state of the 'Automation' rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.AutomationRuleCondition.Builder getConditionBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getConditionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Information around the state of the 'Automation' rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.AutomationRuleConditionOrBuilder getConditionOrBuilder() { + if (conditionBuilder_ != null) { + return conditionBuilder_.getMessageOrBuilder(); + } else { + return condition_ == null + ? com.google.cloud.deploy.v1.AutomationRuleCondition.getDefaultInstance() + : condition_; + } + } + /** + * + * + *
+     * Output only. Information around the state of the 'Automation' rule.
+     * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationRuleCondition, + com.google.cloud.deploy.v1.AutomationRuleCondition.Builder, + com.google.cloud.deploy.v1.AutomationRuleConditionOrBuilder> + getConditionFieldBuilder() { + if (conditionBuilder_ == null) { + conditionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.AutomationRuleCondition, + com.google.cloud.deploy.v1.AutomationRuleCondition.Builder, + com.google.cloud.deploy.v1.AutomationRuleConditionOrBuilder>( + getCondition(), getParentForChildren(), isClean()); + condition_ = null; + } + return conditionBuilder_; + } + + @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.RepairRolloutRule) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.RepairRolloutRule) + private static final com.google.cloud.deploy.v1.RepairRolloutRule DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.RepairRolloutRule(); + } + + public static com.google.cloud.deploy.v1.RepairRolloutRule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RepairRolloutRule 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.RepairRolloutRule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairRolloutRuleOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairRolloutRuleOrBuilder.java new file mode 100644 index 000000000000..2cabe273af91 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairRolloutRuleOrBuilder.java @@ -0,0 +1,301 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 RepairRolloutRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.RepairRolloutRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. ID of the rule. This id must be unique in the `Automation`
+   * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Required. ID of the rule. This id must be unique in the `Automation`
+   * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Optional. Phases within which jobs are subject to automatic repair actions
+   * on failure. Proceeds only after phase name matched any one in the list, or
+   * for all phases if unspecified. This value must consist of lower-case
+   * letters, numbers, and hyphens, start with a letter and end with a letter or
+   * a number, and have a max length of 63 characters. In other words, it must
+   * match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string source_phases = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the sourcePhases. + */ + java.util.List getSourcePhasesList(); + /** + * + * + *
+   * Optional. Phases within which jobs are subject to automatic repair actions
+   * on failure. Proceeds only after phase name matched any one in the list, or
+   * for all phases if unspecified. This value must consist of lower-case
+   * letters, numbers, and hyphens, start with a letter and end with a letter or
+   * a number, and have a max length of 63 characters. In other words, it must
+   * match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string source_phases = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of sourcePhases. + */ + int getSourcePhasesCount(); + /** + * + * + *
+   * Optional. Phases within which jobs are subject to automatic repair actions
+   * on failure. Proceeds only after phase name matched any one in the list, or
+   * for all phases if unspecified. This value must consist of lower-case
+   * letters, numbers, and hyphens, start with a letter and end with a letter or
+   * a number, and have a max length of 63 characters. In other words, it must
+   * match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string source_phases = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The sourcePhases at the given index. + */ + java.lang.String getSourcePhases(int index); + /** + * + * + *
+   * Optional. Phases within which jobs are subject to automatic repair actions
+   * on failure. Proceeds only after phase name matched any one in the list, or
+   * for all phases if unspecified. This value must consist of lower-case
+   * letters, numbers, and hyphens, start with a letter and end with a letter or
+   * a number, and have a max length of 63 characters. In other words, it must
+   * match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string source_phases = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the sourcePhases at the given index. + */ + com.google.protobuf.ByteString getSourcePhasesBytes(int index); + + /** + * + * + *
+   * Optional. Jobs to repair. Proceeds only after job name matched any one in
+   * the list, or for all jobs if unspecified or empty. The phase that includes
+   * the job must match the phase ID specified in `source_phase`. This value
+   * must consist of lower-case letters, numbers, and hyphens, start with a
+   * letter and end with a letter or a number, and have a max length of 63
+   * characters. In other words, it must match the following regex:
+   * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string jobs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the jobs. + */ + java.util.List getJobsList(); + /** + * + * + *
+   * Optional. Jobs to repair. Proceeds only after job name matched any one in
+   * the list, or for all jobs if unspecified or empty. The phase that includes
+   * the job must match the phase ID specified in `source_phase`. This value
+   * must consist of lower-case letters, numbers, and hyphens, start with a
+   * letter and end with a letter or a number, and have a max length of 63
+   * characters. In other words, it must match the following regex:
+   * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string jobs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of jobs. + */ + int getJobsCount(); + /** + * + * + *
+   * Optional. Jobs to repair. Proceeds only after job name matched any one in
+   * the list, or for all jobs if unspecified or empty. The phase that includes
+   * the job must match the phase ID specified in `source_phase`. This value
+   * must consist of lower-case letters, numbers, and hyphens, start with a
+   * letter and end with a letter or a number, and have a max length of 63
+   * characters. In other words, it must match the following regex:
+   * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string jobs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The jobs at the given index. + */ + java.lang.String getJobs(int index); + /** + * + * + *
+   * Optional. Jobs to repair. Proceeds only after job name matched any one in
+   * the list, or for all jobs if unspecified or empty. The phase that includes
+   * the job must match the phase ID specified in `source_phase`. This value
+   * must consist of lower-case letters, numbers, and hyphens, start with a
+   * letter and end with a letter or a number, and have a max length of 63
+   * characters. In other words, it must match the following regex:
+   * `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
+   * 
+ * + * repeated string jobs = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the jobs at the given index. + */ + com.google.protobuf.ByteString getJobsBytes(int index); + + /** + * + * + *
+   * Required. Defines the types of automatic repair actions for failed jobs.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getRepairModesList(); + /** + * + * + *
+   * Required. Defines the types of automatic repair actions for failed jobs.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.deploy.v1.RepairMode getRepairModes(int index); + /** + * + * + *
+   * Required. Defines the types of automatic repair actions for failed jobs.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getRepairModesCount(); + /** + * + * + *
+   * Required. Defines the types of automatic repair actions for failed jobs.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getRepairModesOrBuilderList(); + /** + * + * + *
+   * Required. Defines the types of automatic repair actions for failed jobs.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RepairMode repair_modes = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.deploy.v1.RepairModeOrBuilder getRepairModesOrBuilder(int index); + + /** + * + * + *
+   * Output only. Information around the state of the 'Automation' rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the condition field is set. + */ + boolean hasCondition(); + /** + * + * + *
+   * Output only. Information around the state of the 'Automation' rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The condition. + */ + com.google.cloud.deploy.v1.AutomationRuleCondition getCondition(); + /** + * + * + *
+   * Output only. Information around the state of the 'Automation' rule.
+   * 
+ * + * + * .google.cloud.deploy.v1.AutomationRuleCondition condition = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.AutomationRuleConditionOrBuilder getConditionOrBuilder(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairState.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairState.java new file mode 100644 index 000000000000..981031c9839f --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RepairState.java @@ -0,0 +1,264 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * Valid state of a repair attempt.
+ * 
+ * + * Protobuf enum {@code google.cloud.deploy.v1.RepairState} + */ +public enum RepairState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The `repair` has an unspecified state.
+   * 
+ * + * REPAIR_STATE_UNSPECIFIED = 0; + */ + REPAIR_STATE_UNSPECIFIED(0), + /** + * + * + *
+   * The `repair` action has succeeded.
+   * 
+ * + * REPAIR_STATE_SUCCEEDED = 1; + */ + REPAIR_STATE_SUCCEEDED(1), + /** + * + * + *
+   * The `repair` action was cancelled.
+   * 
+ * + * REPAIR_STATE_CANCELLED = 2; + */ + REPAIR_STATE_CANCELLED(2), + /** + * + * + *
+   * The `repair` action has failed.
+   * 
+ * + * REPAIR_STATE_FAILED = 3; + */ + REPAIR_STATE_FAILED(3), + /** + * + * + *
+   * The `repair` action is in progress.
+   * 
+ * + * REPAIR_STATE_IN_PROGRESS = 4; + */ + REPAIR_STATE_IN_PROGRESS(4), + /** + * + * + *
+   * The `repair` action is pending.
+   * 
+ * + * REPAIR_STATE_PENDING = 5; + */ + REPAIR_STATE_PENDING(5), + /** + * + * + *
+   * The `repair` action was skipped.
+   * 
+ * + * REPAIR_STATE_SKIPPED = 6; + */ + REPAIR_STATE_SKIPPED(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The `repair` has an unspecified state.
+   * 
+ * + * REPAIR_STATE_UNSPECIFIED = 0; + */ + public static final int REPAIR_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * The `repair` action has succeeded.
+   * 
+ * + * REPAIR_STATE_SUCCEEDED = 1; + */ + public static final int REPAIR_STATE_SUCCEEDED_VALUE = 1; + /** + * + * + *
+   * The `repair` action was cancelled.
+   * 
+ * + * REPAIR_STATE_CANCELLED = 2; + */ + public static final int REPAIR_STATE_CANCELLED_VALUE = 2; + /** + * + * + *
+   * The `repair` action has failed.
+   * 
+ * + * REPAIR_STATE_FAILED = 3; + */ + public static final int REPAIR_STATE_FAILED_VALUE = 3; + /** + * + * + *
+   * The `repair` action is in progress.
+   * 
+ * + * REPAIR_STATE_IN_PROGRESS = 4; + */ + public static final int REPAIR_STATE_IN_PROGRESS_VALUE = 4; + /** + * + * + *
+   * The `repair` action is pending.
+   * 
+ * + * REPAIR_STATE_PENDING = 5; + */ + public static final int REPAIR_STATE_PENDING_VALUE = 5; + /** + * + * + *
+   * The `repair` action was skipped.
+   * 
+ * + * REPAIR_STATE_SKIPPED = 6; + */ + public static final int REPAIR_STATE_SKIPPED_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 RepairState 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 RepairState forNumber(int value) { + switch (value) { + case 0: + return REPAIR_STATE_UNSPECIFIED; + case 1: + return REPAIR_STATE_SUCCEEDED; + case 2: + return REPAIR_STATE_CANCELLED; + case 3: + return REPAIR_STATE_FAILED; + case 4: + return REPAIR_STATE_IN_PROGRESS; + case 5: + return REPAIR_STATE_PENDING; + case 6: + return REPAIR_STATE_SKIPPED; + 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 RepairState findValueByNumber(int number) { + return RepairState.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.CloudDeployProto.getDescriptor().getEnumTypes().get(2); + } + + private static final RepairState[] VALUES = values(); + + public static RepairState 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 RepairState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.deploy.v1.RepairState) +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Retry.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Retry.java new file mode 100644 index 000000000000..c3f795f877ed --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Retry.java @@ -0,0 +1,973 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * Retries the failed job.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Retry} + */ +public final class Retry extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.Retry) + RetryOrBuilder { + private static final long serialVersionUID = 0L; + // Use Retry.newBuilder() to construct. + private Retry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Retry() { + backoffMode_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Retry(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Retry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Retry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Retry.class, com.google.cloud.deploy.v1.Retry.Builder.class); + } + + public static final int ATTEMPTS_FIELD_NUMBER = 1; + private long attempts_ = 0L; + /** + * + * + *
+   * Required. Total number of retries. Retry will skipped if set to 0; The
+   * minimum value is 1, and the maximum value is 10.
+   * 
+ * + * int64 attempts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The attempts. + */ + @java.lang.Override + public long getAttempts() { + return attempts_; + } + + public static final int WAIT_FIELD_NUMBER = 2; + private com.google.protobuf.Duration wait_; + /** + * + * + *
+   * Optional. How long to wait for the first retry. Default is 0, and the
+   * maximum value is 14d.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the wait field is set. + */ + @java.lang.Override + public boolean hasWait() { + return wait_ != null; + } + /** + * + * + *
+   * Optional. How long to wait for the first retry. Default is 0, and the
+   * maximum value is 14d.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The wait. + */ + @java.lang.Override + public com.google.protobuf.Duration getWait() { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } + /** + * + * + *
+   * Optional. How long to wait for the first retry. Default is 0, and the
+   * maximum value is 14d.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getWaitOrBuilder() { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } + + public static final int BACKOFF_MODE_FIELD_NUMBER = 3; + private int backoffMode_ = 0; + /** + * + * + *
+   * Optional. The pattern of how wait time will be increased. Default is
+   * linear. Backoff mode will be ignored if `wait` is 0.
+   * 
+ * + * + * .google.cloud.deploy.v1.BackoffMode backoff_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for backoffMode. + */ + @java.lang.Override + public int getBackoffModeValue() { + return backoffMode_; + } + /** + * + * + *
+   * Optional. The pattern of how wait time will be increased. Default is
+   * linear. Backoff mode will be ignored if `wait` is 0.
+   * 
+ * + * + * .google.cloud.deploy.v1.BackoffMode backoff_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The backoffMode. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.BackoffMode getBackoffMode() { + com.google.cloud.deploy.v1.BackoffMode result = + com.google.cloud.deploy.v1.BackoffMode.forNumber(backoffMode_); + return result == null ? com.google.cloud.deploy.v1.BackoffMode.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 (attempts_ != 0L) { + output.writeInt64(1, attempts_); + } + if (wait_ != null) { + output.writeMessage(2, getWait()); + } + if (backoffMode_ + != com.google.cloud.deploy.v1.BackoffMode.BACKOFF_MODE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, backoffMode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (attempts_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, attempts_); + } + if (wait_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getWait()); + } + if (backoffMode_ + != com.google.cloud.deploy.v1.BackoffMode.BACKOFF_MODE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, backoffMode_); + } + 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.Retry)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.Retry other = (com.google.cloud.deploy.v1.Retry) obj; + + if (getAttempts() != other.getAttempts()) return false; + if (hasWait() != other.hasWait()) return false; + if (hasWait()) { + if (!getWait().equals(other.getWait())) return false; + } + if (backoffMode_ != other.backoffMode_) 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) + ATTEMPTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAttempts()); + if (hasWait()) { + hash = (37 * hash) + WAIT_FIELD_NUMBER; + hash = (53 * hash) + getWait().hashCode(); + } + hash = (37 * hash) + BACKOFF_MODE_FIELD_NUMBER; + hash = (53 * hash) + backoffMode_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.Retry parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Retry 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.Retry parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Retry 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.Retry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Retry 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.Retry parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Retry 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.Retry parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Retry 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.Retry 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.Retry 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.Retry 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; + } + /** + * + * + *
+   * Retries the failed job.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Retry} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.Retry) + com.google.cloud.deploy.v1.RetryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Retry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Retry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Retry.class, + com.google.cloud.deploy.v1.Retry.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.Retry.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attempts_ = 0L; + wait_ = null; + if (waitBuilder_ != null) { + waitBuilder_.dispose(); + waitBuilder_ = null; + } + backoffMode_ = 0; + 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_Retry_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Retry getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.Retry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Retry build() { + com.google.cloud.deploy.v1.Retry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Retry buildPartial() { + com.google.cloud.deploy.v1.Retry result = new com.google.cloud.deploy.v1.Retry(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.Retry result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attempts_ = attempts_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.wait_ = waitBuilder_ == null ? wait_ : waitBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.backoffMode_ = backoffMode_; + } + } + + @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.Retry) { + return mergeFrom((com.google.cloud.deploy.v1.Retry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.Retry other) { + if (other == com.google.cloud.deploy.v1.Retry.getDefaultInstance()) return this; + if (other.getAttempts() != 0L) { + setAttempts(other.getAttempts()); + } + if (other.hasWait()) { + mergeWait(other.getWait()); + } + if (other.backoffMode_ != 0) { + setBackoffModeValue(other.getBackoffModeValue()); + } + 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: + { + attempts_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(getWaitFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + backoffMode_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long attempts_; + /** + * + * + *
+     * Required. Total number of retries. Retry will skipped if set to 0; The
+     * minimum value is 1, and the maximum value is 10.
+     * 
+ * + * int64 attempts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The attempts. + */ + @java.lang.Override + public long getAttempts() { + return attempts_; + } + /** + * + * + *
+     * Required. Total number of retries. Retry will skipped if set to 0; The
+     * minimum value is 1, and the maximum value is 10.
+     * 
+ * + * int64 attempts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The attempts to set. + * @return This builder for chaining. + */ + public Builder setAttempts(long value) { + + attempts_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Total number of retries. Retry will skipped if set to 0; The
+     * minimum value is 1, and the maximum value is 10.
+     * 
+ * + * int64 attempts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAttempts() { + bitField0_ = (bitField0_ & ~0x00000001); + attempts_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Duration wait_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + waitBuilder_; + /** + * + * + *
+     * Optional. How long to wait for the first retry. Default is 0, and the
+     * maximum value is 14d.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the wait field is set. + */ + public boolean hasWait() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. How long to wait for the first retry. Default is 0, and the
+     * maximum value is 14d.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The wait. + */ + public com.google.protobuf.Duration getWait() { + if (waitBuilder_ == null) { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } else { + return waitBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. How long to wait for the first retry. Default is 0, and the
+     * maximum value is 14d.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setWait(com.google.protobuf.Duration value) { + if (waitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + wait_ = value; + } else { + waitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. How long to wait for the first retry. Default is 0, and the
+     * maximum value is 14d.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setWait(com.google.protobuf.Duration.Builder builderForValue) { + if (waitBuilder_ == null) { + wait_ = builderForValue.build(); + } else { + waitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. How long to wait for the first retry. Default is 0, and the
+     * maximum value is 14d.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeWait(com.google.protobuf.Duration value) { + if (waitBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && wait_ != null + && wait_ != com.google.protobuf.Duration.getDefaultInstance()) { + getWaitBuilder().mergeFrom(value); + } else { + wait_ = value; + } + } else { + waitBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. How long to wait for the first retry. Default is 0, and the
+     * maximum value is 14d.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearWait() { + bitField0_ = (bitField0_ & ~0x00000002); + wait_ = null; + if (waitBuilder_ != null) { + waitBuilder_.dispose(); + waitBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. How long to wait for the first retry. Default is 0, and the
+     * maximum value is 14d.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.Duration.Builder getWaitBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getWaitFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. How long to wait for the first retry. Default is 0, and the
+     * maximum value is 14d.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.DurationOrBuilder getWaitOrBuilder() { + if (waitBuilder_ != null) { + return waitBuilder_.getMessageOrBuilder(); + } else { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } + } + /** + * + * + *
+     * Optional. How long to wait for the first retry. Default is 0, and the
+     * maximum value is 14d.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getWaitFieldBuilder() { + if (waitBuilder_ == null) { + waitBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getWait(), getParentForChildren(), isClean()); + wait_ = null; + } + return waitBuilder_; + } + + private int backoffMode_ = 0; + /** + * + * + *
+     * Optional. The pattern of how wait time will be increased. Default is
+     * linear. Backoff mode will be ignored if `wait` is 0.
+     * 
+ * + * + * .google.cloud.deploy.v1.BackoffMode backoff_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for backoffMode. + */ + @java.lang.Override + public int getBackoffModeValue() { + return backoffMode_; + } + /** + * + * + *
+     * Optional. The pattern of how wait time will be increased. Default is
+     * linear. Backoff mode will be ignored if `wait` is 0.
+     * 
+ * + * + * .google.cloud.deploy.v1.BackoffMode backoff_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for backoffMode to set. + * @return This builder for chaining. + */ + public Builder setBackoffModeValue(int value) { + backoffMode_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The pattern of how wait time will be increased. Default is
+     * linear. Backoff mode will be ignored if `wait` is 0.
+     * 
+ * + * + * .google.cloud.deploy.v1.BackoffMode backoff_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The backoffMode. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.BackoffMode getBackoffMode() { + com.google.cloud.deploy.v1.BackoffMode result = + com.google.cloud.deploy.v1.BackoffMode.forNumber(backoffMode_); + return result == null ? com.google.cloud.deploy.v1.BackoffMode.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Optional. The pattern of how wait time will be increased. Default is
+     * linear. Backoff mode will be ignored if `wait` is 0.
+     * 
+ * + * + * .google.cloud.deploy.v1.BackoffMode backoff_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The backoffMode to set. + * @return This builder for chaining. + */ + public Builder setBackoffMode(com.google.cloud.deploy.v1.BackoffMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + backoffMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The pattern of how wait time will be increased. Default is
+     * linear. Backoff mode will be ignored if `wait` is 0.
+     * 
+ * + * + * .google.cloud.deploy.v1.BackoffMode backoff_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearBackoffMode() { + bitField0_ = (bitField0_ & ~0x00000004); + backoffMode_ = 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.Retry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.Retry) + private static final com.google.cloud.deploy.v1.Retry DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.Retry(); + } + + public static com.google.cloud.deploy.v1.Retry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Retry 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.Retry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryAttempt.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryAttempt.java new file mode 100644 index 000000000000..847aed074dc1 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryAttempt.java @@ -0,0 +1,1133 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * RetryAttempt represents an action of retrying the failed Cloud Deploy job.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RetryAttempt} + */ +public final class RetryAttempt extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.RetryAttempt) + RetryAttemptOrBuilder { + private static final long serialVersionUID = 0L; + // Use RetryAttempt.newBuilder() to construct. + private RetryAttempt(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RetryAttempt() { + state_ = 0; + stateDesc_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RetryAttempt(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RetryAttempt_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RetryAttempt_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RetryAttempt.class, + com.google.cloud.deploy.v1.RetryAttempt.Builder.class); + } + + public static final int ATTEMPT_FIELD_NUMBER = 1; + private long attempt_ = 0L; + /** + * + * + *
+   * Output only. The index of this retry attempt.
+   * 
+ * + * int64 attempt = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The attempt. + */ + @java.lang.Override + public long getAttempt() { + return attempt_; + } + + public static final int WAIT_FIELD_NUMBER = 2; + private com.google.protobuf.Duration wait_; + /** + * + * + *
+   * Output only. How long the operation will be paused.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the wait field is set. + */ + @java.lang.Override + public boolean hasWait() { + return wait_ != null; + } + /** + * + * + *
+   * Output only. How long the operation will be paused.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The wait. + */ + @java.lang.Override + public com.google.protobuf.Duration getWait() { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } + /** + * + * + *
+   * Output only. How long the operation will be paused.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getWaitOrBuilder() { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } + + public static final int STATE_FIELD_NUMBER = 5; + private int state_ = 0; + /** + * + * + *
+   * Output only. Valid state of this retry action.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairState state = 5 [(.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. Valid state of this retry action.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RepairState getState() { + com.google.cloud.deploy.v1.RepairState result = + com.google.cloud.deploy.v1.RepairState.forNumber(state_); + return result == null ? com.google.cloud.deploy.v1.RepairState.UNRECOGNIZED : result; + } + + public static final int STATE_DESC_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object stateDesc_ = ""; + /** + * + * + *
+   * Output only. Description of the state of the Retry.
+   * 
+ * + * string state_desc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateDesc. + */ + @java.lang.Override + public java.lang.String getStateDesc() { + java.lang.Object ref = stateDesc_; + 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(); + stateDesc_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Description of the state of the Retry.
+   * 
+ * + * string state_desc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateDesc. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStateDescBytes() { + java.lang.Object ref = stateDesc_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stateDesc_ = 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 (attempt_ != 0L) { + output.writeInt64(1, attempt_); + } + if (wait_ != null) { + output.writeMessage(2, getWait()); + } + if (state_ != com.google.cloud.deploy.v1.RepairState.REPAIR_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateDesc_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, stateDesc_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (attempt_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, attempt_); + } + if (wait_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getWait()); + } + if (state_ != com.google.cloud.deploy.v1.RepairState.REPAIR_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateDesc_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, stateDesc_); + } + 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.RetryAttempt)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.RetryAttempt other = (com.google.cloud.deploy.v1.RetryAttempt) obj; + + if (getAttempt() != other.getAttempt()) return false; + if (hasWait() != other.hasWait()) return false; + if (hasWait()) { + if (!getWait().equals(other.getWait())) return false; + } + if (state_ != other.state_) return false; + if (!getStateDesc().equals(other.getStateDesc())) 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) + ATTEMPT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAttempt()); + if (hasWait()) { + hash = (37 * hash) + WAIT_FIELD_NUMBER; + hash = (53 * hash) + getWait().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + STATE_DESC_FIELD_NUMBER; + hash = (53 * hash) + getStateDesc().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.RetryAttempt parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RetryAttempt 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.RetryAttempt parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RetryAttempt 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.RetryAttempt parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RetryAttempt 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.RetryAttempt parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RetryAttempt 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.RetryAttempt parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RetryAttempt 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.RetryAttempt 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.RetryAttempt 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.RetryAttempt 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; + } + /** + * + * + *
+   * RetryAttempt represents an action of retrying the failed Cloud Deploy job.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RetryAttempt} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.RetryAttempt) + com.google.cloud.deploy.v1.RetryAttemptOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RetryAttempt_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RetryAttempt_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RetryAttempt.class, + com.google.cloud.deploy.v1.RetryAttempt.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.RetryAttempt.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attempt_ = 0L; + wait_ = null; + if (waitBuilder_ != null) { + waitBuilder_.dispose(); + waitBuilder_ = null; + } + state_ = 0; + stateDesc_ = ""; + 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_RetryAttempt_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RetryAttempt getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.RetryAttempt.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RetryAttempt build() { + com.google.cloud.deploy.v1.RetryAttempt result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RetryAttempt buildPartial() { + com.google.cloud.deploy.v1.RetryAttempt result = + new com.google.cloud.deploy.v1.RetryAttempt(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.RetryAttempt result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attempt_ = attempt_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.wait_ = waitBuilder_ == null ? wait_ : waitBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.stateDesc_ = stateDesc_; + } + } + + @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.RetryAttempt) { + return mergeFrom((com.google.cloud.deploy.v1.RetryAttempt) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.RetryAttempt other) { + if (other == com.google.cloud.deploy.v1.RetryAttempt.getDefaultInstance()) return this; + if (other.getAttempt() != 0L) { + setAttempt(other.getAttempt()); + } + if (other.hasWait()) { + mergeWait(other.getWait()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getStateDesc().isEmpty()) { + stateDesc_ = other.stateDesc_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + attempt_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(getWaitFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 40: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 40 + case 50: + { + stateDesc_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long attempt_; + /** + * + * + *
+     * Output only. The index of this retry attempt.
+     * 
+ * + * int64 attempt = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The attempt. + */ + @java.lang.Override + public long getAttempt() { + return attempt_; + } + /** + * + * + *
+     * Output only. The index of this retry attempt.
+     * 
+ * + * int64 attempt = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The attempt to set. + * @return This builder for chaining. + */ + public Builder setAttempt(long value) { + + attempt_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The index of this retry attempt.
+     * 
+ * + * int64 attempt = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAttempt() { + bitField0_ = (bitField0_ & ~0x00000001); + attempt_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Duration wait_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + waitBuilder_; + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the wait field is set. + */ + public boolean hasWait() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The wait. + */ + public com.google.protobuf.Duration getWait() { + if (waitBuilder_ == null) { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } else { + return waitBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setWait(com.google.protobuf.Duration value) { + if (waitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + wait_ = value; + } else { + waitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setWait(com.google.protobuf.Duration.Builder builderForValue) { + if (waitBuilder_ == null) { + wait_ = builderForValue.build(); + } else { + waitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeWait(com.google.protobuf.Duration value) { + if (waitBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && wait_ != null + && wait_ != com.google.protobuf.Duration.getDefaultInstance()) { + getWaitBuilder().mergeFrom(value); + } else { + wait_ = value; + } + } else { + waitBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearWait() { + bitField0_ = (bitField0_ & ~0x00000002); + wait_ = null; + if (waitBuilder_ != null) { + waitBuilder_.dispose(); + waitBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.Duration.Builder getWaitBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getWaitFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.protobuf.DurationOrBuilder getWaitOrBuilder() { + if (waitBuilder_ != null) { + return waitBuilder_.getMessageOrBuilder(); + } else { + return wait_ == null ? com.google.protobuf.Duration.getDefaultInstance() : wait_; + } + } + /** + * + * + *
+     * Output only. How long the operation will be paused.
+     * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getWaitFieldBuilder() { + if (waitBuilder_ == null) { + waitBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getWait(), getParentForChildren(), isClean()); + wait_ = null; + } + return waitBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. Valid state of this retry action.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairState state = 5 [(.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. Valid state of this retry action.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairState state = 5 [(.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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Valid state of this retry action.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RepairState getState() { + com.google.cloud.deploy.v1.RepairState result = + com.google.cloud.deploy.v1.RepairState.forNumber(state_); + return result == null ? com.google.cloud.deploy.v1.RepairState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Valid state of this retry action.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairState state = 5 [(.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.RepairState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Valid state of this retry action.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000004); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object stateDesc_ = ""; + /** + * + * + *
+     * Output only. Description of the state of the Retry.
+     * 
+ * + * string state_desc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateDesc. + */ + public java.lang.String getStateDesc() { + java.lang.Object ref = stateDesc_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateDesc_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Description of the state of the Retry.
+     * 
+ * + * string state_desc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateDesc. + */ + public com.google.protobuf.ByteString getStateDescBytes() { + java.lang.Object ref = stateDesc_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stateDesc_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Description of the state of the Retry.
+     * 
+ * + * string state_desc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The stateDesc to set. + * @return This builder for chaining. + */ + public Builder setStateDesc(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + stateDesc_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Description of the state of the Retry.
+     * 
+ * + * string state_desc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStateDesc() { + stateDesc_ = getDefaultInstance().getStateDesc(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Description of the state of the Retry.
+     * 
+ * + * string state_desc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for stateDesc to set. + * @return This builder for chaining. + */ + public Builder setStateDescBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + stateDesc_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.RetryAttempt) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.RetryAttempt) + private static final com.google.cloud.deploy.v1.RetryAttempt DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.RetryAttempt(); + } + + public static com.google.cloud.deploy.v1.RetryAttempt getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RetryAttempt 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.RetryAttempt getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryAttemptOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryAttemptOrBuilder.java new file mode 100644 index 000000000000..b5b66725d9c2 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryAttemptOrBuilder.java @@ -0,0 +1,127 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 RetryAttemptOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.RetryAttempt) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The index of this retry attempt.
+   * 
+ * + * int64 attempt = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The attempt. + */ + long getAttempt(); + + /** + * + * + *
+   * Output only. How long the operation will be paused.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the wait field is set. + */ + boolean hasWait(); + /** + * + * + *
+   * Output only. How long the operation will be paused.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The wait. + */ + com.google.protobuf.Duration getWait(); + /** + * + * + *
+   * Output only. How long the operation will be paused.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.protobuf.DurationOrBuilder getWaitOrBuilder(); + + /** + * + * + *
+   * Output only. Valid state of this retry action.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. Valid state of this retry action.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.deploy.v1.RepairState getState(); + + /** + * + * + *
+   * Output only. Description of the state of the Retry.
+   * 
+ * + * string state_desc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateDesc. + */ + java.lang.String getStateDesc(); + /** + * + * + *
+   * Output only. Description of the state of the Retry.
+   * 
+ * + * string state_desc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateDesc. + */ + com.google.protobuf.ByteString getStateDescBytes(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobRequest.java index 3578460ba762..ded277bcdfe3 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobRequest.java @@ -73,8 +73,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * @@ -100,8 +99,7 @@ public java.lang.String getRollout() { * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * @@ -620,8 +618,7 @@ public Builder mergeFrom( * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -646,8 +643,7 @@ public java.lang.String getRollout() { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -672,8 +668,7 @@ public com.google.protobuf.ByteString getRolloutBytes() { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -697,8 +692,7 @@ public Builder setRollout(java.lang.String value) { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * @@ -718,8 +712,7 @@ public Builder clearRollout() { * *
      * Required. Name of the Rollout. Format is
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobRequestOrBuilder.java index 3c42d79e5a1f..88f990cdff6f 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryJobRequestOrBuilder.java @@ -28,8 +28,7 @@ public interface RetryJobRequestOrBuilder * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * @@ -44,8 +43,7 @@ public interface RetryJobRequestOrBuilder * *
    * Required. Name of the Rollout. Format is
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryOrBuilder.java new file mode 100644 index 000000000000..7d273f18611d --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 RetryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.Retry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Total number of retries. Retry will skipped if set to 0; The
+   * minimum value is 1, and the maximum value is 10.
+   * 
+ * + * int64 attempts = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The attempts. + */ + long getAttempts(); + + /** + * + * + *
+   * Optional. How long to wait for the first retry. Default is 0, and the
+   * maximum value is 14d.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the wait field is set. + */ + boolean hasWait(); + /** + * + * + *
+   * Optional. How long to wait for the first retry. Default is 0, and the
+   * maximum value is 14d.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The wait. + */ + com.google.protobuf.Duration getWait(); + /** + * + * + *
+   * Optional. How long to wait for the first retry. Default is 0, and the
+   * maximum value is 14d.
+   * 
+ * + * .google.protobuf.Duration wait = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.DurationOrBuilder getWaitOrBuilder(); + + /** + * + * + *
+   * Optional. The pattern of how wait time will be increased. Default is
+   * linear. Backoff mode will be ignored if `wait` is 0.
+   * 
+ * + * + * .google.cloud.deploy.v1.BackoffMode backoff_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for backoffMode. + */ + int getBackoffModeValue(); + /** + * + * + *
+   * Optional. The pattern of how wait time will be increased. Default is
+   * linear. Backoff mode will be ignored if `wait` is 0.
+   * 
+ * + * + * .google.cloud.deploy.v1.BackoffMode backoff_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The backoffMode. + */ + com.google.cloud.deploy.v1.BackoffMode getBackoffMode(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryPhase.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryPhase.java new file mode 100644 index 000000000000..2cc00f559406 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryPhase.java @@ -0,0 +1,1607 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * RetryPhase contains the retry attempts and the metadata for initiating a
+ * new attempt.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RetryPhase} + */ +public final class RetryPhase extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.RetryPhase) + RetryPhaseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RetryPhase.newBuilder() to construct. + private RetryPhase(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RetryPhase() { + backoffMode_ = 0; + phaseId_ = ""; + jobId_ = ""; + attempts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RetryPhase(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RetryPhase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RetryPhase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RetryPhase.class, + com.google.cloud.deploy.v1.RetryPhase.Builder.class); + } + + public static final int TOTAL_ATTEMPTS_FIELD_NUMBER = 1; + private long totalAttempts_ = 0L; + /** + * + * + *
+   * Output only. The number of attempts that have been made.
+   * 
+ * + * int64 total_attempts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The totalAttempts. + */ + @java.lang.Override + public long getTotalAttempts() { + return totalAttempts_; + } + + public static final int BACKOFF_MODE_FIELD_NUMBER = 2; + private int backoffMode_ = 0; + /** + * + * + *
+   * Output only. The pattern of how the wait time of the retry attempt is
+   * calculated.
+   * 
+ * + * + * .google.cloud.deploy.v1.BackoffMode backoff_mode = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for backoffMode. + */ + @java.lang.Override + public int getBackoffModeValue() { + return backoffMode_; + } + /** + * + * + *
+   * Output only. The pattern of how the wait time of the retry attempt is
+   * calculated.
+   * 
+ * + * + * .google.cloud.deploy.v1.BackoffMode backoff_mode = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backoffMode. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.BackoffMode getBackoffMode() { + com.google.cloud.deploy.v1.BackoffMode result = + com.google.cloud.deploy.v1.BackoffMode.forNumber(backoffMode_); + return result == null ? com.google.cloud.deploy.v1.BackoffMode.UNRECOGNIZED : result; + } + + public static final int PHASE_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object phaseId_ = ""; + /** + * + * + *
+   * Output only. The phase ID of the phase that includes the job being retried.
+   * 
+ * + * 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. The phase ID of the phase that includes the job being retried.
+   * 
+ * + * 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; + + @SuppressWarnings("serial") + private volatile java.lang.Object jobId_ = ""; + /** + * + * + *
+   * Output only. The job ID for the Job to retry.
+   * 
+ * + * 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. The job ID for the Job to retry.
+   * 
+ * + * 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 ATTEMPTS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List attempts_; + /** + * + * + *
+   * Output only. Detail of a retry action.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getAttemptsList() { + return attempts_; + } + /** + * + * + *
+   * Output only. Detail of a retry action.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getAttemptsOrBuilderList() { + return attempts_; + } + /** + * + * + *
+   * Output only. Detail of a retry action.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getAttemptsCount() { + return attempts_.size(); + } + /** + * + * + *
+   * Output only. Detail of a retry action.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RetryAttempt getAttempts(int index) { + return attempts_.get(index); + } + /** + * + * + *
+   * Output only. Detail of a retry action.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RetryAttemptOrBuilder getAttemptsOrBuilder(int index) { + return attempts_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (totalAttempts_ != 0L) { + output.writeInt64(1, totalAttempts_); + } + if (backoffMode_ + != com.google.cloud.deploy.v1.BackoffMode.BACKOFF_MODE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, backoffMode_); + } + 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_); + } + for (int i = 0; i < attempts_.size(); i++) { + output.writeMessage(5, attempts_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (totalAttempts_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, totalAttempts_); + } + if (backoffMode_ + != com.google.cloud.deploy.v1.BackoffMode.BACKOFF_MODE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, backoffMode_); + } + 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_); + } + for (int i = 0; i < attempts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, attempts_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.RetryPhase)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.RetryPhase other = (com.google.cloud.deploy.v1.RetryPhase) obj; + + if (getTotalAttempts() != other.getTotalAttempts()) return false; + if (backoffMode_ != other.backoffMode_) return false; + if (!getPhaseId().equals(other.getPhaseId())) return false; + if (!getJobId().equals(other.getJobId())) return false; + if (!getAttemptsList().equals(other.getAttemptsList())) 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) + TOTAL_ATTEMPTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalAttempts()); + hash = (37 * hash) + BACKOFF_MODE_FIELD_NUMBER; + hash = (53 * hash) + backoffMode_; + 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 (getAttemptsCount() > 0) { + hash = (37 * hash) + ATTEMPTS_FIELD_NUMBER; + hash = (53 * hash) + getAttemptsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.RetryPhase parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RetryPhase 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.RetryPhase parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RetryPhase 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.RetryPhase parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RetryPhase 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.RetryPhase parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RetryPhase 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.RetryPhase parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RetryPhase 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.RetryPhase 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.RetryPhase 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.RetryPhase 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; + } + /** + * + * + *
+   * RetryPhase contains the retry attempts and the metadata for initiating a
+   * new attempt.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RetryPhase} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.RetryPhase) + com.google.cloud.deploy.v1.RetryPhaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RetryPhase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RetryPhase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RetryPhase.class, + com.google.cloud.deploy.v1.RetryPhase.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.RetryPhase.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + totalAttempts_ = 0L; + backoffMode_ = 0; + phaseId_ = ""; + jobId_ = ""; + if (attemptsBuilder_ == null) { + attempts_ = java.util.Collections.emptyList(); + } else { + attempts_ = null; + attemptsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + 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_RetryPhase_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RetryPhase getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.RetryPhase.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RetryPhase build() { + com.google.cloud.deploy.v1.RetryPhase result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RetryPhase buildPartial() { + com.google.cloud.deploy.v1.RetryPhase result = + new com.google.cloud.deploy.v1.RetryPhase(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.deploy.v1.RetryPhase result) { + if (attemptsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + attempts_ = java.util.Collections.unmodifiableList(attempts_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.attempts_ = attempts_; + } else { + result.attempts_ = attemptsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.deploy.v1.RetryPhase result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.totalAttempts_ = totalAttempts_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.backoffMode_ = backoffMode_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.phaseId_ = phaseId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.jobId_ = jobId_; + } + } + + @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.RetryPhase) { + return mergeFrom((com.google.cloud.deploy.v1.RetryPhase) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.RetryPhase other) { + if (other == com.google.cloud.deploy.v1.RetryPhase.getDefaultInstance()) return this; + if (other.getTotalAttempts() != 0L) { + setTotalAttempts(other.getTotalAttempts()); + } + if (other.backoffMode_ != 0) { + setBackoffModeValue(other.getBackoffModeValue()); + } + if (!other.getPhaseId().isEmpty()) { + phaseId_ = other.phaseId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getJobId().isEmpty()) { + jobId_ = other.jobId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (attemptsBuilder_ == null) { + if (!other.attempts_.isEmpty()) { + if (attempts_.isEmpty()) { + attempts_ = other.attempts_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureAttemptsIsMutable(); + attempts_.addAll(other.attempts_); + } + onChanged(); + } + } else { + if (!other.attempts_.isEmpty()) { + if (attemptsBuilder_.isEmpty()) { + attemptsBuilder_.dispose(); + attemptsBuilder_ = null; + attempts_ = other.attempts_; + bitField0_ = (bitField0_ & ~0x00000010); + attemptsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAttemptsFieldBuilder() + : null; + } else { + attemptsBuilder_.addAllMessages(other.attempts_); + } + } + } + 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: + { + totalAttempts_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + backoffMode_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + phaseId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + jobId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.cloud.deploy.v1.RetryAttempt m = + input.readMessage( + com.google.cloud.deploy.v1.RetryAttempt.parser(), extensionRegistry); + if (attemptsBuilder_ == null) { + ensureAttemptsIsMutable(); + attempts_.add(m); + } else { + attemptsBuilder_.addMessage(m); + } + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long totalAttempts_; + /** + * + * + *
+     * Output only. The number of attempts that have been made.
+     * 
+ * + * int64 total_attempts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The totalAttempts. + */ + @java.lang.Override + public long getTotalAttempts() { + return totalAttempts_; + } + /** + * + * + *
+     * Output only. The number of attempts that have been made.
+     * 
+ * + * int64 total_attempts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The totalAttempts to set. + * @return This builder for chaining. + */ + public Builder setTotalAttempts(long value) { + + totalAttempts_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of attempts that have been made.
+     * 
+ * + * int64 total_attempts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTotalAttempts() { + bitField0_ = (bitField0_ & ~0x00000001); + totalAttempts_ = 0L; + onChanged(); + return this; + } + + private int backoffMode_ = 0; + /** + * + * + *
+     * Output only. The pattern of how the wait time of the retry attempt is
+     * calculated.
+     * 
+ * + * + * .google.cloud.deploy.v1.BackoffMode backoff_mode = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for backoffMode. + */ + @java.lang.Override + public int getBackoffModeValue() { + return backoffMode_; + } + /** + * + * + *
+     * Output only. The pattern of how the wait time of the retry attempt is
+     * calculated.
+     * 
+ * + * + * .google.cloud.deploy.v1.BackoffMode backoff_mode = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for backoffMode to set. + * @return This builder for chaining. + */ + public Builder setBackoffModeValue(int value) { + backoffMode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The pattern of how the wait time of the retry attempt is
+     * calculated.
+     * 
+ * + * + * .google.cloud.deploy.v1.BackoffMode backoff_mode = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backoffMode. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.BackoffMode getBackoffMode() { + com.google.cloud.deploy.v1.BackoffMode result = + com.google.cloud.deploy.v1.BackoffMode.forNumber(backoffMode_); + return result == null ? com.google.cloud.deploy.v1.BackoffMode.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The pattern of how the wait time of the retry attempt is
+     * calculated.
+     * 
+ * + * + * .google.cloud.deploy.v1.BackoffMode backoff_mode = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The backoffMode to set. + * @return This builder for chaining. + */ + public Builder setBackoffMode(com.google.cloud.deploy.v1.BackoffMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + backoffMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The pattern of how the wait time of the retry attempt is
+     * calculated.
+     * 
+ * + * + * .google.cloud.deploy.v1.BackoffMode backoff_mode = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearBackoffMode() { + bitField0_ = (bitField0_ & ~0x00000002); + backoffMode_ = 0; + onChanged(); + return this; + } + + private java.lang.Object phaseId_ = ""; + /** + * + * + *
+     * Output only. The phase ID of the phase that includes the job being retried.
+     * 
+ * + * 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. The phase ID of the phase that includes the job being retried.
+     * 
+ * + * 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. The phase ID of the phase that includes the job being retried.
+     * 
+ * + * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The phase ID of the phase that includes the job being retried.
+     * 
+ * + * string phase_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPhaseId() { + phaseId_ = getDefaultInstance().getPhaseId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The phase ID of the phase that includes the job being retried.
+     * 
+ * + * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object jobId_ = ""; + /** + * + * + *
+     * Output only. The job ID for the Job to retry.
+     * 
+ * + * 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. The job ID for the Job to retry.
+     * 
+ * + * 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. The job ID for the Job to retry.
+     * 
+ * + * 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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The job ID for the Job to retry.
+     * 
+ * + * string job_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearJobId() { + jobId_ = getDefaultInstance().getJobId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The job ID for the Job to retry.
+     * 
+ * + * 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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.util.List attempts_ = + java.util.Collections.emptyList(); + + private void ensureAttemptsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + attempts_ = new java.util.ArrayList(attempts_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.RetryAttempt, + com.google.cloud.deploy.v1.RetryAttempt.Builder, + com.google.cloud.deploy.v1.RetryAttemptOrBuilder> + attemptsBuilder_; + + /** + * + * + *
+     * Output only. Detail of a retry action.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getAttemptsList() { + if (attemptsBuilder_ == null) { + return java.util.Collections.unmodifiableList(attempts_); + } else { + return attemptsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Detail of a retry action.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getAttemptsCount() { + if (attemptsBuilder_ == null) { + return attempts_.size(); + } else { + return attemptsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Detail of a retry action.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.RetryAttempt getAttempts(int index) { + if (attemptsBuilder_ == null) { + return attempts_.get(index); + } else { + return attemptsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Detail of a retry action.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAttempts(int index, com.google.cloud.deploy.v1.RetryAttempt value) { + if (attemptsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttemptsIsMutable(); + attempts_.set(index, value); + onChanged(); + } else { + attemptsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Detail of a retry action.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAttempts( + int index, com.google.cloud.deploy.v1.RetryAttempt.Builder builderForValue) { + if (attemptsBuilder_ == null) { + ensureAttemptsIsMutable(); + attempts_.set(index, builderForValue.build()); + onChanged(); + } else { + attemptsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Detail of a retry action.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAttempts(com.google.cloud.deploy.v1.RetryAttempt value) { + if (attemptsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttemptsIsMutable(); + attempts_.add(value); + onChanged(); + } else { + attemptsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Detail of a retry action.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAttempts(int index, com.google.cloud.deploy.v1.RetryAttempt value) { + if (attemptsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttemptsIsMutable(); + attempts_.add(index, value); + onChanged(); + } else { + attemptsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Detail of a retry action.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAttempts(com.google.cloud.deploy.v1.RetryAttempt.Builder builderForValue) { + if (attemptsBuilder_ == null) { + ensureAttemptsIsMutable(); + attempts_.add(builderForValue.build()); + onChanged(); + } else { + attemptsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Detail of a retry action.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAttempts( + int index, com.google.cloud.deploy.v1.RetryAttempt.Builder builderForValue) { + if (attemptsBuilder_ == null) { + ensureAttemptsIsMutable(); + attempts_.add(index, builderForValue.build()); + onChanged(); + } else { + attemptsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Detail of a retry action.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllAttempts( + java.lang.Iterable values) { + if (attemptsBuilder_ == null) { + ensureAttemptsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attempts_); + onChanged(); + } else { + attemptsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Detail of a retry action.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAttempts() { + if (attemptsBuilder_ == null) { + attempts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + attemptsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Detail of a retry action.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeAttempts(int index) { + if (attemptsBuilder_ == null) { + ensureAttemptsIsMutable(); + attempts_.remove(index); + onChanged(); + } else { + attemptsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Detail of a retry action.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.RetryAttempt.Builder getAttemptsBuilder(int index) { + return getAttemptsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Detail of a retry action.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.RetryAttemptOrBuilder getAttemptsOrBuilder(int index) { + if (attemptsBuilder_ == null) { + return attempts_.get(index); + } else { + return attemptsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Detail of a retry action.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getAttemptsOrBuilderList() { + if (attemptsBuilder_ != null) { + return attemptsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attempts_); + } + } + /** + * + * + *
+     * Output only. Detail of a retry action.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.RetryAttempt.Builder addAttemptsBuilder() { + return getAttemptsFieldBuilder() + .addBuilder(com.google.cloud.deploy.v1.RetryAttempt.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Detail of a retry action.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.deploy.v1.RetryAttempt.Builder addAttemptsBuilder(int index) { + return getAttemptsFieldBuilder() + .addBuilder(index, com.google.cloud.deploy.v1.RetryAttempt.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Detail of a retry action.
+     * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getAttemptsBuilderList() { + return getAttemptsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.RetryAttempt, + com.google.cloud.deploy.v1.RetryAttempt.Builder, + com.google.cloud.deploy.v1.RetryAttemptOrBuilder> + getAttemptsFieldBuilder() { + if (attemptsBuilder_ == null) { + attemptsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.deploy.v1.RetryAttempt, + com.google.cloud.deploy.v1.RetryAttempt.Builder, + com.google.cloud.deploy.v1.RetryAttemptOrBuilder>( + attempts_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + attempts_ = null; + } + return attemptsBuilder_; + } + + @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.RetryPhase) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.RetryPhase) + private static final com.google.cloud.deploy.v1.RetryPhase DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.RetryPhase(); + } + + public static com.google.cloud.deploy.v1.RetryPhase getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RetryPhase 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.RetryPhase getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryPhaseOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryPhaseOrBuilder.java new file mode 100644 index 000000000000..7fa59272c0f2 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RetryPhaseOrBuilder.java @@ -0,0 +1,181 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 RetryPhaseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.RetryPhase) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The number of attempts that have been made.
+   * 
+ * + * int64 total_attempts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The totalAttempts. + */ + long getTotalAttempts(); + + /** + * + * + *
+   * Output only. The pattern of how the wait time of the retry attempt is
+   * calculated.
+   * 
+ * + * + * .google.cloud.deploy.v1.BackoffMode backoff_mode = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for backoffMode. + */ + int getBackoffModeValue(); + /** + * + * + *
+   * Output only. The pattern of how the wait time of the retry attempt is
+   * calculated.
+   * 
+ * + * + * .google.cloud.deploy.v1.BackoffMode backoff_mode = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The backoffMode. + */ + com.google.cloud.deploy.v1.BackoffMode getBackoffMode(); + + /** + * + * + *
+   * Output only. The phase ID of the phase that includes the job being retried.
+   * 
+ * + * string phase_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The phaseId. + */ + java.lang.String getPhaseId(); + /** + * + * + *
+   * Output only. The phase ID of the phase that includes the job being retried.
+   * 
+ * + * string phase_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for phaseId. + */ + com.google.protobuf.ByteString getPhaseIdBytes(); + + /** + * + * + *
+   * Output only. The job ID for the Job to retry.
+   * 
+ * + * string job_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The jobId. + */ + java.lang.String getJobId(); + /** + * + * + *
+   * Output only. The job ID for the Job to retry.
+   * 
+ * + * string job_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for jobId. + */ + com.google.protobuf.ByteString getJobIdBytes(); + + /** + * + * + *
+   * Output only. Detail of a retry action.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getAttemptsList(); + /** + * + * + *
+   * Output only. Detail of a retry action.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.RetryAttempt getAttempts(int index); + /** + * + * + *
+   * Output only. Detail of a retry action.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getAttemptsCount(); + /** + * + * + *
+   * Output only. Detail of a retry action.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getAttemptsOrBuilderList(); + /** + * + * + *
+   * Output only. Detail of a retry action.
+   * 
+ * + * + * repeated .google.cloud.deploy.v1.RetryAttempt attempts = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.deploy.v1.RetryAttemptOrBuilder getAttemptsOrBuilder(int index); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Rollback.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Rollback.java new file mode 100644 index 000000000000..a75b5f37af30 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Rollback.java @@ -0,0 +1,627 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * Rolls back a `Rollout`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Rollback} + */ +public final class Rollback extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.Rollback) + RollbackOrBuilder { + private static final long serialVersionUID = 0L; + // Use Rollback.newBuilder() to construct. + private Rollback(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Rollback() { + destinationPhase_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Rollback(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Rollback_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Rollback_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Rollback.class, + com.google.cloud.deploy.v1.Rollback.Builder.class); + } + + public static final int DESTINATION_PHASE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object destinationPhase_ = ""; + /** + * + * + *
+   * Optional. The starting phase ID for the `Rollout`. If unspecified, the
+   * `Rollout` will start in the stable phase.
+   * 
+ * + * string destination_phase = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The destinationPhase. + */ + @java.lang.Override + public java.lang.String getDestinationPhase() { + java.lang.Object ref = destinationPhase_; + 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(); + destinationPhase_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The starting phase ID for the `Rollout`. If unspecified, the
+   * `Rollout` will start in the stable phase.
+   * 
+ * + * string destination_phase = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for destinationPhase. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationPhaseBytes() { + java.lang.Object ref = destinationPhase_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationPhase_ = 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(destinationPhase_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destinationPhase_); + } + 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(destinationPhase_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destinationPhase_); + } + 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.Rollback)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.Rollback other = (com.google.cloud.deploy.v1.Rollback) obj; + + if (!getDestinationPhase().equals(other.getDestinationPhase())) 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) + DESTINATION_PHASE_FIELD_NUMBER; + hash = (53 * hash) + getDestinationPhase().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.Rollback parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Rollback 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.Rollback parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Rollback 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.Rollback parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.Rollback 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.Rollback parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Rollback 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.Rollback parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.Rollback 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.Rollback 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.Rollback 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.Rollback 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; + } + /** + * + * + *
+   * Rolls back a `Rollout`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.Rollback} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.Rollback) + com.google.cloud.deploy.v1.RollbackOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Rollback_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_Rollback_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.Rollback.class, + com.google.cloud.deploy.v1.Rollback.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.Rollback.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + destinationPhase_ = ""; + 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_Rollback_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Rollback getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.Rollback.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Rollback build() { + com.google.cloud.deploy.v1.Rollback result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.Rollback buildPartial() { + com.google.cloud.deploy.v1.Rollback result = new com.google.cloud.deploy.v1.Rollback(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.Rollback result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.destinationPhase_ = destinationPhase_; + } + } + + @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.Rollback) { + return mergeFrom((com.google.cloud.deploy.v1.Rollback) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.Rollback other) { + if (other == com.google.cloud.deploy.v1.Rollback.getDefaultInstance()) return this; + if (!other.getDestinationPhase().isEmpty()) { + destinationPhase_ = other.destinationPhase_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + destinationPhase_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object destinationPhase_ = ""; + /** + * + * + *
+     * Optional. The starting phase ID for the `Rollout`. If unspecified, the
+     * `Rollout` will start in the stable phase.
+     * 
+ * + * string destination_phase = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The destinationPhase. + */ + public java.lang.String getDestinationPhase() { + java.lang.Object ref = destinationPhase_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationPhase_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The starting phase ID for the `Rollout`. If unspecified, the
+     * `Rollout` will start in the stable phase.
+     * 
+ * + * string destination_phase = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for destinationPhase. + */ + public com.google.protobuf.ByteString getDestinationPhaseBytes() { + java.lang.Object ref = destinationPhase_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationPhase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The starting phase ID for the `Rollout`. If unspecified, the
+     * `Rollout` will start in the stable phase.
+     * 
+ * + * string destination_phase = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The destinationPhase to set. + * @return This builder for chaining. + */ + public Builder setDestinationPhase(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationPhase_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The starting phase ID for the `Rollout`. If unspecified, the
+     * `Rollout` will start in the stable phase.
+     * 
+ * + * string destination_phase = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDestinationPhase() { + destinationPhase_ = getDefaultInstance().getDestinationPhase(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The starting phase ID for the `Rollout`. If unspecified, the
+     * `Rollout` will start in the stable phase.
+     * 
+ * + * string destination_phase = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for destinationPhase to set. + * @return This builder for chaining. + */ + public Builder setDestinationPhaseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationPhase_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.Rollback) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.Rollback) + private static final com.google.cloud.deploy.v1.Rollback DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.Rollback(); + } + + public static com.google.cloud.deploy.v1.Rollback getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Rollback 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.Rollback getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackAttempt.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackAttempt.java new file mode 100644 index 000000000000..e7894ceb7836 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackAttempt.java @@ -0,0 +1,1149 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * RollbackAttempt represents an action of rolling back a Cloud Deploy 'Target'.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RollbackAttempt} + */ +public final class RollbackAttempt extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.RollbackAttempt) + RollbackAttemptOrBuilder { + private static final long serialVersionUID = 0L; + // Use RollbackAttempt.newBuilder() to construct. + private RollbackAttempt(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RollbackAttempt() { + destinationPhase_ = ""; + rolloutId_ = ""; + state_ = 0; + stateDesc_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RollbackAttempt(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RollbackAttempt_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RollbackAttempt_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RollbackAttempt.class, + com.google.cloud.deploy.v1.RollbackAttempt.Builder.class); + } + + public static final int DESTINATION_PHASE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object destinationPhase_ = ""; + /** + * + * + *
+   * Output only. The phase to which the rollout will be rolled back to.
+   * 
+ * + * string destination_phase = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The destinationPhase. + */ + @java.lang.Override + public java.lang.String getDestinationPhase() { + java.lang.Object ref = destinationPhase_; + 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(); + destinationPhase_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The phase to which the rollout will be rolled back to.
+   * 
+ * + * string destination_phase = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for destinationPhase. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationPhaseBytes() { + java.lang.Object ref = destinationPhase_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationPhase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROLLOUT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object rolloutId_ = ""; + /** + * + * + *
+   * Output only. ID of the rollback `Rollout` to create.
+   * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The rolloutId. + */ + @java.lang.Override + public java.lang.String getRolloutId() { + java.lang.Object ref = rolloutId_; + 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(); + rolloutId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. ID of the rollback `Rollout` to create.
+   * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for rolloutId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRolloutIdBytes() { + java.lang.Object ref = rolloutId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rolloutId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_ = 0; + /** + * + * + *
+   * Output only. Valid state of this rollback action.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairState 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. Valid state of this rollback action.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairState state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RepairState getState() { + com.google.cloud.deploy.v1.RepairState result = + com.google.cloud.deploy.v1.RepairState.forNumber(state_); + return result == null ? com.google.cloud.deploy.v1.RepairState.UNRECOGNIZED : result; + } + + public static final int STATE_DESC_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object stateDesc_ = ""; + /** + * + * + *
+   * Output only. Description of the state of the Rollback.
+   * 
+ * + * string state_desc = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateDesc. + */ + @java.lang.Override + public java.lang.String getStateDesc() { + java.lang.Object ref = stateDesc_; + 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(); + stateDesc_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Description of the state of the Rollback.
+   * 
+ * + * string state_desc = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateDesc. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStateDescBytes() { + java.lang.Object ref = stateDesc_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stateDesc_ = 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(destinationPhase_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destinationPhase_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rolloutId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, rolloutId_); + } + if (state_ != com.google.cloud.deploy.v1.RepairState.REPAIR_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateDesc_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, stateDesc_); + } + 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(destinationPhase_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destinationPhase_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rolloutId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, rolloutId_); + } + if (state_ != com.google.cloud.deploy.v1.RepairState.REPAIR_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateDesc_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, stateDesc_); + } + 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.RollbackAttempt)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.RollbackAttempt other = + (com.google.cloud.deploy.v1.RollbackAttempt) obj; + + if (!getDestinationPhase().equals(other.getDestinationPhase())) return false; + if (!getRolloutId().equals(other.getRolloutId())) return false; + if (state_ != other.state_) return false; + if (!getStateDesc().equals(other.getStateDesc())) 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) + DESTINATION_PHASE_FIELD_NUMBER; + hash = (53 * hash) + getDestinationPhase().hashCode(); + hash = (37 * hash) + ROLLOUT_ID_FIELD_NUMBER; + hash = (53 * hash) + getRolloutId().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + STATE_DESC_FIELD_NUMBER; + hash = (53 * hash) + getStateDesc().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.RollbackAttempt parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RollbackAttempt 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.RollbackAttempt parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RollbackAttempt 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.RollbackAttempt parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RollbackAttempt 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.RollbackAttempt parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RollbackAttempt 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.RollbackAttempt parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RollbackAttempt 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.RollbackAttempt 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.RollbackAttempt 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.RollbackAttempt 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; + } + /** + * + * + *
+   * RollbackAttempt represents an action of rolling back a Cloud Deploy 'Target'.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RollbackAttempt} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.RollbackAttempt) + com.google.cloud.deploy.v1.RollbackAttemptOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RollbackAttempt_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RollbackAttempt_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RollbackAttempt.class, + com.google.cloud.deploy.v1.RollbackAttempt.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.RollbackAttempt.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + destinationPhase_ = ""; + rolloutId_ = ""; + state_ = 0; + stateDesc_ = ""; + 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_RollbackAttempt_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackAttempt getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.RollbackAttempt.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackAttempt build() { + com.google.cloud.deploy.v1.RollbackAttempt result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackAttempt buildPartial() { + com.google.cloud.deploy.v1.RollbackAttempt result = + new com.google.cloud.deploy.v1.RollbackAttempt(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.RollbackAttempt result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.destinationPhase_ = destinationPhase_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rolloutId_ = rolloutId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.stateDesc_ = stateDesc_; + } + } + + @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.RollbackAttempt) { + return mergeFrom((com.google.cloud.deploy.v1.RollbackAttempt) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.RollbackAttempt other) { + if (other == com.google.cloud.deploy.v1.RollbackAttempt.getDefaultInstance()) return this; + if (!other.getDestinationPhase().isEmpty()) { + destinationPhase_ = other.destinationPhase_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRolloutId().isEmpty()) { + rolloutId_ = other.rolloutId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getStateDesc().isEmpty()) { + stateDesc_ = other.stateDesc_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + destinationPhase_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + rolloutId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + stateDesc_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object destinationPhase_ = ""; + /** + * + * + *
+     * Output only. The phase to which the rollout will be rolled back to.
+     * 
+ * + * string destination_phase = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The destinationPhase. + */ + public java.lang.String getDestinationPhase() { + java.lang.Object ref = destinationPhase_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationPhase_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The phase to which the rollout will be rolled back to.
+     * 
+ * + * string destination_phase = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for destinationPhase. + */ + public com.google.protobuf.ByteString getDestinationPhaseBytes() { + java.lang.Object ref = destinationPhase_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationPhase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The phase to which the rollout will be rolled back to.
+     * 
+ * + * string destination_phase = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The destinationPhase to set. + * @return This builder for chaining. + */ + public Builder setDestinationPhase(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationPhase_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The phase to which the rollout will be rolled back to.
+     * 
+ * + * string destination_phase = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDestinationPhase() { + destinationPhase_ = getDefaultInstance().getDestinationPhase(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The phase to which the rollout will be rolled back to.
+     * 
+ * + * string destination_phase = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for destinationPhase to set. + * @return This builder for chaining. + */ + public Builder setDestinationPhaseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationPhase_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object rolloutId_ = ""; + /** + * + * + *
+     * Output only. ID of the rollback `Rollout` to create.
+     * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The rolloutId. + */ + public java.lang.String getRolloutId() { + java.lang.Object ref = rolloutId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rolloutId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. ID of the rollback `Rollout` to create.
+     * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for rolloutId. + */ + public com.google.protobuf.ByteString getRolloutIdBytes() { + java.lang.Object ref = rolloutId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rolloutId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. ID of the rollback `Rollout` to create.
+     * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The rolloutId to set. + * @return This builder for chaining. + */ + public Builder setRolloutId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + rolloutId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. ID of the rollback `Rollout` to create.
+     * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRolloutId() { + rolloutId_ = getDefaultInstance().getRolloutId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. ID of the rollback `Rollout` to create.
+     * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for rolloutId to set. + * @return This builder for chaining. + */ + public Builder setRolloutIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + rolloutId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. Valid state of this rollback action.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairState 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. Valid state of this rollback action.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairState 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Valid state of this rollback action.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairState state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RepairState getState() { + com.google.cloud.deploy.v1.RepairState result = + com.google.cloud.deploy.v1.RepairState.forNumber(state_); + return result == null ? com.google.cloud.deploy.v1.RepairState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Valid state of this rollback action.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairState 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.RepairState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Valid state of this rollback action.
+     * 
+ * + * + * .google.cloud.deploy.v1.RepairState state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000004); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object stateDesc_ = ""; + /** + * + * + *
+     * Output only. Description of the state of the Rollback.
+     * 
+ * + * string state_desc = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateDesc. + */ + public java.lang.String getStateDesc() { + java.lang.Object ref = stateDesc_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateDesc_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Description of the state of the Rollback.
+     * 
+ * + * string state_desc = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateDesc. + */ + public com.google.protobuf.ByteString getStateDescBytes() { + java.lang.Object ref = stateDesc_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + stateDesc_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Description of the state of the Rollback.
+     * 
+ * + * string state_desc = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The stateDesc to set. + * @return This builder for chaining. + */ + public Builder setStateDesc(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + stateDesc_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Description of the state of the Rollback.
+     * 
+ * + * string state_desc = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStateDesc() { + stateDesc_ = getDefaultInstance().getStateDesc(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Description of the state of the Rollback.
+     * 
+ * + * string state_desc = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for stateDesc to set. + * @return This builder for chaining. + */ + public Builder setStateDescBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + stateDesc_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.RollbackAttempt) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.RollbackAttempt) + private static final com.google.cloud.deploy.v1.RollbackAttempt DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.RollbackAttempt(); + } + + public static com.google.cloud.deploy.v1.RollbackAttempt getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RollbackAttempt 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.RollbackAttempt getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackAttemptOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackAttemptOrBuilder.java new file mode 100644 index 000000000000..b065ea629ad7 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackAttemptOrBuilder.java @@ -0,0 +1,129 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 RollbackAttemptOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.RollbackAttempt) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The phase to which the rollout will be rolled back to.
+   * 
+ * + * string destination_phase = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The destinationPhase. + */ + java.lang.String getDestinationPhase(); + /** + * + * + *
+   * Output only. The phase to which the rollout will be rolled back to.
+   * 
+ * + * string destination_phase = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for destinationPhase. + */ + com.google.protobuf.ByteString getDestinationPhaseBytes(); + + /** + * + * + *
+   * Output only. ID of the rollback `Rollout` to create.
+   * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The rolloutId. + */ + java.lang.String getRolloutId(); + /** + * + * + *
+   * Output only. ID of the rollback `Rollout` to create.
+   * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for rolloutId. + */ + com.google.protobuf.ByteString getRolloutIdBytes(); + + /** + * + * + *
+   * Output only. Valid state of this rollback action.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairState state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. Valid state of this rollback action.
+   * 
+ * + * + * .google.cloud.deploy.v1.RepairState state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.deploy.v1.RepairState getState(); + + /** + * + * + *
+   * Output only. Description of the state of the Rollback.
+   * 
+ * + * string state_desc = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The stateDesc. + */ + java.lang.String getStateDesc(); + /** + * + * + *
+   * Output only. Description of the state of the Rollback.
+   * 
+ * + * string state_desc = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for stateDesc. + */ + com.google.protobuf.ByteString getStateDescBytes(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackOrBuilder.java new file mode 100644 index 000000000000..7f28a4d2d885 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 RollbackOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.Rollback) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The starting phase ID for the `Rollout`. If unspecified, the
+   * `Rollout` will start in the stable phase.
+   * 
+ * + * string destination_phase = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The destinationPhase. + */ + java.lang.String getDestinationPhase(); + /** + * + * + *
+   * Optional. The starting phase ID for the `Rollout`. If unspecified, the
+   * `Rollout` will start in the stable phase.
+   * 
+ * + * string destination_phase = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for destinationPhase. + */ + com.google.protobuf.ByteString getDestinationPhaseBytes(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackTargetConfig.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackTargetConfig.java new file mode 100644 index 000000000000..ce568a2fb737 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackTargetConfig.java @@ -0,0 +1,903 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * Configs for the Rollback rollout.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RollbackTargetConfig} + */ +public final class RollbackTargetConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.RollbackTargetConfig) + RollbackTargetConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use RollbackTargetConfig.newBuilder() to construct. + private RollbackTargetConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RollbackTargetConfig() { + startingPhaseId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RollbackTargetConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RollbackTargetConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RollbackTargetConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RollbackTargetConfig.class, + com.google.cloud.deploy.v1.RollbackTargetConfig.Builder.class); + } + + public static final int ROLLOUT_FIELD_NUMBER = 1; + private com.google.cloud.deploy.v1.Rollout rollout_; + /** + * + * + *
+   * Optional. The rollback `Rollout` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rollout field is set. + */ + @java.lang.Override + public boolean hasRollout() { + return rollout_ != null; + } + /** + * + * + *
+   * Optional. The rollback `Rollout` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rollout. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Rollout getRollout() { + return rollout_ == null ? com.google.cloud.deploy.v1.Rollout.getDefaultInstance() : rollout_; + } + /** + * + * + *
+   * Optional. The rollback `Rollout` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RolloutOrBuilder getRolloutOrBuilder() { + return rollout_ == null ? com.google.cloud.deploy.v1.Rollout.getDefaultInstance() : rollout_; + } + + public static final int STARTING_PHASE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object startingPhaseId_ = ""; + /** + * + * + *
+   * Optional. The starting phase ID for the `Rollout`. If unspecified, the
+   * `Rollout` will start in the stable phase.
+   * 
+ * + * string starting_phase_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The startingPhaseId. + */ + @java.lang.Override + public java.lang.String getStartingPhaseId() { + java.lang.Object ref = startingPhaseId_; + 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(); + startingPhaseId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The starting phase ID for the `Rollout`. If unspecified, the
+   * `Rollout` will start in the stable phase.
+   * 
+ * + * string starting_phase_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for startingPhaseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStartingPhaseIdBytes() { + java.lang.Object ref = startingPhaseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + startingPhaseId_ = 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 (rollout_ != null) { + output.writeMessage(1, getRollout()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startingPhaseId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, startingPhaseId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rollout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRollout()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startingPhaseId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, startingPhaseId_); + } + 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.RollbackTargetConfig)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.RollbackTargetConfig other = + (com.google.cloud.deploy.v1.RollbackTargetConfig) obj; + + if (hasRollout() != other.hasRollout()) return false; + if (hasRollout()) { + if (!getRollout().equals(other.getRollout())) return false; + } + if (!getStartingPhaseId().equals(other.getStartingPhaseId())) 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 (hasRollout()) { + hash = (37 * hash) + ROLLOUT_FIELD_NUMBER; + hash = (53 * hash) + getRollout().hashCode(); + } + hash = (37 * hash) + STARTING_PHASE_ID_FIELD_NUMBER; + hash = (53 * hash) + getStartingPhaseId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.RollbackTargetConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RollbackTargetConfig 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.RollbackTargetConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RollbackTargetConfig 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.RollbackTargetConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RollbackTargetConfig 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.RollbackTargetConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RollbackTargetConfig 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.RollbackTargetConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RollbackTargetConfig 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.RollbackTargetConfig 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.RollbackTargetConfig 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.RollbackTargetConfig 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; + } + /** + * + * + *
+   * Configs for the Rollback rollout.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RollbackTargetConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.RollbackTargetConfig) + com.google.cloud.deploy.v1.RollbackTargetConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RollbackTargetConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RollbackTargetConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RollbackTargetConfig.class, + com.google.cloud.deploy.v1.RollbackTargetConfig.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.RollbackTargetConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rollout_ = null; + if (rolloutBuilder_ != null) { + rolloutBuilder_.dispose(); + rolloutBuilder_ = null; + } + startingPhaseId_ = ""; + 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_RollbackTargetConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackTargetConfig getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.RollbackTargetConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackTargetConfig build() { + com.google.cloud.deploy.v1.RollbackTargetConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackTargetConfig buildPartial() { + com.google.cloud.deploy.v1.RollbackTargetConfig result = + new com.google.cloud.deploy.v1.RollbackTargetConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.RollbackTargetConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rollout_ = rolloutBuilder_ == null ? rollout_ : rolloutBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.startingPhaseId_ = startingPhaseId_; + } + } + + @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.RollbackTargetConfig) { + return mergeFrom((com.google.cloud.deploy.v1.RollbackTargetConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.RollbackTargetConfig other) { + if (other == com.google.cloud.deploy.v1.RollbackTargetConfig.getDefaultInstance()) + return this; + if (other.hasRollout()) { + mergeRollout(other.getRollout()); + } + if (!other.getStartingPhaseId().isEmpty()) { + startingPhaseId_ = other.startingPhaseId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getRolloutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + startingPhaseId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.deploy.v1.Rollout rollout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Rollout, + com.google.cloud.deploy.v1.Rollout.Builder, + com.google.cloud.deploy.v1.RolloutOrBuilder> + rolloutBuilder_; + /** + * + * + *
+     * Optional. The rollback `Rollout` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rollout field is set. + */ + public boolean hasRollout() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The rollback `Rollout` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rollout. + */ + public com.google.cloud.deploy.v1.Rollout getRollout() { + if (rolloutBuilder_ == null) { + return rollout_ == null + ? com.google.cloud.deploy.v1.Rollout.getDefaultInstance() + : rollout_; + } else { + return rolloutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The rollback `Rollout` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRollout(com.google.cloud.deploy.v1.Rollout value) { + if (rolloutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rollout_ = value; + } else { + rolloutBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The rollback `Rollout` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRollout(com.google.cloud.deploy.v1.Rollout.Builder builderForValue) { + if (rolloutBuilder_ == null) { + rollout_ = builderForValue.build(); + } else { + rolloutBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The rollback `Rollout` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRollout(com.google.cloud.deploy.v1.Rollout value) { + if (rolloutBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && rollout_ != null + && rollout_ != com.google.cloud.deploy.v1.Rollout.getDefaultInstance()) { + getRolloutBuilder().mergeFrom(value); + } else { + rollout_ = value; + } + } else { + rolloutBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The rollback `Rollout` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRollout() { + bitField0_ = (bitField0_ & ~0x00000001); + rollout_ = null; + if (rolloutBuilder_ != null) { + rolloutBuilder_.dispose(); + rolloutBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The rollback `Rollout` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.deploy.v1.Rollout.Builder getRolloutBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRolloutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The rollback `Rollout` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.deploy.v1.RolloutOrBuilder getRolloutOrBuilder() { + if (rolloutBuilder_ != null) { + return rolloutBuilder_.getMessageOrBuilder(); + } else { + return rollout_ == null + ? com.google.cloud.deploy.v1.Rollout.getDefaultInstance() + : rollout_; + } + } + /** + * + * + *
+     * Optional. The rollback `Rollout` to create.
+     * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Rollout, + com.google.cloud.deploy.v1.Rollout.Builder, + com.google.cloud.deploy.v1.RolloutOrBuilder> + getRolloutFieldBuilder() { + if (rolloutBuilder_ == null) { + rolloutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Rollout, + com.google.cloud.deploy.v1.Rollout.Builder, + com.google.cloud.deploy.v1.RolloutOrBuilder>( + getRollout(), getParentForChildren(), isClean()); + rollout_ = null; + } + return rolloutBuilder_; + } + + private java.lang.Object startingPhaseId_ = ""; + /** + * + * + *
+     * Optional. The starting phase ID for the `Rollout`. If unspecified, the
+     * `Rollout` will start in the stable phase.
+     * 
+ * + * string starting_phase_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The startingPhaseId. + */ + public java.lang.String getStartingPhaseId() { + java.lang.Object ref = startingPhaseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + startingPhaseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The starting phase ID for the `Rollout`. If unspecified, the
+     * `Rollout` will start in the stable phase.
+     * 
+ * + * string starting_phase_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for startingPhaseId. + */ + public com.google.protobuf.ByteString getStartingPhaseIdBytes() { + java.lang.Object ref = startingPhaseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + startingPhaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The starting phase ID for the `Rollout`. If unspecified, the
+     * `Rollout` will start in the stable phase.
+     * 
+ * + * string starting_phase_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The startingPhaseId to set. + * @return This builder for chaining. + */ + public Builder setStartingPhaseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + startingPhaseId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The starting phase ID for the `Rollout`. If unspecified, the
+     * `Rollout` will start in the stable phase.
+     * 
+ * + * string starting_phase_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearStartingPhaseId() { + startingPhaseId_ = getDefaultInstance().getStartingPhaseId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The starting phase ID for the `Rollout`. If unspecified, the
+     * `Rollout` will start in the stable phase.
+     * 
+ * + * string starting_phase_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for startingPhaseId to set. + * @return This builder for chaining. + */ + public Builder setStartingPhaseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + startingPhaseId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.RollbackTargetConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.RollbackTargetConfig) + private static final com.google.cloud.deploy.v1.RollbackTargetConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.RollbackTargetConfig(); + } + + public static com.google.cloud.deploy.v1.RollbackTargetConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RollbackTargetConfig 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.RollbackTargetConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackTargetConfigOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackTargetConfigOrBuilder.java new file mode 100644 index 000000000000..f2a2b0cf4448 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackTargetConfigOrBuilder.java @@ -0,0 +1,90 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 RollbackTargetConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.RollbackTargetConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The rollback `Rollout` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rollout field is set. + */ + boolean hasRollout(); + /** + * + * + *
+   * Optional. The rollback `Rollout` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rollout. + */ + com.google.cloud.deploy.v1.Rollout getRollout(); + /** + * + * + *
+   * Optional. The rollback `Rollout` to create.
+   * 
+ * + * .google.cloud.deploy.v1.Rollout rollout = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.deploy.v1.RolloutOrBuilder getRolloutOrBuilder(); + + /** + * + * + *
+   * Optional. The starting phase ID for the `Rollout`. If unspecified, the
+   * `Rollout` will start in the stable phase.
+   * 
+ * + * string starting_phase_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The startingPhaseId. + */ + java.lang.String getStartingPhaseId(); + /** + * + * + *
+   * Optional. The starting phase ID for the `Rollout`. If unspecified, the
+   * `Rollout` will start in the stable phase.
+   * 
+ * + * string starting_phase_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for startingPhaseId. + */ + com.google.protobuf.ByteString getStartingPhaseIdBytes(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackTargetRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackTargetRequest.java new file mode 100644 index 000000000000..208e764119dc --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackTargetRequest.java @@ -0,0 +1,1789 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 for `RollbackTarget`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RollbackTargetRequest} + */ +public final class RollbackTargetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.RollbackTargetRequest) + RollbackTargetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RollbackTargetRequest.newBuilder() to construct. + private RollbackTargetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RollbackTargetRequest() { + name_ = ""; + targetId_ = ""; + rolloutId_ = ""; + releaseId_ = ""; + rolloutToRollBack_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RollbackTargetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RollbackTargetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RollbackTargetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RollbackTargetRequest.class, + com.google.cloud.deploy.v1.RollbackTargetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The `DeliveryPipeline` for which the rollback `Rollout` should be
+   * created. Format should be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_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. The `DeliveryPipeline` for which the rollback `Rollout` should be
+   * created. Format should be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_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; + } + } + + public static final int TARGET_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object targetId_ = ""; + /** + * + * + *
+   * Required. ID of the `Target` that is being rolled back.
+   * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. ID of the `Target` that is being rolled back.
+   * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 ROLLOUT_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object rolloutId_ = ""; + /** + * + * + *
+   * Required. ID of the rollback `Rollout` to create.
+   * 
+ * + * string rollout_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The rolloutId. + */ + @java.lang.Override + public java.lang.String getRolloutId() { + java.lang.Object ref = rolloutId_; + 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(); + rolloutId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. ID of the rollback `Rollout` to create.
+   * 
+ * + * string rollout_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for rolloutId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRolloutIdBytes() { + java.lang.Object ref = rolloutId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rolloutId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELEASE_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object releaseId_ = ""; + /** + * + * + *
+   * Optional. ID of the `Release` to roll back to. If this isn't specified, the
+   * previous successful `Rollout` to the specified target will be used to
+   * determine the `Release`.
+   * 
+ * + * string release_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The releaseId. + */ + @java.lang.Override + public java.lang.String getReleaseId() { + java.lang.Object ref = releaseId_; + 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(); + releaseId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. ID of the `Release` to roll back to. If this isn't specified, the
+   * previous successful `Rollout` to the specified target will be used to
+   * determine the `Release`.
+   * 
+ * + * string release_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for releaseId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReleaseIdBytes() { + java.lang.Object ref = releaseId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + releaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROLLOUT_TO_ROLL_BACK_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object rolloutToRollBack_ = ""; + /** + * + * + *
+   * Optional. If provided, this must be the latest `Rollout` that is on the
+   * `Target`.
+   * 
+ * + * string rollout_to_roll_back = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rolloutToRollBack. + */ + @java.lang.Override + public java.lang.String getRolloutToRollBack() { + java.lang.Object ref = rolloutToRollBack_; + 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(); + rolloutToRollBack_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. If provided, this must be the latest `Rollout` that is on the
+   * `Target`.
+   * 
+ * + * string rollout_to_roll_back = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rolloutToRollBack. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRolloutToRollBackBytes() { + java.lang.Object ref = rolloutToRollBack_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rolloutToRollBack_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROLLBACK_CONFIG_FIELD_NUMBER = 6; + private com.google.cloud.deploy.v1.RollbackTargetConfig rollbackConfig_; + /** + * + * + *
+   * Optional. Configs for the rollback `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rollbackConfig field is set. + */ + @java.lang.Override + public boolean hasRollbackConfig() { + return rollbackConfig_ != null; + } + /** + * + * + *
+   * Optional. Configs for the rollback `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rollbackConfig. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackTargetConfig getRollbackConfig() { + return rollbackConfig_ == null + ? com.google.cloud.deploy.v1.RollbackTargetConfig.getDefaultInstance() + : rollbackConfig_; + } + /** + * + * + *
+   * Optional. Configs for the rollback `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackTargetConfigOrBuilder getRollbackConfigOrBuilder() { + return rollbackConfig_ == null + ? com.google.cloud.deploy.v1.RollbackTargetConfig.getDefaultInstance() + : rollbackConfig_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 7; + private boolean validateOnly_ = false; + /** + * + * + *
+   * Optional. If set to true, the request is validated and the user is provided
+   * with a `RollbackTargetResponse`.
+   * 
+ * + * bool validate_only = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rolloutId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, rolloutId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(releaseId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, releaseId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rolloutToRollBack_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, rolloutToRollBack_); + } + if (rollbackConfig_ != null) { + output.writeMessage(6, getRollbackConfig()); + } + if (validateOnly_ != false) { + output.writeBool(7, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rolloutId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, rolloutId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(releaseId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, releaseId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rolloutToRollBack_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, rolloutToRollBack_); + } + if (rollbackConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getRollbackConfig()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, validateOnly_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.RollbackTargetRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.RollbackTargetRequest other = + (com.google.cloud.deploy.v1.RollbackTargetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getTargetId().equals(other.getTargetId())) return false; + if (!getRolloutId().equals(other.getRolloutId())) return false; + if (!getReleaseId().equals(other.getReleaseId())) return false; + if (!getRolloutToRollBack().equals(other.getRolloutToRollBack())) return false; + if (hasRollbackConfig() != other.hasRollbackConfig()) return false; + if (hasRollbackConfig()) { + if (!getRollbackConfig().equals(other.getRollbackConfig())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TARGET_ID_FIELD_NUMBER; + hash = (53 * hash) + getTargetId().hashCode(); + hash = (37 * hash) + ROLLOUT_ID_FIELD_NUMBER; + hash = (53 * hash) + getRolloutId().hashCode(); + hash = (37 * hash) + RELEASE_ID_FIELD_NUMBER; + hash = (53 * hash) + getReleaseId().hashCode(); + hash = (37 * hash) + ROLLOUT_TO_ROLL_BACK_FIELD_NUMBER; + hash = (53 * hash) + getRolloutToRollBack().hashCode(); + if (hasRollbackConfig()) { + hash = (37 * hash) + ROLLBACK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getRollbackConfig().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.RollbackTargetRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RollbackTargetRequest 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.RollbackTargetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RollbackTargetRequest 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.RollbackTargetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RollbackTargetRequest 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.RollbackTargetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RollbackTargetRequest 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.RollbackTargetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RollbackTargetRequest 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.RollbackTargetRequest 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.RollbackTargetRequest 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.RollbackTargetRequest 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 for `RollbackTarget`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RollbackTargetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.RollbackTargetRequest) + com.google.cloud.deploy.v1.RollbackTargetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RollbackTargetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RollbackTargetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RollbackTargetRequest.class, + com.google.cloud.deploy.v1.RollbackTargetRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.RollbackTargetRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + targetId_ = ""; + rolloutId_ = ""; + releaseId_ = ""; + rolloutToRollBack_ = ""; + rollbackConfig_ = null; + if (rollbackConfigBuilder_ != null) { + rollbackConfigBuilder_.dispose(); + rollbackConfigBuilder_ = null; + } + validateOnly_ = 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_RollbackTargetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackTargetRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.RollbackTargetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackTargetRequest build() { + com.google.cloud.deploy.v1.RollbackTargetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackTargetRequest buildPartial() { + com.google.cloud.deploy.v1.RollbackTargetRequest result = + new com.google.cloud.deploy.v1.RollbackTargetRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.RollbackTargetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.targetId_ = targetId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.rolloutId_ = rolloutId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.releaseId_ = releaseId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.rolloutToRollBack_ = rolloutToRollBack_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.rollbackConfig_ = + rollbackConfigBuilder_ == null ? rollbackConfig_ : rollbackConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.validateOnly_ = validateOnly_; + } + } + + @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.RollbackTargetRequest) { + return mergeFrom((com.google.cloud.deploy.v1.RollbackTargetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.RollbackTargetRequest other) { + if (other == com.google.cloud.deploy.v1.RollbackTargetRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTargetId().isEmpty()) { + targetId_ = other.targetId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRolloutId().isEmpty()) { + rolloutId_ = other.rolloutId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getReleaseId().isEmpty()) { + releaseId_ = other.releaseId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getRolloutToRollBack().isEmpty()) { + rolloutToRollBack_ = other.rolloutToRollBack_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasRollbackConfig()) { + mergeRollbackConfig(other.getRollbackConfig()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + targetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + rolloutId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + releaseId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + rolloutToRollBack_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage(getRollbackConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000040; + 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 int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The `DeliveryPipeline` for which the rollback `Rollout` should be
+     * created. Format should be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_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. The `DeliveryPipeline` for which the rollback `Rollout` should be
+     * created. Format should be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_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. The `DeliveryPipeline` for which the rollback `Rollout` should be
+     * created. Format should be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `DeliveryPipeline` for which the rollback `Rollout` should be
+     * created. Format should be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `DeliveryPipeline` for which the rollback `Rollout` should be
+     * created. Format should be
+     * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object targetId_ = ""; + /** + * + * + *
+     * Required. ID of the `Target` that is being rolled back.
+     * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. ID of the `Target` that is being rolled back.
+     * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. ID of the `Target` that is being rolled back.
+     * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the `Target` that is being rolled back.
+     * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTargetId() { + targetId_ = getDefaultInstance().getTargetId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the `Target` that is being rolled back.
+     * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object rolloutId_ = ""; + /** + * + * + *
+     * Required. ID of the rollback `Rollout` to create.
+     * 
+ * + * string rollout_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The rolloutId. + */ + public java.lang.String getRolloutId() { + java.lang.Object ref = rolloutId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rolloutId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. ID of the rollback `Rollout` to create.
+     * 
+ * + * string rollout_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for rolloutId. + */ + public com.google.protobuf.ByteString getRolloutIdBytes() { + java.lang.Object ref = rolloutId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rolloutId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. ID of the rollback `Rollout` to create.
+     * 
+ * + * string rollout_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The rolloutId to set. + * @return This builder for chaining. + */ + public Builder setRolloutId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + rolloutId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the rollback `Rollout` to create.
+     * 
+ * + * string rollout_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRolloutId() { + rolloutId_ = getDefaultInstance().getRolloutId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. ID of the rollback `Rollout` to create.
+     * 
+ * + * string rollout_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for rolloutId to set. + * @return This builder for chaining. + */ + public Builder setRolloutIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + rolloutId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object releaseId_ = ""; + /** + * + * + *
+     * Optional. ID of the `Release` to roll back to. If this isn't specified, the
+     * previous successful `Rollout` to the specified target will be used to
+     * determine the `Release`.
+     * 
+ * + * string release_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The releaseId. + */ + public java.lang.String getReleaseId() { + java.lang.Object ref = releaseId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + releaseId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. ID of the `Release` to roll back to. If this isn't specified, the
+     * previous successful `Rollout` to the specified target will be used to
+     * determine the `Release`.
+     * 
+ * + * string release_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for releaseId. + */ + public com.google.protobuf.ByteString getReleaseIdBytes() { + java.lang.Object ref = releaseId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + releaseId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. ID of the `Release` to roll back to. If this isn't specified, the
+     * previous successful `Rollout` to the specified target will be used to
+     * determine the `Release`.
+     * 
+ * + * string release_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The releaseId to set. + * @return This builder for chaining. + */ + public Builder setReleaseId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + releaseId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. ID of the `Release` to roll back to. If this isn't specified, the
+     * previous successful `Rollout` to the specified target will be used to
+     * determine the `Release`.
+     * 
+ * + * string release_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReleaseId() { + releaseId_ = getDefaultInstance().getReleaseId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. ID of the `Release` to roll back to. If this isn't specified, the
+     * previous successful `Rollout` to the specified target will be used to
+     * determine the `Release`.
+     * 
+ * + * string release_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for releaseId to set. + * @return This builder for chaining. + */ + public Builder setReleaseIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + releaseId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object rolloutToRollBack_ = ""; + /** + * + * + *
+     * Optional. If provided, this must be the latest `Rollout` that is on the
+     * `Target`.
+     * 
+ * + * string rollout_to_roll_back = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rolloutToRollBack. + */ + public java.lang.String getRolloutToRollBack() { + java.lang.Object ref = rolloutToRollBack_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rolloutToRollBack_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. If provided, this must be the latest `Rollout` that is on the
+     * `Target`.
+     * 
+ * + * string rollout_to_roll_back = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rolloutToRollBack. + */ + public com.google.protobuf.ByteString getRolloutToRollBackBytes() { + java.lang.Object ref = rolloutToRollBack_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rolloutToRollBack_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. If provided, this must be the latest `Rollout` that is on the
+     * `Target`.
+     * 
+ * + * string rollout_to_roll_back = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The rolloutToRollBack to set. + * @return This builder for chaining. + */ + public Builder setRolloutToRollBack(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + rolloutToRollBack_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If provided, this must be the latest `Rollout` that is on the
+     * `Target`.
+     * 
+ * + * string rollout_to_roll_back = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRolloutToRollBack() { + rolloutToRollBack_ = getDefaultInstance().getRolloutToRollBack(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If provided, this must be the latest `Rollout` that is on the
+     * `Target`.
+     * 
+ * + * string rollout_to_roll_back = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for rolloutToRollBack to set. + * @return This builder for chaining. + */ + public Builder setRolloutToRollBackBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + rolloutToRollBack_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.cloud.deploy.v1.RollbackTargetConfig rollbackConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.RollbackTargetConfig, + com.google.cloud.deploy.v1.RollbackTargetConfig.Builder, + com.google.cloud.deploy.v1.RollbackTargetConfigOrBuilder> + rollbackConfigBuilder_; + /** + * + * + *
+     * Optional. Configs for the rollback `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rollbackConfig field is set. + */ + public boolean hasRollbackConfig() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Optional. Configs for the rollback `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rollbackConfig. + */ + public com.google.cloud.deploy.v1.RollbackTargetConfig getRollbackConfig() { + if (rollbackConfigBuilder_ == null) { + return rollbackConfig_ == null + ? com.google.cloud.deploy.v1.RollbackTargetConfig.getDefaultInstance() + : rollbackConfig_; + } else { + return rollbackConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Configs for the rollback `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRollbackConfig(com.google.cloud.deploy.v1.RollbackTargetConfig value) { + if (rollbackConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rollbackConfig_ = value; + } else { + rollbackConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Configs for the rollback `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRollbackConfig( + com.google.cloud.deploy.v1.RollbackTargetConfig.Builder builderForValue) { + if (rollbackConfigBuilder_ == null) { + rollbackConfig_ = builderForValue.build(); + } else { + rollbackConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Configs for the rollback `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRollbackConfig(com.google.cloud.deploy.v1.RollbackTargetConfig value) { + if (rollbackConfigBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && rollbackConfig_ != null + && rollbackConfig_ + != com.google.cloud.deploy.v1.RollbackTargetConfig.getDefaultInstance()) { + getRollbackConfigBuilder().mergeFrom(value); + } else { + rollbackConfig_ = value; + } + } else { + rollbackConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Configs for the rollback `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRollbackConfig() { + bitField0_ = (bitField0_ & ~0x00000020); + rollbackConfig_ = null; + if (rollbackConfigBuilder_ != null) { + rollbackConfigBuilder_.dispose(); + rollbackConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Configs for the rollback `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.deploy.v1.RollbackTargetConfig.Builder getRollbackConfigBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getRollbackConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Configs for the rollback `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.deploy.v1.RollbackTargetConfigOrBuilder getRollbackConfigOrBuilder() { + if (rollbackConfigBuilder_ != null) { + return rollbackConfigBuilder_.getMessageOrBuilder(); + } else { + return rollbackConfig_ == null + ? com.google.cloud.deploy.v1.RollbackTargetConfig.getDefaultInstance() + : rollbackConfig_; + } + } + /** + * + * + *
+     * Optional. Configs for the rollback `Rollout`.
+     * 
+ * + * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.RollbackTargetConfig, + com.google.cloud.deploy.v1.RollbackTargetConfig.Builder, + com.google.cloud.deploy.v1.RollbackTargetConfigOrBuilder> + getRollbackConfigFieldBuilder() { + if (rollbackConfigBuilder_ == null) { + rollbackConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.RollbackTargetConfig, + com.google.cloud.deploy.v1.RollbackTargetConfig.Builder, + com.google.cloud.deploy.v1.RollbackTargetConfigOrBuilder>( + getRollbackConfig(), getParentForChildren(), isClean()); + rollbackConfig_ = null; + } + return rollbackConfigBuilder_; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided
+     * with a `RollbackTargetResponse`.
+     * 
+ * + * bool validate_only = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided
+     * with a `RollbackTargetResponse`.
+     * 
+ * + * bool validate_only = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided
+     * with a `RollbackTargetResponse`.
+     * 
+ * + * bool validate_only = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000040); + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.RollbackTargetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.RollbackTargetRequest) + private static final com.google.cloud.deploy.v1.RollbackTargetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.RollbackTargetRequest(); + } + + public static com.google.cloud.deploy.v1.RollbackTargetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RollbackTargetRequest 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.RollbackTargetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackTargetRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackTargetRequestOrBuilder.java new file mode 100644 index 000000000000..cc39cee6e7d3 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackTargetRequestOrBuilder.java @@ -0,0 +1,219 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 RollbackTargetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.RollbackTargetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The `DeliveryPipeline` for which the rollback `Rollout` should be
+   * created. Format should be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The `DeliveryPipeline` for which the rollback `Rollout` should be
+   * created. Format should be
+   * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. ID of the `Target` that is being rolled back.
+   * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The targetId. + */ + java.lang.String getTargetId(); + /** + * + * + *
+   * Required. ID of the `Target` that is being rolled back.
+   * 
+ * + * string target_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for targetId. + */ + com.google.protobuf.ByteString getTargetIdBytes(); + + /** + * + * + *
+   * Required. ID of the rollback `Rollout` to create.
+   * 
+ * + * string rollout_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The rolloutId. + */ + java.lang.String getRolloutId(); + /** + * + * + *
+   * Required. ID of the rollback `Rollout` to create.
+   * 
+ * + * string rollout_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for rolloutId. + */ + com.google.protobuf.ByteString getRolloutIdBytes(); + + /** + * + * + *
+   * Optional. ID of the `Release` to roll back to. If this isn't specified, the
+   * previous successful `Rollout` to the specified target will be used to
+   * determine the `Release`.
+   * 
+ * + * string release_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The releaseId. + */ + java.lang.String getReleaseId(); + /** + * + * + *
+   * Optional. ID of the `Release` to roll back to. If this isn't specified, the
+   * previous successful `Rollout` to the specified target will be used to
+   * determine the `Release`.
+   * 
+ * + * string release_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for releaseId. + */ + com.google.protobuf.ByteString getReleaseIdBytes(); + + /** + * + * + *
+   * Optional. If provided, this must be the latest `Rollout` that is on the
+   * `Target`.
+   * 
+ * + * string rollout_to_roll_back = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rolloutToRollBack. + */ + java.lang.String getRolloutToRollBack(); + /** + * + * + *
+   * Optional. If provided, this must be the latest `Rollout` that is on the
+   * `Target`.
+   * 
+ * + * string rollout_to_roll_back = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rolloutToRollBack. + */ + com.google.protobuf.ByteString getRolloutToRollBackBytes(); + + /** + * + * + *
+   * Optional. Configs for the rollback `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the rollbackConfig field is set. + */ + boolean hasRollbackConfig(); + /** + * + * + *
+   * Optional. Configs for the rollback `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rollbackConfig. + */ + com.google.cloud.deploy.v1.RollbackTargetConfig getRollbackConfig(); + /** + * + * + *
+   * Optional. Configs for the rollback `Rollout`.
+   * 
+ * + * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.deploy.v1.RollbackTargetConfigOrBuilder getRollbackConfigOrBuilder(); + + /** + * + * + *
+   * Optional. If set to true, the request is validated and the user is provided
+   * with a `RollbackTargetResponse`.
+   * 
+ * + * bool validate_only = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackTargetResponse.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackTargetResponse.java new file mode 100644 index 000000000000..913d5feb7b66 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackTargetResponse.java @@ -0,0 +1,708 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 `RollbackTarget`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RollbackTargetResponse} + */ +public final class RollbackTargetResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.RollbackTargetResponse) + RollbackTargetResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RollbackTargetResponse.newBuilder() to construct. + private RollbackTargetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RollbackTargetResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RollbackTargetResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RollbackTargetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RollbackTargetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RollbackTargetResponse.class, + com.google.cloud.deploy.v1.RollbackTargetResponse.Builder.class); + } + + public static final int ROLLBACK_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.deploy.v1.RollbackTargetConfig rollbackConfig_; + /** + * + * + *
+   * The config of the rollback `Rollout` created or will be created.
+   * 
+ * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 1; + * + * @return Whether the rollbackConfig field is set. + */ + @java.lang.Override + public boolean hasRollbackConfig() { + return rollbackConfig_ != null; + } + /** + * + * + *
+   * The config of the rollback `Rollout` created or will be created.
+   * 
+ * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 1; + * + * @return The rollbackConfig. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackTargetConfig getRollbackConfig() { + return rollbackConfig_ == null + ? com.google.cloud.deploy.v1.RollbackTargetConfig.getDefaultInstance() + : rollbackConfig_; + } + /** + * + * + *
+   * The config of the rollback `Rollout` created or will be created.
+   * 
+ * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 1; + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackTargetConfigOrBuilder getRollbackConfigOrBuilder() { + return rollbackConfig_ == null + ? com.google.cloud.deploy.v1.RollbackTargetConfig.getDefaultInstance() + : rollbackConfig_; + } + + 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 (rollbackConfig_ != null) { + output.writeMessage(1, getRollbackConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rollbackConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRollbackConfig()); + } + 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.RollbackTargetResponse)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.RollbackTargetResponse other = + (com.google.cloud.deploy.v1.RollbackTargetResponse) obj; + + if (hasRollbackConfig() != other.hasRollbackConfig()) return false; + if (hasRollbackConfig()) { + if (!getRollbackConfig().equals(other.getRollbackConfig())) 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 (hasRollbackConfig()) { + hash = (37 * hash) + ROLLBACK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getRollbackConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.RollbackTargetResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RollbackTargetResponse 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.RollbackTargetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RollbackTargetResponse 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.RollbackTargetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RollbackTargetResponse 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.RollbackTargetResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RollbackTargetResponse 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.RollbackTargetResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RollbackTargetResponse 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.RollbackTargetResponse 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.RollbackTargetResponse 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.RollbackTargetResponse 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 `RollbackTarget`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RollbackTargetResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.RollbackTargetResponse) + com.google.cloud.deploy.v1.RollbackTargetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RollbackTargetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_RollbackTargetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RollbackTargetResponse.class, + com.google.cloud.deploy.v1.RollbackTargetResponse.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.RollbackTargetResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rollbackConfig_ = null; + if (rollbackConfigBuilder_ != null) { + rollbackConfigBuilder_.dispose(); + rollbackConfigBuilder_ = 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_RollbackTargetResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackTargetResponse getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.RollbackTargetResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackTargetResponse build() { + com.google.cloud.deploy.v1.RollbackTargetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RollbackTargetResponse buildPartial() { + com.google.cloud.deploy.v1.RollbackTargetResponse result = + new com.google.cloud.deploy.v1.RollbackTargetResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.RollbackTargetResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rollbackConfig_ = + rollbackConfigBuilder_ == null ? rollbackConfig_ : rollbackConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.deploy.v1.RollbackTargetResponse) { + return mergeFrom((com.google.cloud.deploy.v1.RollbackTargetResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.RollbackTargetResponse other) { + if (other == com.google.cloud.deploy.v1.RollbackTargetResponse.getDefaultInstance()) + return this; + if (other.hasRollbackConfig()) { + mergeRollbackConfig(other.getRollbackConfig()); + } + 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(getRollbackConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.deploy.v1.RollbackTargetConfig rollbackConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.RollbackTargetConfig, + com.google.cloud.deploy.v1.RollbackTargetConfig.Builder, + com.google.cloud.deploy.v1.RollbackTargetConfigOrBuilder> + rollbackConfigBuilder_; + /** + * + * + *
+     * The config of the rollback `Rollout` created or will be created.
+     * 
+ * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 1; + * + * @return Whether the rollbackConfig field is set. + */ + public boolean hasRollbackConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The config of the rollback `Rollout` created or will be created.
+     * 
+ * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 1; + * + * @return The rollbackConfig. + */ + public com.google.cloud.deploy.v1.RollbackTargetConfig getRollbackConfig() { + if (rollbackConfigBuilder_ == null) { + return rollbackConfig_ == null + ? com.google.cloud.deploy.v1.RollbackTargetConfig.getDefaultInstance() + : rollbackConfig_; + } else { + return rollbackConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The config of the rollback `Rollout` created or will be created.
+     * 
+ * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 1; + */ + public Builder setRollbackConfig(com.google.cloud.deploy.v1.RollbackTargetConfig value) { + if (rollbackConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rollbackConfig_ = value; + } else { + rollbackConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The config of the rollback `Rollout` created or will be created.
+     * 
+ * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 1; + */ + public Builder setRollbackConfig( + com.google.cloud.deploy.v1.RollbackTargetConfig.Builder builderForValue) { + if (rollbackConfigBuilder_ == null) { + rollbackConfig_ = builderForValue.build(); + } else { + rollbackConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The config of the rollback `Rollout` created or will be created.
+     * 
+ * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 1; + */ + public Builder mergeRollbackConfig(com.google.cloud.deploy.v1.RollbackTargetConfig value) { + if (rollbackConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && rollbackConfig_ != null + && rollbackConfig_ + != com.google.cloud.deploy.v1.RollbackTargetConfig.getDefaultInstance()) { + getRollbackConfigBuilder().mergeFrom(value); + } else { + rollbackConfig_ = value; + } + } else { + rollbackConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The config of the rollback `Rollout` created or will be created.
+     * 
+ * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 1; + */ + public Builder clearRollbackConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + rollbackConfig_ = null; + if (rollbackConfigBuilder_ != null) { + rollbackConfigBuilder_.dispose(); + rollbackConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The config of the rollback `Rollout` created or will be created.
+     * 
+ * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 1; + */ + public com.google.cloud.deploy.v1.RollbackTargetConfig.Builder getRollbackConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getRollbackConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The config of the rollback `Rollout` created or will be created.
+     * 
+ * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 1; + */ + public com.google.cloud.deploy.v1.RollbackTargetConfigOrBuilder getRollbackConfigOrBuilder() { + if (rollbackConfigBuilder_ != null) { + return rollbackConfigBuilder_.getMessageOrBuilder(); + } else { + return rollbackConfig_ == null + ? com.google.cloud.deploy.v1.RollbackTargetConfig.getDefaultInstance() + : rollbackConfig_; + } + } + /** + * + * + *
+     * The config of the rollback `Rollout` created or will be created.
+     * 
+ * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.RollbackTargetConfig, + com.google.cloud.deploy.v1.RollbackTargetConfig.Builder, + com.google.cloud.deploy.v1.RollbackTargetConfigOrBuilder> + getRollbackConfigFieldBuilder() { + if (rollbackConfigBuilder_ == null) { + rollbackConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.RollbackTargetConfig, + com.google.cloud.deploy.v1.RollbackTargetConfig.Builder, + com.google.cloud.deploy.v1.RollbackTargetConfigOrBuilder>( + getRollbackConfig(), getParentForChildren(), isClean()); + rollbackConfig_ = null; + } + return rollbackConfigBuilder_; + } + + @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.RollbackTargetResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.RollbackTargetResponse) + private static final com.google.cloud.deploy.v1.RollbackTargetResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.RollbackTargetResponse(); + } + + public static com.google.cloud.deploy.v1.RollbackTargetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RollbackTargetResponse 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.RollbackTargetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackTargetResponseOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackTargetResponseOrBuilder.java new file mode 100644 index 000000000000..70dcb0d9196d --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RollbackTargetResponseOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 RollbackTargetResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.RollbackTargetResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The config of the rollback `Rollout` created or will be created.
+   * 
+ * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 1; + * + * @return Whether the rollbackConfig field is set. + */ + boolean hasRollbackConfig(); + /** + * + * + *
+   * The config of the rollback `Rollout` created or will be created.
+   * 
+ * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 1; + * + * @return The rollbackConfig. + */ + com.google.cloud.deploy.v1.RollbackTargetConfig getRollbackConfig(); + /** + * + * + *
+   * The config of the rollback `Rollout` created or will be created.
+   * 
+ * + * .google.cloud.deploy.v1.RollbackTargetConfig rollback_config = 1; + */ + com.google.cloud.deploy.v1.RollbackTargetConfigOrBuilder getRollbackConfigOrBuilder(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Rollout.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Rollout.java index 7de9ccb10267..3a072c50e16a 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Rollout.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Rollout.java @@ -52,6 +52,8 @@ private Rollout() { deployFailureCause_ = 0; phases_ = java.util.Collections.emptyList(); controllerRollout_ = ""; + rollbackOfRollout_ = ""; + rolledBackByRollouts_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @@ -907,9 +909,8 @@ private FailureCause(int value) { * * *
-   * Optional. Name of the `Rollout`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * Optional. Name of the `Rollout`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -932,9 +933,8 @@ public java.lang.String getName() { * * *
-   * Optional. Name of the `Rollout`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * Optional. Name of the `Rollout`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2048,9 +2048,8 @@ public com.google.cloud.deploy.v1.MetadataOrBuilder getMetadataOrBuilder() { * * *
-   * Output only. Name of the `ControllerRollout`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * Output only. Name of the `ControllerRollout`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string controller_rollout = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2073,9 +2072,8 @@ public java.lang.String getControllerRollout() { * * *
-   * Output only. Name of the `ControllerRollout`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * Output only. Name of the `ControllerRollout`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string controller_rollout = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2095,6 +2093,131 @@ public com.google.protobuf.ByteString getControllerRolloutBytes() { } } + public static final int ROLLBACK_OF_ROLLOUT_FIELD_NUMBER = 26; + + @SuppressWarnings("serial") + private volatile java.lang.Object rollbackOfRollout_ = ""; + /** + * + * + *
+   * Output only. Name of the `Rollout` that is rolled back by this `Rollout`.
+   * Empty if this `Rollout` wasn't created as a rollback.
+   * 
+ * + * string rollback_of_rollout = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The rollbackOfRollout. + */ + @java.lang.Override + public java.lang.String getRollbackOfRollout() { + java.lang.Object ref = rollbackOfRollout_; + 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(); + rollbackOfRollout_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of the `Rollout` that is rolled back by this `Rollout`.
+   * Empty if this `Rollout` wasn't created as a rollback.
+   * 
+ * + * string rollback_of_rollout = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for rollbackOfRollout. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRollbackOfRolloutBytes() { + java.lang.Object ref = rollbackOfRollout_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rollbackOfRollout_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROLLED_BACK_BY_ROLLOUTS_FIELD_NUMBER = 27; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList rolledBackByRollouts_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Output only. Names of `Rollouts` that rolled back this `Rollout`.
+   * 
+ * + * + * repeated string rolled_back_by_rollouts = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the rolledBackByRollouts. + */ + public com.google.protobuf.ProtocolStringList getRolledBackByRolloutsList() { + return rolledBackByRollouts_; + } + /** + * + * + *
+   * Output only. Names of `Rollouts` that rolled back this `Rollout`.
+   * 
+ * + * + * repeated string rolled_back_by_rollouts = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of rolledBackByRollouts. + */ + public int getRolledBackByRolloutsCount() { + return rolledBackByRollouts_.size(); + } + /** + * + * + *
+   * Output only. Names of `Rollouts` that rolled back this `Rollout`.
+   * 
+ * + * + * repeated string rolled_back_by_rollouts = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The rolledBackByRollouts at the given index. + */ + public java.lang.String getRolledBackByRollouts(int index) { + return rolledBackByRollouts_.get(index); + } + /** + * + * + *
+   * Output only. Names of `Rollouts` that rolled back this `Rollout`.
+   * 
+ * + * + * repeated string rolled_back_by_rollouts = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the rolledBackByRollouts at the given index. + */ + public com.google.protobuf.ByteString getRolledBackByRolloutsBytes(int index) { + return rolledBackByRollouts_.getByteString(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2170,6 +2293,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controllerRollout_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 25, controllerRollout_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rollbackOfRollout_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 26, rollbackOfRollout_); + } + for (int i = 0; i < rolledBackByRollouts_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 27, rolledBackByRollouts_.getRaw(i)); + } getUnknownFields().writeTo(output); } @@ -2256,6 +2386,17 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controllerRollout_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(25, controllerRollout_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rollbackOfRollout_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(26, rollbackOfRollout_); + } + { + int dataSize = 0; + for (int i = 0; i < rolledBackByRollouts_.size(); i++) { + dataSize += computeStringSizeNoTag(rolledBackByRollouts_.getRaw(i)); + } + size += dataSize; + size += 2 * getRolledBackByRolloutsList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2309,6 +2450,8 @@ public boolean equals(final java.lang.Object obj) { if (!getMetadata().equals(other.getMetadata())) return false; } if (!getControllerRollout().equals(other.getControllerRollout())) return false; + if (!getRollbackOfRollout().equals(other.getRollbackOfRollout())) return false; + if (!getRolledBackByRolloutsList().equals(other.getRolledBackByRolloutsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2378,6 +2521,12 @@ public int hashCode() { } hash = (37 * hash) + CONTROLLER_ROLLOUT_FIELD_NUMBER; hash = (53 * hash) + getControllerRollout().hashCode(); + hash = (37 * hash) + ROLLBACK_OF_ROLLOUT_FIELD_NUMBER; + hash = (53 * hash) + getRollbackOfRollout().hashCode(); + if (getRolledBackByRolloutsCount() > 0) { + hash = (37 * hash) + ROLLED_BACK_BY_ROLLOUTS_FIELD_NUMBER; + hash = (53 * hash) + getRolledBackByRolloutsList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2592,6 +2741,8 @@ public Builder clear() { metadataBuilder_ = null; } controllerRollout_ = ""; + rollbackOfRollout_ = ""; + rolledBackByRollouts_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @@ -2703,6 +2854,13 @@ private void buildPartial0(com.google.cloud.deploy.v1.Rollout result) { if (((from_bitField0_ & 0x00080000) != 0)) { result.controllerRollout_ = controllerRollout_; } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.rollbackOfRollout_ = rollbackOfRollout_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + rolledBackByRollouts_.makeImmutable(); + result.rolledBackByRollouts_ = rolledBackByRollouts_; + } } @java.lang.Override @@ -2848,6 +3006,21 @@ public Builder mergeFrom(com.google.cloud.deploy.v1.Rollout other) { bitField0_ |= 0x00080000; onChanged(); } + if (!other.getRollbackOfRollout().isEmpty()) { + rollbackOfRollout_ = other.rollbackOfRollout_; + bitField0_ |= 0x00100000; + onChanged(); + } + if (!other.rolledBackByRollouts_.isEmpty()) { + if (rolledBackByRollouts_.isEmpty()) { + rolledBackByRollouts_ = other.rolledBackByRollouts_; + bitField0_ |= 0x00200000; + } else { + ensureRolledBackByRolloutsIsMutable(); + rolledBackByRollouts_.addAll(other.rolledBackByRollouts_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3012,6 +3185,19 @@ public Builder mergeFrom( bitField0_ |= 0x00080000; break; } // case 202 + case 210: + { + rollbackOfRollout_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00100000; + break; + } // case 210 + case 218: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRolledBackByRolloutsIsMutable(); + rolledBackByRollouts_.add(s); + break; + } // case 218 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3036,9 +3222,8 @@ public Builder mergeFrom( * * *
-     * Optional. Name of the `Rollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Optional. Name of the `Rollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -3060,9 +3245,8 @@ public java.lang.String getName() { * * *
-     * Optional. Name of the `Rollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Optional. Name of the `Rollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -3084,9 +3268,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Optional. Name of the `Rollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Optional. Name of the `Rollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -3107,9 +3290,8 @@ public Builder setName(java.lang.String value) { * * *
-     * Optional. Name of the `Rollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Optional. Name of the `Rollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -3126,9 +3308,8 @@ public Builder clearName() { * * *
-     * Optional. Name of the `Rollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Optional. Name of the `Rollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -6136,9 +6317,8 @@ public com.google.cloud.deploy.v1.MetadataOrBuilder getMetadataOrBuilder() { * * *
-     * Output only. Name of the `ControllerRollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Output only. Name of the `ControllerRollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string controller_rollout = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -6160,9 +6340,8 @@ public java.lang.String getControllerRollout() { * * *
-     * Output only. Name of the `ControllerRollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Output only. Name of the `ControllerRollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string controller_rollout = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -6184,9 +6363,8 @@ public com.google.protobuf.ByteString getControllerRolloutBytes() { * * *
-     * Output only. Name of the `ControllerRollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Output only. Name of the `ControllerRollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string controller_rollout = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -6207,9 +6385,8 @@ public Builder setControllerRollout(java.lang.String value) { * * *
-     * Output only. Name of the `ControllerRollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Output only. Name of the `ControllerRollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string controller_rollout = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -6226,9 +6403,8 @@ public Builder clearControllerRollout() { * * *
-     * Output only. Name of the `ControllerRollout`. Format is projects/{project}/
-     * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+     * Output only. Name of the `ControllerRollout`. Format is
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string controller_rollout = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -6247,6 +6423,309 @@ public Builder setControllerRolloutBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object rollbackOfRollout_ = ""; + /** + * + * + *
+     * Output only. Name of the `Rollout` that is rolled back by this `Rollout`.
+     * Empty if this `Rollout` wasn't created as a rollback.
+     * 
+ * + * string rollback_of_rollout = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The rollbackOfRollout. + */ + public java.lang.String getRollbackOfRollout() { + java.lang.Object ref = rollbackOfRollout_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rollbackOfRollout_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of the `Rollout` that is rolled back by this `Rollout`.
+     * Empty if this `Rollout` wasn't created as a rollback.
+     * 
+ * + * string rollback_of_rollout = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for rollbackOfRollout. + */ + public com.google.protobuf.ByteString getRollbackOfRolloutBytes() { + java.lang.Object ref = rollbackOfRollout_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rollbackOfRollout_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of the `Rollout` that is rolled back by this `Rollout`.
+     * Empty if this `Rollout` wasn't created as a rollback.
+     * 
+ * + * string rollback_of_rollout = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The rollbackOfRollout to set. + * @return This builder for chaining. + */ + public Builder setRollbackOfRollout(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + rollbackOfRollout_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the `Rollout` that is rolled back by this `Rollout`.
+     * Empty if this `Rollout` wasn't created as a rollback.
+     * 
+ * + * string rollback_of_rollout = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRollbackOfRollout() { + rollbackOfRollout_ = getDefaultInstance().getRollbackOfRollout(); + bitField0_ = (bitField0_ & ~0x00100000); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the `Rollout` that is rolled back by this `Rollout`.
+     * Empty if this `Rollout` wasn't created as a rollback.
+     * 
+ * + * string rollback_of_rollout = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for rollbackOfRollout to set. + * @return This builder for chaining. + */ + public Builder setRollbackOfRolloutBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + rollbackOfRollout_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList rolledBackByRollouts_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRolledBackByRolloutsIsMutable() { + if (!rolledBackByRollouts_.isModifiable()) { + rolledBackByRollouts_ = new com.google.protobuf.LazyStringArrayList(rolledBackByRollouts_); + } + bitField0_ |= 0x00200000; + } + /** + * + * + *
+     * Output only. Names of `Rollouts` that rolled back this `Rollout`.
+     * 
+ * + * + * repeated string rolled_back_by_rollouts = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the rolledBackByRollouts. + */ + public com.google.protobuf.ProtocolStringList getRolledBackByRolloutsList() { + rolledBackByRollouts_.makeImmutable(); + return rolledBackByRollouts_; + } + /** + * + * + *
+     * Output only. Names of `Rollouts` that rolled back this `Rollout`.
+     * 
+ * + * + * repeated string rolled_back_by_rollouts = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of rolledBackByRollouts. + */ + public int getRolledBackByRolloutsCount() { + return rolledBackByRollouts_.size(); + } + /** + * + * + *
+     * Output only. Names of `Rollouts` that rolled back this `Rollout`.
+     * 
+ * + * + * repeated string rolled_back_by_rollouts = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The rolledBackByRollouts at the given index. + */ + public java.lang.String getRolledBackByRollouts(int index) { + return rolledBackByRollouts_.get(index); + } + /** + * + * + *
+     * Output only. Names of `Rollouts` that rolled back this `Rollout`.
+     * 
+ * + * + * repeated string rolled_back_by_rollouts = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the rolledBackByRollouts at the given index. + */ + public com.google.protobuf.ByteString getRolledBackByRolloutsBytes(int index) { + return rolledBackByRollouts_.getByteString(index); + } + /** + * + * + *
+     * Output only. Names of `Rollouts` that rolled back this `Rollout`.
+     * 
+ * + * + * repeated string rolled_back_by_rollouts = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The rolledBackByRollouts to set. + * @return This builder for chaining. + */ + public Builder setRolledBackByRollouts(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolledBackByRolloutsIsMutable(); + rolledBackByRollouts_.set(index, value); + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Names of `Rollouts` that rolled back this `Rollout`.
+     * 
+ * + * + * repeated string rolled_back_by_rollouts = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The rolledBackByRollouts to add. + * @return This builder for chaining. + */ + public Builder addRolledBackByRollouts(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolledBackByRolloutsIsMutable(); + rolledBackByRollouts_.add(value); + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Names of `Rollouts` that rolled back this `Rollout`.
+     * 
+ * + * + * repeated string rolled_back_by_rollouts = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The rolledBackByRollouts to add. + * @return This builder for chaining. + */ + public Builder addAllRolledBackByRollouts(java.lang.Iterable values) { + ensureRolledBackByRolloutsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rolledBackByRollouts_); + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Names of `Rollouts` that rolled back this `Rollout`.
+     * 
+ * + * + * repeated string rolled_back_by_rollouts = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearRolledBackByRollouts() { + rolledBackByRollouts_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00200000); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Names of `Rollouts` that rolled back this `Rollout`.
+     * 
+ * + * + * repeated string rolled_back_by_rollouts = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the rolledBackByRollouts to add. + * @return This builder for chaining. + */ + public Builder addRolledBackByRolloutsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRolledBackByRolloutsIsMutable(); + rolledBackByRollouts_.add(value); + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutOrBuilder.java index fc7126c2067e..31f1689e394a 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutOrBuilder.java @@ -27,9 +27,8 @@ public interface RolloutOrBuilder * * *
-   * Optional. Name of the `Rollout`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * Optional. Name of the `Rollout`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -41,9 +40,8 @@ public interface RolloutOrBuilder * * *
-   * Optional. Name of the `Rollout`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * Optional. Name of the `Rollout`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -785,9 +783,8 @@ java.lang.String getLabelsOrDefault( * * *
-   * Output only. Name of the `ControllerRollout`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * Output only. Name of the `ControllerRollout`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string controller_rollout = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -799,9 +796,8 @@ java.lang.String getLabelsOrDefault( * * *
-   * Output only. Name of the `ControllerRollout`. Format is projects/{project}/
-   * locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
+   * Output only. Name of the `ControllerRollout`. Format is
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string controller_rollout = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -809,4 +805,90 @@ java.lang.String getLabelsOrDefault( * @return The bytes for controllerRollout. */ com.google.protobuf.ByteString getControllerRolloutBytes(); + + /** + * + * + *
+   * Output only. Name of the `Rollout` that is rolled back by this `Rollout`.
+   * Empty if this `Rollout` wasn't created as a rollback.
+   * 
+ * + * string rollback_of_rollout = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The rollbackOfRollout. + */ + java.lang.String getRollbackOfRollout(); + /** + * + * + *
+   * Output only. Name of the `Rollout` that is rolled back by this `Rollout`.
+   * Empty if this `Rollout` wasn't created as a rollback.
+   * 
+ * + * string rollback_of_rollout = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for rollbackOfRollout. + */ + com.google.protobuf.ByteString getRollbackOfRolloutBytes(); + + /** + * + * + *
+   * Output only. Names of `Rollouts` that rolled back this `Rollout`.
+   * 
+ * + * + * repeated string rolled_back_by_rollouts = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the rolledBackByRollouts. + */ + java.util.List getRolledBackByRolloutsList(); + /** + * + * + *
+   * Output only. Names of `Rollouts` that rolled back this `Rollout`.
+   * 
+ * + * + * repeated string rolled_back_by_rollouts = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of rolledBackByRollouts. + */ + int getRolledBackByRolloutsCount(); + /** + * + * + *
+   * Output only. Names of `Rollouts` that rolled back this `Rollout`.
+   * 
+ * + * + * repeated string rolled_back_by_rollouts = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The rolledBackByRollouts at the given index. + */ + java.lang.String getRolledBackByRollouts(int index); + /** + * + * + *
+   * Output only. Names of `Rollouts` that rolled back this `Rollout`.
+   * 
+ * + * + * repeated string rolled_back_by_rollouts = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the rolledBackByRollouts at the given index. + */ + com.google.protobuf.ByteString getRolledBackByRolloutsBytes(int index); } diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutUpdateEvent.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutUpdateEvent.java new file mode 100644 index 000000000000..7cd5118d06d6 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutUpdateEvent.java @@ -0,0 +1,2069 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/rollout_update_payload.proto + +package com.google.cloud.deploy.v1; + +/** + * + * + *
+ * Payload proto for "clouddeploy.googleapis.com/rollout_update"
+ * Platform Log event that describes the rollout update event.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RolloutUpdateEvent} + */ +public final class RolloutUpdateEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.RolloutUpdateEvent) + RolloutUpdateEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use RolloutUpdateEvent.newBuilder() to construct. + private RolloutUpdateEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RolloutUpdateEvent() { + pipelineUid_ = ""; + releaseUid_ = ""; + rollout_ = ""; + targetId_ = ""; + rolloutUpdateType_ = 0; + message_ = ""; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RolloutUpdateEvent(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.RolloutUpdatePayloadProto + .internal_static_google_cloud_deploy_v1_RolloutUpdateEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.RolloutUpdatePayloadProto + .internal_static_google_cloud_deploy_v1_RolloutUpdateEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RolloutUpdateEvent.class, + com.google.cloud.deploy.v1.RolloutUpdateEvent.Builder.class); + } + + /** + * + * + *
+   * RolloutUpdateType indicates the type of the rollout update.
+   * 
+ * + * Protobuf enum {@code google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType} + */ + public enum RolloutUpdateType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Rollout update type unspecified.
+     * 
+ * + * ROLLOUT_UPDATE_TYPE_UNSPECIFIED = 0; + */ + ROLLOUT_UPDATE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * rollout state updated to pending.
+     * 
+ * + * PENDING = 1; + */ + PENDING(1), + /** + * + * + *
+     * Rollout state updated to pending release.
+     * 
+ * + * PENDING_RELEASE = 2; + */ + PENDING_RELEASE(2), + /** + * + * + *
+     * Rollout state updated to in progress.
+     * 
+ * + * IN_PROGRESS = 3; + */ + IN_PROGRESS(3), + /** + * + * + *
+     * Rollout state updated to cancelling.
+     * 
+ * + * CANCELLING = 4; + */ + CANCELLING(4), + /** + * + * + *
+     * Rollout state updated to cancelled.
+     * 
+ * + * CANCELLED = 5; + */ + CANCELLED(5), + /** + * + * + *
+     * Rollout state updated to halted.
+     * 
+ * + * HALTED = 6; + */ + HALTED(6), + /** + * + * + *
+     * Rollout state updated to succeeded.
+     * 
+ * + * SUCCEEDED = 7; + */ + SUCCEEDED(7), + /** + * + * + *
+     * Rollout state updated to failed.
+     * 
+ * + * FAILED = 8; + */ + FAILED(8), + /** + * + * + *
+     * Rollout requires approval.
+     * 
+ * + * APPROVAL_REQUIRED = 9; + */ + APPROVAL_REQUIRED(9), + /** + * + * + *
+     * Rollout has been approved.
+     * 
+ * + * APPROVED = 10; + */ + APPROVED(10), + /** + * + * + *
+     * Rollout has been rejected.
+     * 
+ * + * REJECTED = 11; + */ + REJECTED(11), + /** + * + * + *
+     * Rollout requires advance to the next phase.
+     * 
+ * + * ADVANCE_REQUIRED = 12; + */ + ADVANCE_REQUIRED(12), + /** + * + * + *
+     * Rollout has been advanced.
+     * 
+ * + * ADVANCED = 13; + */ + ADVANCED(13), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Rollout update type unspecified.
+     * 
+ * + * ROLLOUT_UPDATE_TYPE_UNSPECIFIED = 0; + */ + public static final int ROLLOUT_UPDATE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * rollout state updated to pending.
+     * 
+ * + * PENDING = 1; + */ + public static final int PENDING_VALUE = 1; + /** + * + * + *
+     * Rollout state updated to pending release.
+     * 
+ * + * PENDING_RELEASE = 2; + */ + public static final int PENDING_RELEASE_VALUE = 2; + /** + * + * + *
+     * Rollout state updated to in progress.
+     * 
+ * + * IN_PROGRESS = 3; + */ + public static final int IN_PROGRESS_VALUE = 3; + /** + * + * + *
+     * Rollout state updated to cancelling.
+     * 
+ * + * CANCELLING = 4; + */ + public static final int CANCELLING_VALUE = 4; + /** + * + * + *
+     * Rollout state updated to cancelled.
+     * 
+ * + * CANCELLED = 5; + */ + public static final int CANCELLED_VALUE = 5; + /** + * + * + *
+     * Rollout state updated to halted.
+     * 
+ * + * HALTED = 6; + */ + public static final int HALTED_VALUE = 6; + /** + * + * + *
+     * Rollout state updated to succeeded.
+     * 
+ * + * SUCCEEDED = 7; + */ + public static final int SUCCEEDED_VALUE = 7; + /** + * + * + *
+     * Rollout state updated to failed.
+     * 
+ * + * FAILED = 8; + */ + public static final int FAILED_VALUE = 8; + /** + * + * + *
+     * Rollout requires approval.
+     * 
+ * + * APPROVAL_REQUIRED = 9; + */ + public static final int APPROVAL_REQUIRED_VALUE = 9; + /** + * + * + *
+     * Rollout has been approved.
+     * 
+ * + * APPROVED = 10; + */ + public static final int APPROVED_VALUE = 10; + /** + * + * + *
+     * Rollout has been rejected.
+     * 
+ * + * REJECTED = 11; + */ + public static final int REJECTED_VALUE = 11; + /** + * + * + *
+     * Rollout requires advance to the next phase.
+     * 
+ * + * ADVANCE_REQUIRED = 12; + */ + public static final int ADVANCE_REQUIRED_VALUE = 12; + /** + * + * + *
+     * Rollout has been advanced.
+     * 
+ * + * ADVANCED = 13; + */ + public static final int ADVANCED_VALUE = 13; + + 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 RolloutUpdateType 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 RolloutUpdateType forNumber(int value) { + switch (value) { + case 0: + return ROLLOUT_UPDATE_TYPE_UNSPECIFIED; + case 1: + return PENDING; + case 2: + return PENDING_RELEASE; + case 3: + return IN_PROGRESS; + case 4: + return CANCELLING; + case 5: + return CANCELLED; + case 6: + return HALTED; + case 7: + return SUCCEEDED; + case 8: + return FAILED; + case 9: + return APPROVAL_REQUIRED; + case 10: + return APPROVED; + case 11: + return REJECTED; + case 12: + return ADVANCE_REQUIRED; + case 13: + return ADVANCED; + 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 RolloutUpdateType findValueByNumber(int number) { + return RolloutUpdateType.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.RolloutUpdateEvent.getDescriptor().getEnumTypes().get(0); + } + + private static final RolloutUpdateType[] VALUES = values(); + + public static RolloutUpdateType 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 RolloutUpdateType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType) + } + + public static final int PIPELINE_UID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object pipelineUid_ = ""; + /** + * + * + *
+   * Unique identifier of the pipeline.
+   * 
+ * + * string pipeline_uid = 1; + * + * @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 pipeline.
+   * 
+ * + * string pipeline_uid = 1; + * + * @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 = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object releaseUid_ = ""; + /** + * + * + *
+   * Unique identifier of the release.
+   * 
+ * + * string release_uid = 2; + * + * @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 = 2; + * + * @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_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object rollout_ = ""; + /** + * + * + *
+   * The name of the rollout.
+   * 
+ * + * string rollout = 3; + * + * @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; + } + } + /** + * + * + *
+   * The name of the rollout.
+   * 
+ * + * string rollout = 3; + * + * @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 TARGET_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object targetId_ = ""; + /** + * + * + *
+   * ID of the target.
+   * 
+ * + * string target_id = 4; + * + * @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 = 4; + * + * @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 ROLLOUT_UPDATE_TYPE_FIELD_NUMBER = 5; + private int rolloutUpdateType_ = 0; + /** + * + * + *
+   * The type of the rollout update.
+   * 
+ * + * .google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType rollout_update_type = 5; + * + * + * @return The enum numeric value on the wire for rolloutUpdateType. + */ + @java.lang.Override + public int getRolloutUpdateTypeValue() { + return rolloutUpdateType_; + } + /** + * + * + *
+   * The type of the rollout update.
+   * 
+ * + * .google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType rollout_update_type = 5; + * + * + * @return The rolloutUpdateType. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType getRolloutUpdateType() { + com.google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType result = + com.google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType.forNumber( + rolloutUpdateType_); + return result == null + ? com.google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType.UNRECOGNIZED + : result; + } + + public static final int MESSAGE_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; + /** + * + * + *
+   * Debug message for when a rollout update event occurs.
+   * 
+ * + * string message = 6; + * + * @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 rollout update event occurs.
+   * 
+ * + * string message = 6; + * + * @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 TYPE_FIELD_NUMBER = 7; + private int type_ = 0; + /** + * + * + *
+   * Type of this notification, e.g. for a rollout update event.
+   * 
+ * + * .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 rollout update event.
+   * 
+ * + * .google.cloud.deploy.v1.Type type = 7; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Type getType() { + com.google.cloud.deploy.v1.Type result = com.google.cloud.deploy.v1.Type.forNumber(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(pipelineUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pipelineUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(releaseUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, releaseUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rollout_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, rollout_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, targetId_); + } + if (rolloutUpdateType_ + != com.google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType + .ROLLOUT_UPDATE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, rolloutUpdateType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, message_); + } + 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(pipelineUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pipelineUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(releaseUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, releaseUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rollout_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, rollout_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, targetId_); + } + if (rolloutUpdateType_ + != com.google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType + .ROLLOUT_UPDATE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, rolloutUpdateType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, message_); + } + 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.RolloutUpdateEvent)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.RolloutUpdateEvent other = + (com.google.cloud.deploy.v1.RolloutUpdateEvent) obj; + + if (!getPipelineUid().equals(other.getPipelineUid())) return false; + if (!getReleaseUid().equals(other.getReleaseUid())) return false; + if (!getRollout().equals(other.getRollout())) return false; + if (!getTargetId().equals(other.getTargetId())) return false; + if (rolloutUpdateType_ != other.rolloutUpdateType_) return false; + if (!getMessage().equals(other.getMessage())) 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) + 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_FIELD_NUMBER; + hash = (53 * hash) + getRollout().hashCode(); + hash = (37 * hash) + TARGET_ID_FIELD_NUMBER; + hash = (53 * hash) + getTargetId().hashCode(); + hash = (37 * hash) + ROLLOUT_UPDATE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + rolloutUpdateType_; + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().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.RolloutUpdateEvent parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RolloutUpdateEvent 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.RolloutUpdateEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RolloutUpdateEvent 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.RolloutUpdateEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.RolloutUpdateEvent 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.RolloutUpdateEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RolloutUpdateEvent 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.RolloutUpdateEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.RolloutUpdateEvent 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.RolloutUpdateEvent 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.RolloutUpdateEvent 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.RolloutUpdateEvent 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/rollout_update"
+   * Platform Log event that describes the rollout update event.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.RolloutUpdateEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.RolloutUpdateEvent) + com.google.cloud.deploy.v1.RolloutUpdateEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.RolloutUpdatePayloadProto + .internal_static_google_cloud_deploy_v1_RolloutUpdateEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.RolloutUpdatePayloadProto + .internal_static_google_cloud_deploy_v1_RolloutUpdateEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.RolloutUpdateEvent.class, + com.google.cloud.deploy.v1.RolloutUpdateEvent.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.RolloutUpdateEvent.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pipelineUid_ = ""; + releaseUid_ = ""; + rollout_ = ""; + targetId_ = ""; + rolloutUpdateType_ = 0; + message_ = ""; + type_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.deploy.v1.RolloutUpdatePayloadProto + .internal_static_google_cloud_deploy_v1_RolloutUpdateEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RolloutUpdateEvent getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.RolloutUpdateEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RolloutUpdateEvent build() { + com.google.cloud.deploy.v1.RolloutUpdateEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.RolloutUpdateEvent buildPartial() { + com.google.cloud.deploy.v1.RolloutUpdateEvent result = + new com.google.cloud.deploy.v1.RolloutUpdateEvent(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.RolloutUpdateEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pipelineUid_ = pipelineUid_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.releaseUid_ = releaseUid_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.rollout_ = rollout_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.targetId_ = targetId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.rolloutUpdateType_ = rolloutUpdateType_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.message_ = message_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.type_ = type_; + } + } + + @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.RolloutUpdateEvent) { + return mergeFrom((com.google.cloud.deploy.v1.RolloutUpdateEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.RolloutUpdateEvent other) { + if (other == com.google.cloud.deploy.v1.RolloutUpdateEvent.getDefaultInstance()) return this; + if (!other.getPipelineUid().isEmpty()) { + pipelineUid_ = other.pipelineUid_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getReleaseUid().isEmpty()) { + releaseUid_ = other.releaseUid_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getRollout().isEmpty()) { + rollout_ = other.rollout_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getTargetId().isEmpty()) { + targetId_ = other.targetId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.rolloutUpdateType_ != 0) { + setRolloutUpdateTypeValue(other.getRolloutUpdateTypeValue()); + } + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + bitField0_ |= 0x00000020; + 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: + { + pipelineUid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + releaseUid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + rollout_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + targetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + rolloutUpdateType_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000040; + 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 int bitField0_; + + private java.lang.Object pipelineUid_ = ""; + /** + * + * + *
+     * Unique identifier of the pipeline.
+     * 
+ * + * string pipeline_uid = 1; + * + * @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 pipeline.
+     * 
+ * + * string pipeline_uid = 1; + * + * @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 pipeline.
+     * 
+ * + * string pipeline_uid = 1; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Unique identifier of the pipeline.
+     * 
+ * + * string pipeline_uid = 1; + * + * @return This builder for chaining. + */ + public Builder clearPipelineUid() { + pipelineUid_ = getDefaultInstance().getPipelineUid(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Unique identifier of the pipeline.
+     * 
+ * + * string pipeline_uid = 1; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object releaseUid_ = ""; + /** + * + * + *
+     * Unique identifier of the release.
+     * 
+ * + * string release_uid = 2; + * + * @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 = 2; + * + * @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 = 2; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Unique identifier of the release.
+     * 
+ * + * string release_uid = 2; + * + * @return This builder for chaining. + */ + public Builder clearReleaseUid() { + releaseUid_ = getDefaultInstance().getReleaseUid(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Unique identifier of the release.
+     * 
+ * + * string release_uid = 2; + * + * @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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object rollout_ = ""; + /** + * + * + *
+     * The name of the rollout.
+     * 
+ * + * string rollout = 3; + * + * @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; + } + } + /** + * + * + *
+     * The name of the rollout.
+     * 
+ * + * string rollout = 3; + * + * @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; + } + } + /** + * + * + *
+     * The name of the rollout.
+     * 
+ * + * string rollout = 3; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the rollout.
+     * 
+ * + * string rollout = 3; + * + * @return This builder for chaining. + */ + public Builder clearRollout() { + rollout_ = getDefaultInstance().getRollout(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the rollout.
+     * 
+ * + * string rollout = 3; + * + * @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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object targetId_ = ""; + /** + * + * + *
+     * ID of the target.
+     * 
+ * + * string target_id = 4; + * + * @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 = 4; + * + * @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 = 4; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the target.
+     * 
+ * + * string target_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearTargetId() { + targetId_ = getDefaultInstance().getTargetId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the target.
+     * 
+ * + * string target_id = 4; + * + * @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; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int rolloutUpdateType_ = 0; + /** + * + * + *
+     * The type of the rollout update.
+     * 
+ * + * .google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType rollout_update_type = 5; + * + * + * @return The enum numeric value on the wire for rolloutUpdateType. + */ + @java.lang.Override + public int getRolloutUpdateTypeValue() { + return rolloutUpdateType_; + } + /** + * + * + *
+     * The type of the rollout update.
+     * 
+ * + * .google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType rollout_update_type = 5; + * + * + * @param value The enum numeric value on the wire for rolloutUpdateType to set. + * @return This builder for chaining. + */ + public Builder setRolloutUpdateTypeValue(int value) { + rolloutUpdateType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the rollout update.
+     * 
+ * + * .google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType rollout_update_type = 5; + * + * + * @return The rolloutUpdateType. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType getRolloutUpdateType() { + com.google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType result = + com.google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType.forNumber( + rolloutUpdateType_); + return result == null + ? com.google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of the rollout update.
+     * 
+ * + * .google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType rollout_update_type = 5; + * + * + * @param value The rolloutUpdateType to set. + * @return This builder for chaining. + */ + public Builder setRolloutUpdateType( + com.google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + rolloutUpdateType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the rollout update.
+     * 
+ * + * .google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType rollout_update_type = 5; + * + * + * @return This builder for chaining. + */ + public Builder clearRolloutUpdateType() { + bitField0_ = (bitField0_ & ~0x00000010); + rolloutUpdateType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object message_ = ""; + /** + * + * + *
+     * Debug message for when a rollout update event occurs.
+     * 
+ * + * string message = 6; + * + * @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 rollout update event occurs.
+     * 
+ * + * string message = 6; + * + * @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 rollout update event occurs.
+     * 
+ * + * string message = 6; + * + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Debug message for when a rollout update event occurs.
+     * 
+ * + * string message = 6; + * + * @return This builder for chaining. + */ + public Builder clearMessage() { + message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Debug message for when a rollout update event occurs.
+     * 
+ * + * string message = 6; + * + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + message_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Type of this notification, e.g. for a rollout update event.
+     * 
+ * + * .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 rollout update event.
+     * 
+ * + * .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; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of this notification, e.g. for a rollout update event.
+     * 
+ * + * .google.cloud.deploy.v1.Type type = 7; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Type getType() { + com.google.cloud.deploy.v1.Type result = com.google.cloud.deploy.v1.Type.forNumber(type_); + return result == null ? com.google.cloud.deploy.v1.Type.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Type of this notification, e.g. for a rollout update event.
+     * 
+ * + * .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(); + } + bitField0_ |= 0x00000040; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of this notification, e.g. for a rollout update event.
+     * 
+ * + * .google.cloud.deploy.v1.Type type = 7; + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000040); + 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.RolloutUpdateEvent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.RolloutUpdateEvent) + private static final com.google.cloud.deploy.v1.RolloutUpdateEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.RolloutUpdateEvent(); + } + + public static com.google.cloud.deploy.v1.RolloutUpdateEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RolloutUpdateEvent 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.RolloutUpdateEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutUpdateEventOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutUpdateEventOrBuilder.java new file mode 100644 index 000000000000..b96e8aed835f --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutUpdateEventOrBuilder.java @@ -0,0 +1,202 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/rollout_update_payload.proto + +package com.google.cloud.deploy.v1; + +public interface RolloutUpdateEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.RolloutUpdateEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Unique identifier of the pipeline.
+   * 
+ * + * string pipeline_uid = 1; + * + * @return The pipelineUid. + */ + java.lang.String getPipelineUid(); + /** + * + * + *
+   * Unique identifier of the pipeline.
+   * 
+ * + * string pipeline_uid = 1; + * + * @return The bytes for pipelineUid. + */ + com.google.protobuf.ByteString getPipelineUidBytes(); + + /** + * + * + *
+   * Unique identifier of the release.
+   * 
+ * + * string release_uid = 2; + * + * @return The releaseUid. + */ + java.lang.String getReleaseUid(); + /** + * + * + *
+   * Unique identifier of the release.
+   * 
+ * + * string release_uid = 2; + * + * @return The bytes for releaseUid. + */ + com.google.protobuf.ByteString getReleaseUidBytes(); + + /** + * + * + *
+   * The name of the rollout.
+   * 
+ * + * string rollout = 3; + * + * @return The rollout. + */ + java.lang.String getRollout(); + /** + * + * + *
+   * The name of the rollout.
+   * 
+ * + * string rollout = 3; + * + * @return The bytes for rollout. + */ + com.google.protobuf.ByteString getRolloutBytes(); + + /** + * + * + *
+   * ID of the target.
+   * 
+ * + * string target_id = 4; + * + * @return The targetId. + */ + java.lang.String getTargetId(); + /** + * + * + *
+   * ID of the target.
+   * 
+ * + * string target_id = 4; + * + * @return The bytes for targetId. + */ + com.google.protobuf.ByteString getTargetIdBytes(); + + /** + * + * + *
+   * The type of the rollout update.
+   * 
+ * + * .google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType rollout_update_type = 5; + * + * + * @return The enum numeric value on the wire for rolloutUpdateType. + */ + int getRolloutUpdateTypeValue(); + /** + * + * + *
+   * The type of the rollout update.
+   * 
+ * + * .google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType rollout_update_type = 5; + * + * + * @return The rolloutUpdateType. + */ + com.google.cloud.deploy.v1.RolloutUpdateEvent.RolloutUpdateType getRolloutUpdateType(); + + /** + * + * + *
+   * Debug message for when a rollout update event occurs.
+   * 
+ * + * string message = 6; + * + * @return The message. + */ + java.lang.String getMessage(); + /** + * + * + *
+   * Debug message for when a rollout update event occurs.
+   * 
+ * + * string message = 6; + * + * @return The bytes for message. + */ + com.google.protobuf.ByteString getMessageBytes(); + + /** + * + * + *
+   * Type of this notification, e.g. for a rollout update event.
+   * 
+ * + * .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 rollout update event.
+   * 
+ * + * .google.cloud.deploy.v1.Type type = 7; + * + * @return The type. + */ + com.google.cloud.deploy.v1.Type getType(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutUpdatePayloadProto.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutUpdatePayloadProto.java new file mode 100644 index 000000000000..ce656c2eb2ea --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/RolloutUpdatePayloadProto.java @@ -0,0 +1,87 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/rollout_update_payload.proto + +package com.google.cloud.deploy.v1; + +public final class RolloutUpdatePayloadProto { + private RolloutUpdatePayloadProto() {} + + 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_RolloutUpdateEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_deploy_v1_RolloutUpdateEvent_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/deploy/v1/rollout_update_" + + "payload.proto\022\026google.cloud.deploy.v1\032&g" + + "oogle/cloud/deploy/v1/log_enums.proto\"\206\004" + + "\n\022RolloutUpdateEvent\022\024\n\014pipeline_uid\030\001 \001" + + "(\t\022\023\n\013release_uid\030\002 \001(\t\022\017\n\007rollout\030\003 \001(\t" + + "\022\021\n\ttarget_id\030\004 \001(\t\022Y\n\023rollout_update_ty" + + "pe\030\005 \001(\0162<.google.cloud.deploy.v1.Rollou" + + "tUpdateEvent.RolloutUpdateType\022\017\n\007messag" + + "e\030\006 \001(\t\022*\n\004type\030\007 \001(\0162\034.google.cloud.dep" + + "loy.v1.Type\"\210\002\n\021RolloutUpdateType\022#\n\037ROL" + + "LOUT_UPDATE_TYPE_UNSPECIFIED\020\000\022\013\n\007PENDIN" + + "G\020\001\022\023\n\017PENDING_RELEASE\020\002\022\017\n\013IN_PROGRESS\020" + + "\003\022\016\n\nCANCELLING\020\004\022\r\n\tCANCELLED\020\005\022\n\n\006HALT" + + "ED\020\006\022\r\n\tSUCCEEDED\020\007\022\n\n\006FAILED\020\010\022\025\n\021APPRO" + + "VAL_REQUIRED\020\t\022\014\n\010APPROVED\020\n\022\014\n\010REJECTED" + + "\020\013\022\024\n\020ADVANCE_REQUIRED\020\014\022\014\n\010ADVANCED\020\rBm" + + "\n\032com.google.cloud.deploy.v1B\031RolloutUpd" + + "atePayloadProtoP\001Z2cloud.google.com/go/d" + + "eploy/apiv1/deploypb;deploypbb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.deploy.v1.LogEnumsProto.getDescriptor(), + }); + internal_static_google_cloud_deploy_v1_RolloutUpdateEvent_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_deploy_v1_RolloutUpdateEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_deploy_v1_RolloutUpdateEvent_descriptor, + new java.lang.String[] { + "PipelineUid", + "ReleaseUid", + "Rollout", + "TargetId", + "RolloutUpdateType", + "Message", + "Type", + }); + com.google.cloud.deploy.v1.LogEnumsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Target.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Target.java index 1664e038b8fd..3d761dbfa5d7 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Target.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/Target.java @@ -149,7 +149,7 @@ public DeploymentTargetCase getDeploymentTargetCase() { * *
    * Optional. Name of the `Target`. Format is
-   * projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}.
+   * `projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -173,7 +173,7 @@ public java.lang.String getName() { * *
    * Optional. Name of the `Target`. Format is
-   * projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}.
+   * `projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2118,7 +2118,7 @@ public Builder clearDeploymentTarget() { * *
      * Optional. Name of the `Target`. Format is
-     * projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}.
+     * `projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2141,7 +2141,7 @@ public java.lang.String getName() { * *
      * Optional. Name of the `Target`. Format is
-     * projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}.
+     * `projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2164,7 +2164,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Optional. Name of the `Target`. Format is
-     * projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}.
+     * `projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2186,7 +2186,7 @@ public Builder setName(java.lang.String value) { * *
      * Optional. Name of the `Target`. Format is
-     * projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}.
+     * `projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -2204,7 +2204,7 @@ public Builder clearName() { * *
      * Optional. Name of the `Target`. Format is
-     * projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}.
+     * `projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}`.
      * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetAttribute.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetAttribute.java new file mode 100644 index 000000000000..4f1da75523b2 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetAttribute.java @@ -0,0 +1,989 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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; + +/** + * + * + *
+ * Contains criteria for selecting Targets. Attributes provided must match the
+ * target resource in order for policy restrictions to apply. E.g. if id "prod"
+ * and labels "foo: bar" are given the target resource must match both that id
+ * and have that label in order to be selected.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.TargetAttribute} + */ +public final class TargetAttribute extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.TargetAttribute) + TargetAttributeOrBuilder { + private static final long serialVersionUID = 0L; + // Use TargetAttribute.newBuilder() to construct. + private TargetAttribute(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TargetAttribute() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TargetAttribute(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_TargetAttribute_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_TargetAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.TargetAttribute.class, + com.google.cloud.deploy.v1.TargetAttribute.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+   * ID of the `Target`. The value of this field could be one of the
+   * following:
+   * * The last segment of a target name. It only needs the ID to determine
+   * which target is being referred to
+   * * "*", all targets in a location.
+   * 
+ * + * string id = 1; + * + * @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; + } + } + /** + * + * + *
+   * ID of the `Target`. The value of this field could be one of the
+   * following:
+   * * The last segment of a target name. It only needs the ID to determine
+   * which target is being referred to
+   * * "*", all targets in a location.
+   * 
+ * + * string id = 1; + * + * @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 LABELS_FIELD_NUMBER = 2; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_TargetAttribute_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Target labels.
+   * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Target labels.
+   * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Target labels.
+   * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Target labels.
+   * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + 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_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 2); + 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_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, labels__); + } + 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.TargetAttribute)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.TargetAttribute other = + (com.google.cloud.deploy.v1.TargetAttribute) obj; + + if (!getId().equals(other.getId())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.TargetAttribute parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.TargetAttribute 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.TargetAttribute parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.TargetAttribute 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.TargetAttribute parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.TargetAttribute 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.TargetAttribute parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.TargetAttribute 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.TargetAttribute parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.TargetAttribute 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.TargetAttribute 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.TargetAttribute 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.TargetAttribute 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; + } + /** + * + * + *
+   * Contains criteria for selecting Targets. Attributes provided must match the
+   * target resource in order for policy restrictions to apply. E.g. if id "prod"
+   * and labels "foo: bar" are given the target resource must match both that id
+   * and have that label in order to be selected.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.TargetAttribute} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.TargetAttribute) + com.google.cloud.deploy.v1.TargetAttributeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_TargetAttribute_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_TargetAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.TargetAttribute.class, + com.google.cloud.deploy.v1.TargetAttribute.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.TargetAttribute.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + internalGetMutableLabels().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_TargetAttribute_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.TargetAttribute getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.TargetAttribute.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.TargetAttribute build() { + com.google.cloud.deploy.v1.TargetAttribute result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.TargetAttribute buildPartial() { + com.google.cloud.deploy.v1.TargetAttribute result = + new com.google.cloud.deploy.v1.TargetAttribute(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.TargetAttribute result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + } + + @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.TargetAttribute) { + return mergeFrom((com.google.cloud.deploy.v1.TargetAttribute) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.TargetAttribute other) { + if (other == com.google.cloud.deploy.v1.TargetAttribute.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000002; + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * ID of the `Target`. The value of this field could be one of the
+     * following:
+     * * The last segment of a target name. It only needs the ID to determine
+     * which target is being referred to
+     * * "*", all targets in a location.
+     * 
+ * + * string id = 1; + * + * @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; + } + } + /** + * + * + *
+     * ID of the `Target`. The value of this field could be one of the
+     * following:
+     * * The last segment of a target name. It only needs the ID to determine
+     * which target is being referred to
+     * * "*", all targets in a location.
+     * 
+ * + * string id = 1; + * + * @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; + } + } + /** + * + * + *
+     * ID of the `Target`. The value of this field could be one of the
+     * following:
+     * * The last segment of a target name. It only needs the ID to determine
+     * which target is being referred to
+     * * "*", all targets in a location.
+     * 
+ * + * string id = 1; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the `Target`. The value of this field could be one of the
+     * following:
+     * * The last segment of a target name. It only needs the ID to determine
+     * which target is being referred to
+     * * "*", all targets in a location.
+     * 
+ * + * string id = 1; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the `Target`. The value of this field could be one of the
+     * following:
+     * * The last segment of a target name. It only needs the ID to determine
+     * which target is being referred to
+     * * "*", all targets in a location.
+     * 
+ * + * string id = 1; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Target labels.
+     * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Target labels.
+     * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Target labels.
+     * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Target labels.
+     * 
+ * + * map<string, string> labels = 2; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Target labels.
+     * 
+ * + * map<string, string> labels = 2; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000002; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Target labels.
+     * 
+ * + * map<string, string> labels = 2; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * + * + *
+     * Target labels.
+     * 
+ * + * map<string, string> labels = 2; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000002; + 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.TargetAttribute) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.TargetAttribute) + private static final com.google.cloud.deploy.v1.TargetAttribute DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.TargetAttribute(); + } + + public static com.google.cloud.deploy.v1.TargetAttribute getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TargetAttribute 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.TargetAttribute getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetAttributeOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetAttributeOrBuilder.java new file mode 100644 index 000000000000..a50c1c158ed7 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetAttributeOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 TargetAttributeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.TargetAttribute) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * ID of the `Target`. The value of this field could be one of the
+   * following:
+   * * The last segment of a target name. It only needs the ID to determine
+   * which target is being referred to
+   * * "*", all targets in a location.
+   * 
+ * + * string id = 1; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * ID of the `Target`. The value of this field could be one of the
+   * following:
+   * * The last segment of a target name. It only needs the ID to determine
+   * which target is being referred to
+   * * "*", all targets in a location.
+   * 
+ * + * string id = 1; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Target labels.
+   * 
+ * + * map<string, string> labels = 2; + */ + int getLabelsCount(); + /** + * + * + *
+   * Target labels.
+   * 
+ * + * map<string, string> labels = 2; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Target labels.
+   * 
+ * + * map<string, string> labels = 2; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Target labels.
+   * 
+ * + * map<string, string> labels = 2; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Target labels.
+   * 
+ * + * map<string, string> labels = 2; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetOrBuilder.java index a132bcafb311..89ca1b8d003d 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetOrBuilder.java @@ -28,7 +28,7 @@ public interface TargetOrBuilder * *
    * Optional. Name of the `Target`. Format is
-   * projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}.
+   * `projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -41,7 +41,7 @@ public interface TargetOrBuilder * *
    * Optional. Name of the `Target`. Format is
-   * projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}.
+   * `projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}`.
    * 
* * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentCondition.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentCondition.java index c7b9870816af..03cfeeb7ad37 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentCondition.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentCondition.java @@ -91,7 +91,7 @@ public boolean getStatus() { * *
    * The list of Target names that do not exist. For example,
-   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
    * 
* * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } @@ -106,7 +106,7 @@ public com.google.protobuf.ProtocolStringList getMissingTargetsList() { * *
    * The list of Target names that do not exist. For example,
-   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
    * 
* * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } @@ -121,7 +121,7 @@ public int getMissingTargetsCount() { * *
    * The list of Target names that do not exist. For example,
-   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
    * 
* * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } @@ -137,7 +137,7 @@ public java.lang.String getMissingTargets(int index) { * *
    * The list of Target names that do not exist. For example,
-   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
    * 
* * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } @@ -672,7 +672,7 @@ private void ensureMissingTargetsIsMutable() { * *
      * The list of Target names that do not exist. For example,
-     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
      * 
* * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } @@ -688,7 +688,7 @@ public com.google.protobuf.ProtocolStringList getMissingTargetsList() { * *
      * The list of Target names that do not exist. For example,
-     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
      * 
* * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } @@ -703,7 +703,7 @@ public int getMissingTargetsCount() { * *
      * The list of Target names that do not exist. For example,
-     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
      * 
* * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } @@ -719,7 +719,7 @@ public java.lang.String getMissingTargets(int index) { * *
      * The list of Target names that do not exist. For example,
-     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
      * 
* * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } @@ -735,7 +735,7 @@ public com.google.protobuf.ByteString getMissingTargetsBytes(int index) { * *
      * The list of Target names that do not exist. For example,
-     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
      * 
* * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } @@ -759,7 +759,7 @@ public Builder setMissingTargets(int index, java.lang.String value) { * *
      * The list of Target names that do not exist. For example,
-     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
      * 
* * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } @@ -782,7 +782,7 @@ public Builder addMissingTargets(java.lang.String value) { * *
      * The list of Target names that do not exist. For example,
-     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
      * 
* * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } @@ -802,7 +802,7 @@ public Builder addAllMissingTargets(java.lang.Iterable values) * *
      * The list of Target names that do not exist. For example,
-     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
      * 
* * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } @@ -821,7 +821,7 @@ public Builder clearMissingTargets() { * *
      * The list of Target names that do not exist. For example,
-     * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+     * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
      * 
* * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentConditionOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentConditionOrBuilder.java index 9c90b5d68fe9..bd0baf012cf0 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentConditionOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TargetsPresentConditionOrBuilder.java @@ -41,7 +41,7 @@ public interface TargetsPresentConditionOrBuilder * *
    * The list of Target names that do not exist. For example,
-   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
    * 
* * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } @@ -54,7 +54,7 @@ public interface TargetsPresentConditionOrBuilder * *
    * The list of Target names that do not exist. For example,
-   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
    * 
* * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } @@ -67,7 +67,7 @@ public interface TargetsPresentConditionOrBuilder * *
    * The list of Target names that do not exist. For example,
-   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
    * 
* * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } @@ -81,7 +81,7 @@ public interface TargetsPresentConditionOrBuilder * *
    * The list of Target names that do not exist. For example,
-   * projects/{project_id}/locations/{location_name}/targets/{target_name}.
+   * `projects/{project_id}/locations/{location_name}/targets/{target_name}`.
    * 
* * repeated string missing_targets = 2 [(.google.api.resource_reference) = { ... } diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TerminateJobRunRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TerminateJobRunRequest.java index e7d0071be0f9..b5f8c8b7b5d5 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TerminateJobRunRequest.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TerminateJobRunRequest.java @@ -71,8 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. Name of the `JobRun`. Format must be
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`.
    * 
* * @@ -98,8 +97,7 @@ public java.lang.String getName() { * *
    * Required. Name of the `JobRun`. Format must be
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`.
    * 
* * @@ -469,8 +467,7 @@ public Builder mergeFrom( * *
      * Required. Name of the `JobRun`. Format must be
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`.
      * 
* * @@ -495,8 +492,7 @@ public java.lang.String getName() { * *
      * Required. Name of the `JobRun`. Format must be
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`.
      * 
* * @@ -521,8 +517,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. Name of the `JobRun`. Format must be
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`.
      * 
* * @@ -546,8 +541,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. Name of the `JobRun`. Format must be
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`.
      * 
* * @@ -567,8 +561,7 @@ public Builder clearName() { * *
      * Required. Name of the `JobRun`. Format must be
-     * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-     * releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}.
+     * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TerminateJobRunRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TerminateJobRunRequestOrBuilder.java index b0ecd67707b9..25b077534887 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TerminateJobRunRequestOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/TerminateJobRunRequestOrBuilder.java @@ -28,8 +28,7 @@ public interface TerminateJobRunRequestOrBuilder * *
    * Required. Name of the `JobRun`. Format must be
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`.
    * 
* * @@ -44,8 +43,7 @@ public interface TerminateJobRunRequestOrBuilder * *
    * Required. Name of the `JobRun`. Format must be
-   * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
-   * releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}.
+   * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateAutomationRequest.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateAutomationRequest.java new file mode 100644 index 000000000000..6cf59152c750 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateAutomationRequest.java @@ -0,0 +1,1510 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 for `UpdateAutomation`.
+ * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.UpdateAutomationRequest} + */ +public final class UpdateAutomationRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.deploy.v1.UpdateAutomationRequest) + UpdateAutomationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateAutomationRequest.newBuilder() to construct. + private UpdateAutomationRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateAutomationRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateAutomationRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_UpdateAutomationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_UpdateAutomationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.UpdateAutomationRequest.class, + com.google.cloud.deploy.v1.UpdateAutomationRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Automation` resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Automation` resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Automation` resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int AUTOMATION_FIELD_NUMBER = 2; + private com.google.cloud.deploy.v1.Automation automation_; + /** + * + * + *
+   * Required. The `Automation` to update.
+   * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the automation field is set. + */ + @java.lang.Override + public boolean hasAutomation() { + return automation_ != null; + } + /** + * + * + *
+   * Required. The `Automation` to update.
+   * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The automation. + */ + @java.lang.Override + public com.google.cloud.deploy.v1.Automation getAutomation() { + return automation_ == null + ? com.google.cloud.deploy.v1.Automation.getDefaultInstance() + : automation_; + } + /** + * + * + *
+   * Required. The `Automation` to update.
+   * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.deploy.v1.AutomationOrBuilder getAutomationOrBuilder() { + return automation_ == null + ? com.google.cloud.deploy.v1.Automation.getDefaultInstance() + : automation_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_MISSING_FIELD_NUMBER = 4; + private boolean allowMissing_ = false; + /** + * + * + *
+   * Optional. If set to true, updating a `Automation` that does not exist will
+   * result in the creation of a new `Automation`.
+   * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 5; + private boolean validateOnly_ = false; + /** + * + * + *
+   * Optional. If set to true, the request is validated and the user is provided
+   * with an expected result, but no actual change is made.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (automation_ != null) { + output.writeMessage(2, getAutomation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + if (allowMissing_ != false) { + output.writeBool(4, allowMissing_); + } + if (validateOnly_ != false) { + output.writeBool(5, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (automation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAutomation()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + if (allowMissing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, allowMissing_); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, validateOnly_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.deploy.v1.UpdateAutomationRequest)) { + return super.equals(obj); + } + com.google.cloud.deploy.v1.UpdateAutomationRequest other = + (com.google.cloud.deploy.v1.UpdateAutomationRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasAutomation() != other.hasAutomation()) return false; + if (hasAutomation()) { + if (!getAutomation().equals(other.getAutomation())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (getAllowMissing() != other.getAllowMissing()) return false; + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasAutomation()) { + hash = (37 * hash) + AUTOMATION_FIELD_NUMBER; + hash = (53 * hash) + getAutomation().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; + 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) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.deploy.v1.UpdateAutomationRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.UpdateAutomationRequest 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.UpdateAutomationRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.UpdateAutomationRequest 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.UpdateAutomationRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.deploy.v1.UpdateAutomationRequest 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.UpdateAutomationRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.UpdateAutomationRequest 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.UpdateAutomationRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.deploy.v1.UpdateAutomationRequest 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.UpdateAutomationRequest 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.UpdateAutomationRequest 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.UpdateAutomationRequest 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 for `UpdateAutomation`.
+   * 
+ * + * Protobuf type {@code google.cloud.deploy.v1.UpdateAutomationRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.deploy.v1.UpdateAutomationRequest) + com.google.cloud.deploy.v1.UpdateAutomationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_UpdateAutomationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.deploy.v1.CloudDeployProto + .internal_static_google_cloud_deploy_v1_UpdateAutomationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.deploy.v1.UpdateAutomationRequest.class, + com.google.cloud.deploy.v1.UpdateAutomationRequest.Builder.class); + } + + // Construct using com.google.cloud.deploy.v1.UpdateAutomationRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + automation_ = null; + if (automationBuilder_ != null) { + automationBuilder_.dispose(); + automationBuilder_ = null; + } + requestId_ = ""; + allowMissing_ = false; + validateOnly_ = 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_UpdateAutomationRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.UpdateAutomationRequest getDefaultInstanceForType() { + return com.google.cloud.deploy.v1.UpdateAutomationRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.deploy.v1.UpdateAutomationRequest build() { + com.google.cloud.deploy.v1.UpdateAutomationRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.deploy.v1.UpdateAutomationRequest buildPartial() { + com.google.cloud.deploy.v1.UpdateAutomationRequest result = + new com.google.cloud.deploy.v1.UpdateAutomationRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.deploy.v1.UpdateAutomationRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.automation_ = automationBuilder_ == null ? automation_ : automationBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.allowMissing_ = allowMissing_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.validateOnly_ = validateOnly_; + } + } + + @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.UpdateAutomationRequest) { + return mergeFrom((com.google.cloud.deploy.v1.UpdateAutomationRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.deploy.v1.UpdateAutomationRequest other) { + if (other == com.google.cloud.deploy.v1.UpdateAutomationRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasAutomation()) { + mergeAutomation(other.getAutomation()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getAllowMissing() != false) { + setAllowMissing(other.getAllowMissing()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getAutomationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + allowMissing_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000010; + 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) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Automation` resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Automation` resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Automation` resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Automation` resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Automation` resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Automation` resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Automation` resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Automation` resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Field mask is used to specify the fields to be overwritten in the
+     * `Automation` resource by the update.
+     * The fields specified in the update_mask are relative to the resource, not
+     * the full request. A field will be overwritten if it is in the mask. If the
+     * user does not provide a mask then all fields will be overwritten.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.deploy.v1.Automation automation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Automation, + com.google.cloud.deploy.v1.Automation.Builder, + com.google.cloud.deploy.v1.AutomationOrBuilder> + automationBuilder_; + /** + * + * + *
+     * Required. The `Automation` to update.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the automation field is set. + */ + public boolean hasAutomation() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The `Automation` to update.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The automation. + */ + public com.google.cloud.deploy.v1.Automation getAutomation() { + if (automationBuilder_ == null) { + return automation_ == null + ? com.google.cloud.deploy.v1.Automation.getDefaultInstance() + : automation_; + } else { + return automationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The `Automation` to update.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutomation(com.google.cloud.deploy.v1.Automation value) { + if (automationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + automation_ = value; + } else { + automationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `Automation` to update.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAutomation(com.google.cloud.deploy.v1.Automation.Builder builderForValue) { + if (automationBuilder_ == null) { + automation_ = builderForValue.build(); + } else { + automationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `Automation` to update.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAutomation(com.google.cloud.deploy.v1.Automation value) { + if (automationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && automation_ != null + && automation_ != com.google.cloud.deploy.v1.Automation.getDefaultInstance()) { + getAutomationBuilder().mergeFrom(value); + } else { + automation_ = value; + } + } else { + automationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `Automation` to update.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAutomation() { + bitField0_ = (bitField0_ & ~0x00000002); + automation_ = null; + if (automationBuilder_ != null) { + automationBuilder_.dispose(); + automationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The `Automation` to update.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.Automation.Builder getAutomationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAutomationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The `Automation` to update.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.deploy.v1.AutomationOrBuilder getAutomationOrBuilder() { + if (automationBuilder_ != null) { + return automationBuilder_.getMessageOrBuilder(); + } else { + return automation_ == null + ? com.google.cloud.deploy.v1.Automation.getDefaultInstance() + : automation_; + } + } + /** + * + * + *
+     * Required. The `Automation` to update.
+     * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Automation, + com.google.cloud.deploy.v1.Automation.Builder, + com.google.cloud.deploy.v1.AutomationOrBuilder> + getAutomationFieldBuilder() { + if (automationBuilder_ == null) { + automationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.deploy.v1.Automation, + com.google.cloud.deploy.v1.Automation.Builder, + com.google.cloud.deploy.v1.AutomationOrBuilder>( + getAutomation(), getParentForChildren(), isClean()); + automation_ = null; + } + return automationBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID
+     * so that if you must retry your request, the server will know to ignore
+     * the request if it has already been completed. The server will guarantee
+     * that for at least 60 minutes since the first request.
+     *
+     * For example, consider a situation where you make an initial request and the
+     * request times out. If you make the request again with the same request ID,
+     * the server can check if original operation with the same request ID was
+     * received, and if so, will ignore the second request. This prevents clients
+     * from accidentally creating duplicate commitments.
+     *
+     * The request ID must be a valid UUID with the exception that zero UUID is
+     * not supported (00000000-0000-0000-0000-000000000000).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean allowMissing_; + /** + * + * + *
+     * Optional. If set to true, updating a `Automation` that does not exist will
+     * result in the creation of a new `Automation`.
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + @java.lang.Override + public boolean getAllowMissing() { + return allowMissing_; + } + /** + * + * + *
+     * Optional. If set to true, updating a `Automation` that does not exist will
+     * result in the creation of a new `Automation`.
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowMissing to set. + * @return This builder for chaining. + */ + public Builder setAllowMissing(boolean value) { + + allowMissing_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, updating a `Automation` that does not exist will
+     * result in the creation of a new `Automation`.
+     * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowMissing() { + bitField0_ = (bitField0_ & ~0x00000008); + allowMissing_ = false; + onChanged(); + return this; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided
+     * with an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided
+     * with an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set to true, the request is validated and the user is provided
+     * with an expected result, but no actual change is made.
+     * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000010); + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.deploy.v1.UpdateAutomationRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.deploy.v1.UpdateAutomationRequest) + private static final com.google.cloud.deploy.v1.UpdateAutomationRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.deploy.v1.UpdateAutomationRequest(); + } + + public static com.google.cloud.deploy.v1.UpdateAutomationRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAutomationRequest 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.UpdateAutomationRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateAutomationRequestOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateAutomationRequestOrBuilder.java new file mode 100644 index 000000000000..2bf5baa7cb27 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/UpdateAutomationRequestOrBuilder.java @@ -0,0 +1,193 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 UpdateAutomationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.deploy.v1.UpdateAutomationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Automation` resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Automation` resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Field mask is used to specify the fields to be overwritten in the
+   * `Automation` resource by the update.
+   * The fields specified in the update_mask are relative to the resource, not
+   * the full request. A field will be overwritten if it is in the mask. If the
+   * user does not provide a mask then all fields will be overwritten.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. The `Automation` to update.
+   * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the automation field is set. + */ + boolean hasAutomation(); + /** + * + * + *
+   * Required. The `Automation` to update.
+   * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The automation. + */ + com.google.cloud.deploy.v1.Automation getAutomation(); + /** + * + * + *
+   * Required. The `Automation` to update.
+   * 
+ * + * + * .google.cloud.deploy.v1.Automation automation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.deploy.v1.AutomationOrBuilder getAutomationOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID
+   * so that if you must retry your request, the server will know to ignore
+   * the request if it has already been completed. The server will guarantee
+   * that for at least 60 minutes since the first request.
+   *
+   * For example, consider a situation where you make an initial request and the
+   * request times out. If you make the request again with the same request ID,
+   * the server can check if original operation with the same request ID was
+   * received, and if so, will ignore the second request. This prevents clients
+   * from accidentally creating duplicate commitments.
+   *
+   * The request ID must be a valid UUID with the exception that zero UUID is
+   * not supported (00000000-0000-0000-0000-000000000000).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. If set to true, updating a `Automation` that does not exist will
+   * result in the creation of a new `Automation`.
+   * 
+ * + * bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowMissing. + */ + boolean getAllowMissing(); + + /** + * + * + *
+   * Optional. If set to true, the request is validated and the user is provided
+   * with an expected result, but no actual change is made.
+   * 
+ * + * bool validate_only = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJobRun.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJobRun.java index 2dcfeeca4b86..fb8e22101a80 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJobRun.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJobRun.java @@ -113,7 +113,7 @@ public enum FailureCause implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The verify build did not complete within the alloted time.
+     * The verify job run did not complete within the alloted time.
      * 
* * DEADLINE_EXCEEDED = 3; @@ -180,7 +180,7 @@ public enum FailureCause implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * The verify build did not complete within the alloted time.
+     * The verify job run did not complete within the alloted time.
      * 
* * DEADLINE_EXCEEDED = 3; @@ -307,7 +307,7 @@ private FailureCause(int value) { *
    * Output only. The resource name of the Cloud Build `Build` object that is
    * used to verify. Format is
-   * projects/{project}/locations/{location}/builds/{build}.
+   * `projects/{project}/locations/{location}/builds/{build}`.
    * 
* * @@ -334,7 +334,7 @@ public 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}.
+   * `projects/{project}/locations/{location}/builds/{build}`.
    * 
* * @@ -1001,7 +1001,7 @@ public Builder mergeFrom( *
      * Output only. The resource name of the Cloud Build `Build` object that is
      * used to verify. Format is
-     * projects/{project}/locations/{location}/builds/{build}.
+     * `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * @@ -1027,7 +1027,7 @@ public 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}.
+     * `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * @@ -1053,7 +1053,7 @@ public com.google.protobuf.ByteString getBuildBytes() { *
      * Output only. The resource name of the Cloud Build `Build` object that is
      * used to verify. Format is
-     * projects/{project}/locations/{location}/builds/{build}.
+     * `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * @@ -1078,7 +1078,7 @@ public Builder setBuild(java.lang.String value) { *
      * Output only. The resource name of the Cloud Build `Build` object that is
      * used to verify. Format is
-     * projects/{project}/locations/{location}/builds/{build}.
+     * `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * @@ -1099,7 +1099,7 @@ public Builder clearBuild() { *
      * Output only. The resource name of the Cloud Build `Build` object that is
      * used to verify. Format is
-     * projects/{project}/locations/{location}/builds/{build}.
+     * `projects/{project}/locations/{location}/builds/{build}`.
      * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJobRunOrBuilder.java b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJobRunOrBuilder.java index 76e834dcdaea..84d3101b42b8 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJobRunOrBuilder.java +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/java/com/google/cloud/deploy/v1/VerifyJobRunOrBuilder.java @@ -29,7 +29,7 @@ public interface VerifyJobRunOrBuilder *
    * Output only. The resource name of the Cloud Build `Build` object that is
    * used to verify. Format is
-   * projects/{project}/locations/{location}/builds/{build}.
+   * `projects/{project}/locations/{location}/builds/{build}`.
    * 
* * @@ -45,7 +45,7 @@ public interface VerifyJobRunOrBuilder *
    * Output only. The resource name of the Cloud Build `Build` object that is
    * used to verify. Format is
-   * projects/{project}/locations/{location}/builds/{build}.
+   * `projects/{project}/locations/{location}/builds/{build}`.
    * 
* * diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/automation_payload.proto b/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/automation_payload.proto new file mode 100644 index 000000000000..8a3ca07410f3 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/automation_payload.proto @@ -0,0 +1,41 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; +option java_multiple_files = true; +option java_outer_classname = "AutomationPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/automation" +// Platform Log event that describes the Automation related events. +message AutomationEvent { + // Debug message for when there is an update on the AutomationRun. + // Provides further details about the resource creation or state change. + string message = 1; + + // The name of the `AutomationRun`. + string automation = 2; + + // Unique identifier of the `DeliveryPipeline`. + string pipeline_uid = 3; + + // Type of this notification, e.g. for a Pub/Sub failure. + Type type = 4; +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/automationrun_payload.proto b/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/automationrun_payload.proto new file mode 100644 index 000000000000..b34192ceb9d9 --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/automationrun_payload.proto @@ -0,0 +1,50 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; +option java_multiple_files = true; +option java_outer_classname = "AutomationRunPayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/automation_run" +// Platform Log event that describes the AutomationRun related events. +message AutomationRunEvent { + // Debug message for when there is an update on the AutomationRun. + // Provides further details about the resource creation or state change. + string message = 1; + + // The name of the `AutomationRun`. + string automation_run = 2; + + // Unique identifier of the `DeliveryPipeline`. + string pipeline_uid = 3; + + // Identifier of the `Automation`. + string automation_id = 4; + + // Identifier of the `Automation` rule. + string rule_id = 5; + + // ID of the `Target` to which the `AutomationRun` is created. + string destination_target_id = 6; + + // Type of this notification, e.g. for a Pub/Sub failure. + Type type = 7; +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/cloud_deploy.proto b/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/cloud_deploy.proto index b930b9a5b665..c6e5782a37c1 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/cloud_deploy.proto +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/cloud_deploy.proto @@ -55,6 +55,10 @@ option (google.api.resource_definition) = { type: "run.googleapis.com/Service" pattern: "projects/{project}/locations/{location}/services/{service}" }; +option (google.api.resource_definition) = { + type: "run.googleapis.com/Job" + pattern: "projects/{project}/locations/{location}/jobs/{job}" +}; // CloudDeploy service creates and manages Continuous Delivery operations // on Google Cloud Platform via Skaffold (https://skaffold.dev). @@ -131,6 +135,15 @@ service CloudDeploy { option (google.api.method_signature) = "parent"; } + // Creates a `Rollout` to roll back the specified target. + rpc RollbackTarget(RollbackTargetRequest) returns (RollbackTargetResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}:rollbackTarget" + body: "*" + }; + option (google.api.method_signature) = "name,target_id,rollout_id"; + } + // Gets details of a single Target. rpc GetTarget(GetTargetRequest) returns (Target) { option (google.api.http) = { @@ -324,6 +337,94 @@ service CloudDeploy { }; option (google.api.method_signature) = "name"; } + + // Creates a new Automation in a given project and location. + rpc CreateAutomation(CreateAutomationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations" + body: "automation" + }; + option (google.api.method_signature) = "parent,automation,automation_id"; + option (google.longrunning.operation_info) = { + response_type: "Automation" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Automation resource. + rpc UpdateAutomation(UpdateAutomationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{automation.name=projects/*/locations/*/deliveryPipelines/*/automations/*}" + body: "automation" + }; + option (google.api.method_signature) = "automation,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Automation" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Automation resource. + rpc DeleteAutomation(DeleteAutomationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single Automation. + rpc GetAutomation(GetAutomationRequest) returns (Automation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Automations in a given project and location. + rpc ListAutomations(ListAutomationsRequest) + returns (ListAutomationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automations" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single AutomationRun. + rpc GetAutomationRun(GetAutomationRunRequest) returns (AutomationRun) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists AutomationRuns in a given project and location. + rpc ListAutomationRuns(ListAutomationRunsRequest) + returns (ListAutomationRunsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/automationRuns" + }; + option (google.api.method_signature) = "parent"; + } + + // Cancels an AutomationRun. The `state` of the `AutomationRun` after + // cancelling is `CANCELLED`. `CancelAutomationRun` can be called on + // AutomationRun in the state `IN_PROGRESS` and `PENDING`; AutomationRun + // in a different state returns an `FAILED_PRECONDITION` error. + rpc CancelAutomationRun(CancelAutomationRunRequest) + returns (CancelAutomationRunResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/automationRuns/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } } // A `DeliveryPipeline` resource in the Cloud Deploy API. @@ -336,8 +437,8 @@ message DeliveryPipeline { pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}" }; - // Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/ - // locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}. + // Optional. Name of the `DeliveryPipeline`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}`. string name = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. Unique identifier of the `DeliveryPipeline`. @@ -448,14 +549,14 @@ message Strategy { // Predeploy contains the predeploy job configuration information. message Predeploy { - // Optional. A sequence of skaffold custom actions to invoke during execution + // Optional. A sequence of Skaffold custom actions to invoke during execution // of the predeploy job. repeated string actions = 1 [(google.api.field_behavior) = OPTIONAL]; } // Postdeploy contains the postdeploy job configuration information. message Postdeploy { - // Optional. A sequence of skaffold custom actions to invoke during execution + // Optional. A sequence of Skaffold custom actions to invoke during execution // of the postdeploy job. repeated string actions = 1 [(google.api.field_behavior) = OPTIONAL]; } @@ -504,11 +605,11 @@ message CanaryDeployment { bool verify = 2; // Optional. Configuration for the predeploy job of the first phase. If this - // is not configured, predeploy job will not be present. + // is not configured, there will be no predeploy job for this phase. Predeploy predeploy = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Configuration for the postdeploy job of the last phase. If this - // is not configured, postdeploy job will not be present. + // is not configured, there will be no postdeploy job for this phase. Postdeploy postdeploy = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -537,11 +638,11 @@ message CustomCanaryDeployment { bool verify = 4; // Optional. Configuration for the predeploy job of this phase. If this is - // not configured, predeploy job will not be present for this phase. + // not configured, there will be no predeploy job for this phase. Predeploy predeploy = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. Configuration for the postdeploy job of this phase. If this is - // not configured, postdeploy job will not be present for this phase. + // not configured, there will be no postdeploy job for this phase. Postdeploy postdeploy = 6 [(google.api.field_behavior) = OPTIONAL]; } @@ -641,7 +742,7 @@ message TargetsPresentCondition { bool status = 1; // The list of Target names that do not exist. For example, - // projects/{project_id}/locations/{location_name}/targets/{target_name}. + // `projects/{project_id}/locations/{location_name}/targets/{target_name}`. repeated string missing_targets = 2 [(google.api.resource_reference) = { type: "clouddeploy.googleapis.com/Target" }]; @@ -678,7 +779,7 @@ message PipelineCondition { // The request object for `ListDeliveryPipelines`. message ListDeliveryPipelinesRequest { // Required. The parent, which owns this collection of pipelines. Format must - // be projects/{project_id}/locations/{location_name}. + // be `projects/{project_id}/locations/{location_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -723,7 +824,7 @@ message ListDeliveryPipelinesResponse { // The request object for `GetDeliveryPipeline` message GetDeliveryPipelineRequest { // Required. Name of the `DeliveryPipeline`. Format must be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -735,7 +836,8 @@ message GetDeliveryPipelineRequest { // The request object for `CreateDeliveryPipeline`. message CreateDeliveryPipelineRequest { // Required. The parent collection in which the `DeliveryPipeline` should be - // created. Format should be projects/{project_id}/locations/{location_name}. + // created. Format should be + // `projects/{project_id}/locations/{location_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -811,7 +913,7 @@ message UpdateDeliveryPipelineRequest { // The request object for `DeleteDeliveryPipeline`. message DeleteDeliveryPipelineRequest { // Required. The name of the `DeliveryPipeline` to delete. Format should be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -853,6 +955,58 @@ message DeleteDeliveryPipelineRequest { string etag = 5 [(google.api.field_behavior) = OPTIONAL]; } +// Configs for the Rollback rollout. +message RollbackTargetConfig { + // Optional. The rollback `Rollout` to create. + Rollout rollout = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The starting phase ID for the `Rollout`. If unspecified, the + // `Rollout` will start in the stable phase. + string starting_phase_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `RollbackTarget`. +message RollbackTargetRequest { + // Required. The `DeliveryPipeline` for which the rollback `Rollout` should be + // created. Format should be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/DeliveryPipeline" + } + ]; + + // Required. ID of the `Target` that is being rolled back. + string target_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the rollback `Rollout` to create. + string rollout_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. ID of the `Release` to roll back to. If this isn't specified, the + // previous successful `Rollout` to the specified target will be used to + // determine the `Release`. + string release_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If provided, this must be the latest `Rollout` that is on the + // `Target`. + string rollout_to_roll_back = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configs for the rollback `Rollout`. + RollbackTargetConfig rollback_config = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided + // with a `RollbackTargetResponse`. + bool validate_only = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response object from `RollbackTarget`. +message RollbackTargetResponse { + // The config of the rollback `Rollout` created or will be created. + RollbackTargetConfig rollback_config = 1; +} + // A `Target` resource in the Cloud Deploy API. // // A `Target` defines a location to which a Skaffold configuration @@ -864,7 +1018,7 @@ message Target { }; // Optional. Name of the `Target`. Format is - // projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}. + // `projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}`. string name = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. Resource id of the `Target`. @@ -1046,7 +1200,7 @@ message PrivatePool { // Information specifying a GKE Cluster. message GkeCluster { // Information specifying a GKE Cluster. Format is - // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}. + // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`. string cluster = 1 [(google.api.resource_reference) = { type: "container.googleapis.com/Cluster" }]; @@ -1093,7 +1247,7 @@ message MultiTarget { // The request object for `ListTargets`. message ListTargetsRequest { // Required. The parent, which owns this collection of targets. Format must be - // projects/{project_id}/locations/{location_name}. + // `projects/{project_id}/locations/{location_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1139,7 +1293,7 @@ message ListTargetsResponse { // The request object for `GetTarget`. message GetTargetRequest { // Required. Name of the `Target`. Format must be - // projects/{project_id}/locations/{location_name}/targets/{target_name}. + // `projects/{project_id}/locations/{location_name}/targets/{target_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1152,7 +1306,7 @@ message GetTargetRequest { message CreateTargetRequest { // Required. The parent collection in which the `Target` should be created. // Format should be - // projects/{project_id}/locations/{location_name}. + // `projects/{project_id}/locations/{location_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1226,7 +1380,7 @@ message UpdateTargetRequest { // The request object for `DeleteTarget`. message DeleteTargetRequest { // Required. The name of the `Target` to delete. Format should be - // projects/{project_id}/locations/{location_name}/targets/{target_name}. + // `projects/{project_id}/locations/{location_name}/targets/{target_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1263,6 +1417,22 @@ message DeleteTargetRequest { string etag = 5 [(google.api.field_behavior) = OPTIONAL]; } +// Contains criteria for selecting Targets. Attributes provided must match the +// target resource in order for policy restrictions to apply. E.g. if id "prod" +// and labels "foo: bar" are given the target resource must match both that id +// and have that label in order to be selected. +message TargetAttribute { + // ID of the `Target`. The value of this field could be one of the + // following: + // * The last segment of a target name. It only needs the ID to determine + // which target is being referred to + // * "*", all targets in a location. + string id = 1; + + // Target labels. + map labels = 2; +} + // A `Release` resource in the Cloud Deploy API. // // A `Release` defines a specific Skaffold configuration instance @@ -1323,6 +1493,11 @@ message Release { // failure_message for additional details. CLOUD_BUILD_REQUEST_FAILED = 3; + // The render operation did not complete successfully because the + // verification stanza required for verify was not found on the skaffold + // configuration. + VERIFICATION_CONFIG_NOT_FOUND = 4; + // The render operation did not complete successfully because the custom // action required for predeploy or postdeploy was not found in the // skaffold configuration. See failure_message for additional details. @@ -1394,9 +1569,8 @@ message Release { SkaffoldSupportedCondition skaffold_supported_condition = 2; } - // Optional. Name of the `Release`. Format is projects/{project}/ - // locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/[a-z][a-z0-9\-]{0,62}. + // Optional. Name of the `Release`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/[a-z][a-z0-9\-]{0,62}`. string name = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. Unique identifier of the `Release`. @@ -1551,7 +1725,7 @@ message DeployArtifact { // `Release` render. message CloudRunRenderMetadata { // Output only. The name of the Cloud Run Service in the rendered manifest. - // Format is projects/{project}/locations/{location}/services/{service}. + // Format is `projects/{project}/locations/{location}/services/{service}`. string service = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { type: "run.googleapis.com/Service" } @@ -1614,7 +1788,7 @@ message ListReleasesResponse { // The request object for `GetRelease`. message GetReleaseRequest { // Required. Name of the `Release`. Format must be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1627,7 +1801,7 @@ message GetReleaseRequest { message CreateReleaseRequest { // Required. The parent collection in which the `Release` should be created. // Format should be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1756,9 +1930,8 @@ message Rollout { CLOUD_BUILD_REQUEST_FAILED = 7; } - // Optional. Name of the `Rollout`. Format is projects/{project}/ - // locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}. + // Optional. Name of the `Rollout`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. string name = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. Unique identifier of the `Rollout`. @@ -1845,10 +2018,17 @@ message Rollout { // Output only. Metadata contains information about the rollout. Metadata metadata = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Name of the `ControllerRollout`. Format is projects/{project}/ - // locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}. + // Output only. Name of the `ControllerRollout`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. string controller_rollout = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the `Rollout` that is rolled back by this `Rollout`. + // Empty if this `Rollout` wasn't created as a rollback. + string rollback_of_rollout = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Names of `Rollouts` that rolled back this `Rollout`. + repeated string rolled_back_by_rollouts = 27 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Metadata includes information associated with a `Rollout`. @@ -1856,6 +2036,11 @@ 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]; + + // Output only. AutomationRolloutMetadata contains the information about the + // interactions between Automation service and this rollout. + AutomationRolloutMetadata automation = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // DeployJobRunMetadata surfaces information associated with a `DeployJobRun` to @@ -1870,7 +2055,7 @@ message DeployJobRunMetadata { 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}. + // `projects/{project}/locations/{location}/services/{service}`. string service = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { type: "run.googleapis.com/Service" } @@ -1882,6 +2067,32 @@ message CloudRunMetadata { // Output only. The Cloud Run Revision id associated with a `Rollout`. string revision = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the Cloud Run job that is associated with a + // `Rollout`. Format is + // `projects/{project}/locations/{location}/jobs/{job_name}`. + string job = 4 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "run.googleapis.com/Job" } + ]; +} + +// AutomationRolloutMetadata contains Automation-related actions that +// were performed on a rollout. +message AutomationRolloutMetadata { + // Output only. The ID of the AutomationRun initiated by a promote release + // rule. + string promote_automation_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The IDs of the AutomationRuns initiated by an advance rollout + // rule. + repeated string advance_automation_runs = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The IDs of the AutomationRuns initiated by a repair rollout + // rule. + repeated string repair_automation_runs = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Phase represents a collection of jobs that are logically grouped together @@ -1941,12 +2152,10 @@ message DeploymentJobs { // Output only. The verify Job. Runs after a deploy if the deploy succeeds. Job verify_job = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The predeploy Job. This is the predeploy job in the phase. - // This is the first job of the phase. + // Output only. The predeploy Job, which is the first job on the phase. Job predeploy_job = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The postdeploy Job. This is the postdeploy job in the phase. - // This is the last job of the phase. + // Output only. The postdeploy Job, which is the last job on the phase. Job postdeploy_job = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -2109,7 +2318,7 @@ message ListRolloutsResponse { // GetRolloutRequest is the request object used by `GetRollout`. message GetRolloutRequest { // Required. Name of the `Rollout`. Format must be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2122,7 +2331,7 @@ message GetRolloutRequest { message CreateRolloutRequest { // Required. The parent collection in which the `Rollout` should be created. // Format should be - // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}. + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2193,8 +2402,7 @@ message OperationMetadata { // The request object used by `ApproveRollout`. message ApproveRolloutRequest { // Required. Name of the Rollout. Format is - // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/{rollout}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2212,8 +2420,7 @@ message ApproveRolloutResponse {} // The request object used by `AdvanceRollout`. message AdvanceRolloutRequest { // Required. Name of the Rollout. Format is - // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/{rollout}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2231,8 +2438,7 @@ message AdvanceRolloutResponse {} // The request object used by `CancelRollout`. message CancelRolloutRequest { // Required. Name of the Rollout. Format is - // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/{rollout}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2247,8 +2453,7 @@ message CancelRolloutResponse {} // The request object used by `IgnoreJob`. message IgnoreJobRequest { // Required. Name of the Rollout. Format is - // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/{rollout}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. string rollout = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2269,8 +2474,7 @@ message IgnoreJobResponse {} // 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}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. string rollout = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2291,8 +2495,7 @@ 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}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2335,9 +2538,7 @@ message JobRun { } // Optional. Name of the `JobRun`. Format is - // projects/{project}/locations/{location}/ - // deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/ - // {rollouts}/jobRuns/{uuid}. + // `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`. @@ -2412,7 +2613,7 @@ message DeployJobRun { // logs. EXECUTION_FAILED = 2; - // The deploy build did not complete within the alloted time. + // The deploy job run did not complete within the alloted time. DEADLINE_EXCEEDED = 3; // There were missing resources in the runtime environment required for a @@ -2426,7 +2627,7 @@ message DeployJobRun { // Output only. The resource name of the Cloud Build `Build` object that is // used to deploy. Format is - // projects/{project}/locations/{location}/builds/{build}. + // `projects/{project}/locations/{location}/builds/{build}`. string build = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -2464,7 +2665,7 @@ message VerifyJobRun { // logs. EXECUTION_FAILED = 2; - // The verify build did not complete within the alloted time. + // The verify job run did not complete within the alloted time. DEADLINE_EXCEEDED = 3; // No Skaffold verify configuration was found. @@ -2477,7 +2678,7 @@ message VerifyJobRun { // Output only. The resource name of the Cloud Build `Build` object that is // used to verify. Format is - // projects/{project}/locations/{location}/builds/{build}. + // `projects/{project}/locations/{location}/builds/{build}`. string build = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -2517,7 +2718,7 @@ message PredeployJobRun { // logs. EXECUTION_FAILED = 2; - // The predeploy build did not complete within the alloted time. + // The predeploy job run did not complete within the alloted time. DEADLINE_EXCEEDED = 3; // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message @@ -2527,7 +2728,7 @@ message PredeployJobRun { // Output only. The resource name of the Cloud Build `Build` object that is // used to execute the custom actions associated with the predeploy Job. - // Format is projects/{project}/locations/{location}/builds/{build}. + // Format is `projects/{project}/locations/{location}/builds/{build}`. string build = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -2560,7 +2761,7 @@ message PostdeployJobRun { // logs. EXECUTION_FAILED = 2; - // The postdeploy build did not complete within the alloted time. + // The postdeploy job run did not complete within the alloted time. DEADLINE_EXCEEDED = 3; // Cloud Build failed to fulfill Cloud Deploy's request. See failure_message @@ -2570,7 +2771,7 @@ message PostdeployJobRun { // Output only. The resource name of the Cloud Build `Build` object that is // used to execute the custom actions associated with the postdeploy Job. - // Format is projects/{project}/locations/{location}/builds/{build}. + // Format is `projects/{project}/locations/{location}/builds/{build}`. string build = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -2590,9 +2791,8 @@ message PostdeployJobRun { // CreateChildRolloutJobRun contains information specific to a // createChildRollout `JobRun`. message CreateChildRolloutJobRun { - // Output only. Name of the `ChildRollout`. Format is projects/{project}/ - // locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}. + // Output only. Name of the `ChildRollout`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The ID of the childRollout Phase initiated by this JobRun. @@ -2602,9 +2802,8 @@ message CreateChildRolloutJobRun { // AdvanceChildRolloutJobRun contains information specific to a // advanceChildRollout `JobRun`. message AdvanceChildRolloutJobRun { - // Output only. Name of the `ChildRollout`. Format is projects/{project}/ - // locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}. + // Output only. Name of the `ChildRollout`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. the ID of the ChildRollout's Phase. @@ -2659,7 +2858,7 @@ message ListJobRunsResponse { // 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}. + // `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) = { @@ -2671,8 +2870,7 @@ message GetJobRunRequest { // The request object used by `TerminateJobRun`. message TerminateJobRunRequest { // Required. Name of the `JobRun`. Format must be - // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ - // releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}. + // `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -2728,6 +2926,706 @@ message GetConfigRequest { ]; } +// An `Automation` resource in the Cloud Deploy API. +// +// An `Automation` enables the automation of manually driven actions for +// a Delivery Pipeline, which includes Release promotion amongst Targets, +// Rollout repair and Rollout deployment strategy advancement. The intention +// of Automation is to reduce manual intervention in the continuous delivery +// process. +message Automation { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/Automation" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}" + style: DECLARATIVE_FRIENDLY + }; + + // Output only. Name of the `Automation`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automations/{automation}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Unique identifier of the `Automation`. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the `Automation`. Max length is 255 characters. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Time at which the automation was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the automation was updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User annotations. These attributes can only be set and used by + // the user, and not by Cloud Deploy. Annotations must meet the following + // constraints: + // + // * Annotations are key/value pairs. + // * Valid annotation keys have two segments: an optional prefix and name, + // separated by a slash (`/`). + // * The name segment is required and must be 63 characters or less, + // beginning and ending with an alphanumeric character (`[a-z0-9A-Z]`) with + // dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between. + // * The prefix is optional. If specified, the prefix must be a DNS subdomain: + // a series of DNS labels separated by dots(`.`), not longer than 253 + // characters in total, followed by a slash (`/`). + // + // See + // https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set + // for more details. + map annotations = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels are attributes that can be set and used by both the + // user and by Cloud Deploy. Labels must meet the following constraints: + // + // * Keys and values can contain only lowercase letters, numeric characters, + // underscores, and dashes. + // * All characters must use UTF-8 encoding, and international characters are + // allowed. + // * Keys must start with a lowercase letter or international character. + // * Each resource is limited to a maximum of 64 labels. + // + // Both keys and values are additionally constrained to be <= 63 characters. + map labels = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The weak etag of the `Automation` resource. + // 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 = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When Suspended, automation is deactivated from execution. + bool suspended = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Email address of the user-managed IAM service account that + // creates Cloud Deploy release and rollout resources. + string service_account = 10 [(google.api.field_behavior) = REQUIRED]; + + // Required. Selected resources to which the automation will be applied. + AutomationResourceSelector selector = 11 + [(google.api.field_behavior) = REQUIRED]; + + // Required. List of Automation rules associated with the Automation resource. + // Must have at least one rule and limited to 250 rules per Delivery Pipeline. + // Note: the order of the rules here is not the same as the order of + // execution. + repeated AutomationRule rules = 14 [(google.api.field_behavior) = REQUIRED]; +} + +// AutomationResourceSelector contains the information to select the resources +// to which an Automation is going to be applied. +message AutomationResourceSelector { + // Contains attributes about a target. + repeated TargetAttribute targets = 1; +} + +// `AutomationRule` defines the automation activities. +message AutomationRule { + // The configuration of the Automation rule. + oneof rule { + // Optional. `PromoteReleaseRule` will automatically promote a release from + // the current target to a specified target. + PromoteReleaseRule promote_release_rule = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The `AdvanceRolloutRule` will automatically advance a + // successful Rollout. + AdvanceRolloutRule advance_rollout_rule = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The `RepairRolloutRule` will automatically repair a failed + // rollout. + RepairRolloutRule repair_rollout_rule = 3 + [(google.api.field_behavior) = OPTIONAL]; + } +} + +// `PromoteRelease` rule will automatically promote a release from the current +// target to a specified target. +message PromoteReleaseRule { + // Required. ID of the rule. This id must be unique in the `Automation` + // resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. How long the release need to be paused until being promoted to + // the next target. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The ID of the stage in the pipeline to which this `Release` is + // deploying. If unspecified, default it to the next stage in the promotion + // flow. The value of this field could be one of the following: + // * The last segment of a target name. It only needs the ID to determine + // if the target is one of the stages in the promotion sequence defined + // in the pipeline. + // * "@next", the next target in the promotion sequence. + string destination_target_id = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Information around the state of the Automation rule. + AutomationRuleCondition condition = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The starting phase of the rollout created by this operation. + // Default to the first phase. + string destination_phase = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +// The `AdvanceRollout` automation rule will automatically advance a successful +// Rollout to the next phase. +message AdvanceRolloutRule { + // Required. ID of the rule. This id must be unique in the `Automation` + // resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Proceeds only after phase name matched any one in the list. + // This value must consist of lower-case letters, numbers, and hyphens, + // start with a letter and end with a letter or a number, and have a max + // length of 63 characters. In other words, it must match the following + // regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + repeated string source_phases = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. How long to wait after a rollout is finished. + google.protobuf.Duration wait = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Information around the state of the Automation rule. + AutomationRuleCondition condition = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The `RepairRolloutRule` automation rule will automatically repair a failed +// `Rollout`. +message RepairRolloutRule { + // Required. ID of the rule. This id must be unique in the `Automation` + // resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Phases within which jobs are subject to automatic repair actions + // on failure. Proceeds only after phase name matched any one in the list, or + // for all phases if unspecified. This value must consist of lower-case + // letters, numbers, and hyphens, start with a letter and end with a letter or + // a number, and have a max length of 63 characters. In other words, it must + // match the following regex: `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + repeated string source_phases = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Jobs to repair. Proceeds only after job name matched any one in + // the list, or for all jobs if unspecified or empty. The phase that includes + // the job must match the phase ID specified in `source_phase`. This value + // must consist of lower-case letters, numbers, and hyphens, start with a + // letter and end with a letter or a number, and have a max length of 63 + // characters. In other words, it must match the following regex: + // `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + repeated string jobs = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Defines the types of automatic repair actions for failed jobs. + repeated RepairMode repair_modes = 4 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Information around the state of the 'Automation' rule. + AutomationRuleCondition condition = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Configuration of the repair action. +message RepairMode { + // The repair action to perform. + oneof mode { + // Optional. Retries a failed job. + Retry retry = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Rolls back a `Rollout`. + Rollback rollback = 2 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Retries the failed job. +message Retry { + // Required. Total number of retries. Retry will skipped if set to 0; The + // minimum value is 1, and the maximum value is 10. + int64 attempts = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. How long to wait for the first retry. Default is 0, and the + // maximum value is 14d. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The pattern of how wait time will be increased. Default is + // linear. Backoff mode will be ignored if `wait` is 0. + BackoffMode backoff_mode = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Rolls back a `Rollout`. +message Rollback { + // Optional. The starting phase ID for the `Rollout`. If unspecified, the + // `Rollout` will start in the stable phase. + string destination_phase = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// `AutomationRuleCondition` contains conditions relevant to an +// `Automation` rule. +message AutomationRuleCondition { + // Optional. Details around targets enumerated in the rule. + TargetsPresentCondition targets_present_condition = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `CreateAutomation`. +message CreateAutomationRequest { + // Required. The parent collection in which the `Automation` should be + // created. Format should be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/Automation" + } + ]; + + // Required. ID of the `Automation`. + string automation_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Automation` to create. + Automation automation = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided + // with an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `UpdateAutomation`. +message UpdateAutomationRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // `Automation` resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The `Automation` to update. + Automation automation = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, updating a `Automation` that does not exist will + // result in the creation of a new `Automation`. + bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, the request is validated and the user is provided + // with an expected result, but no actual change is made. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `DeleteAutomation`. +message DeleteAutomationRequest { + // Required. The name of the `Automation` to delete. Format should be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Automation" + } + ]; + + // Optional. A request ID to identify requests. Specify a unique request ID + // so that if you must retry your request, the server will know to ignore + // the request if it has already been completed. The server will guarantee + // that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, then deleting an already deleted or non-existing + // `Automation` will succeed. + bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, validate the request and verify whether the resource + // exists, but do not actually post it. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The weak etag of the request. + // 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 = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The request object for `ListAutomations`. +message ListAutomationsRequest { + // Required. The parent, which owns this collection of automations. Format + // must be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/Automation" + } + ]; + + // The maximum number of automations to return. The service may return + // fewer than this value. If unspecified, at most 50 automations will + // be returned. The maximum value is 1000; values above 1000 will be set + // to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListAutomations` 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; + + // Filter automations to be returned. All fields can be used in the + // filter. + string filter = 4; + + // Field to sort by. + string order_by = 5; +} + +// The response object from `ListAutomations`. +message ListAutomationsResponse { + // The `Automations` objects. + repeated Automation automations = 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; +} + +// The request object for `GetAutomation` +message GetAutomationRequest { + // Required. Name of the `Automation`. Format must be + // `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/Automation" + } + ]; +} + +// An `AutomationRun` resource in the Cloud Deploy API. +// +// An `AutomationRun` represents an automation execution instance of an +// automation rule. +message AutomationRun { + option (google.api.resource) = { + type: "clouddeploy.googleapis.com/AutomationRun" + pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}" + }; + + // Valid state of an `AutomationRun`. + enum State { + // The `AutomationRun` has an unspecified state. + STATE_UNSPECIFIED = 0; + + // The `AutomationRun` has succeeded. + SUCCEEDED = 1; + + // The `AutomationRun` was cancelled. + CANCELLED = 2; + + // The `AutomationRun` has failed. + FAILED = 3; + + // The `AutomationRun` is in progress. + IN_PROGRESS = 4; + + // The `AutomationRun` is pending. + PENDING = 5; + } + + // Output only. Name of the `AutomationRun`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the `AutomationRun` was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time at which the automationRun was updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The weak etag of the `AutomationRun` resource. + // 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 = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Email address of the user-managed IAM service account that + // performs the operations against Cloud Deploy resources. + string service_account = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Snapshot of the Automation taken at AutomationRun creation + // time. + Automation automation_snapshot = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the target that represents the promotion stage that + // initiates the `AutomationRun`. The value of this field is the last segment + // of a target name. + string target_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Current state of the `AutomationRun`. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Explains the current state of the `AutomationRun`. Present + // only an explanation is needed. + string state_description = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time the `AutomationRun` will expire. An `AutomationRun` will + // expire after 14 days from its creation date. + google.protobuf.Timestamp expire_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the automation rule that initiated the operation. + string rule_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ID of the automation that initiated the operation. + string automation_id = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The operation that the `AutomationRun` will perform. + oneof operation { + // Output only. Promotes a release to a specified 'Target'. + PromoteReleaseOperation promote_release_operation = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Advances a rollout to the next phase. + AdvanceRolloutOperation advance_rollout_operation = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Repairs a failed 'Rollout'. + RepairRolloutOperation repair_rollout_operation = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Earliest time the `AutomationRun` will attempt to resume. + // Wait-time is configured by `wait` in automation rule. + google.protobuf.Timestamp wait_until_time = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Contains the information of an automated promote-release operation. +message PromoteReleaseOperation { + // Output only. The ID of the target that represents the promotion stage to + // which the release will be promoted. The value of this field is the last + // segment of a target name. + string target_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. How long the operation will be paused. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the rollout that initiates the `AutomationRun`. + string rollout = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The starting phase of the rollout created by this operation. + string phase = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Contains the information of an automated advance-rollout operation. +message AdvanceRolloutOperation { + // Output only. The phase of a deployment that initiated the operation. + string source_phase = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. How long the operation will be paused. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The name of the rollout that initiates the `AutomationRun`. + string rollout = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The phase to which the rollout will be advanced to. + string destination_phase = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Contains the information for an automated `repair rollout` operation. +message RepairRolloutOperation { + // Output only. The name of the rollout that initiates the `AutomationRun`. + string rollout = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The index of the current repair action in the repair sequence. + int64 current_repair_mode_index = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Records of the repair attempts. Each repair phase may have + // multiple retry attempts or single rollback attempt. + repeated RepairPhase repair_phases = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// RepairPhase tracks the repair attempts that have been made for +// each `RepairMode` specified in the `Automation` resource. +message RepairPhase { + oneof repair_phase { + // Output only. Records of the retry attempts for retry repair mode. + RetryPhase retry = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Rollback attempt for rollback repair mode . + RollbackAttempt rollback = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// RetryPhase contains the retry attempts and the metadata for initiating a +// new attempt. +message RetryPhase { + // Output only. The number of attempts that have been made. + int64 total_attempts = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The pattern of how the wait time of the retry attempt is + // calculated. + BackoffMode backoff_mode = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The phase ID of the phase that includes the job being retried. + string phase_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The job ID for the Job to retry. + string job_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Detail of a retry action. + repeated RetryAttempt attempts = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// RetryAttempt represents an action of retrying the failed Cloud Deploy job. +message RetryAttempt { + // Output only. The index of this retry attempt. + int64 attempt = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. How long the operation will be paused. + google.protobuf.Duration wait = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Valid state of this retry action. + RepairState state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Description of the state of the Retry. + string state_desc = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// RollbackAttempt represents an action of rolling back a Cloud Deploy 'Target'. +message RollbackAttempt { + // Output only. The phase to which the rollout will be rolled back to. + string destination_phase = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the rollback `Rollout` to create. + string rollout_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Valid state of this rollback action. + RepairState state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Description of the state of the Rollback. + string state_desc = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request object for `ListAutomationRuns`. +message ListAutomationRunsRequest { + // Required. The parent, which owns this collection of automationRuns. Format + // must be + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "clouddeploy.googleapis.com/AutomationRun" + } + ]; + + // The maximum number of automationRuns to return. The service may return + // fewer than this value. If unspecified, at most 50 automationRuns will + // be returned. The maximum value is 1000; values above 1000 will be set + // to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListAutomationRuns` 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; + + // Filter automationRuns to be returned. All fields can be used in the + // filter. + string filter = 4; + + // Field to sort by. + string order_by = 5; +} + +// The response object from `ListAutomationRuns`. +message ListAutomationRunsResponse { + // The `AutomationRuns` objects. + repeated AutomationRun automation_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; +} + +// The request object for `GetAutomationRun` +message GetAutomationRunRequest { + // Required. Name of the `AutomationRun`. Format must be + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/AutomationRun" + } + ]; +} + +// The request object used by `CancelAutomationRun`. +message CancelAutomationRunRequest { + // Required. Name of the `AutomationRun`. Format is + // `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "clouddeploy.googleapis.com/AutomationRun" + } + ]; +} + +// The response object from `CancelAutomationRun`. +message CancelAutomationRunResponse {} + // The support state of a specific Skaffold version. enum SkaffoldSupportState { // Default value. This value is unused. @@ -2742,3 +3640,39 @@ enum SkaffoldSupportState { // This skaffold version is no longer supported. SKAFFOLD_SUPPORT_STATE_UNSUPPORTED = 3; } + +// The pattern of how wait time is increased. +enum BackoffMode { + // No WaitMode is specified. + BACKOFF_MODE_UNSPECIFIED = 0; + + // Increases the wait time linearly. + BACKOFF_MODE_LINEAR = 1; + + // Increases the wait time exponentially. + BACKOFF_MODE_EXPONENTIAL = 2; +} + +// Valid state of a repair attempt. +enum RepairState { + // The `repair` has an unspecified state. + REPAIR_STATE_UNSPECIFIED = 0; + + // The `repair` action has succeeded. + REPAIR_STATE_SUCCEEDED = 1; + + // The `repair` action was cancelled. + REPAIR_STATE_CANCELLED = 2; + + // The `repair` action has failed. + REPAIR_STATE_FAILED = 3; + + // The `repair` action is in progress. + REPAIR_STATE_IN_PROGRESS = 4; + + // The `repair` action is pending. + REPAIR_STATE_PENDING = 5; + + // The `repair` action was skipped. + REPAIR_STATE_SKIPPED = 6; +} diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/release_render_payload.proto b/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/release_render_payload.proto index b679895254b7..0329689960a9 100644 --- a/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/release_render_payload.proto +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/release_render_payload.proto @@ -16,6 +16,8 @@ syntax = "proto3"; package google.cloud.deploy.v1; +import "google/cloud/deploy/v1/cloud_deploy.proto"; + option go_package = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; option java_multiple_files = true; option java_outer_classname = "ReleaseRenderPayloadProto"; @@ -28,6 +30,9 @@ message ReleaseRenderEvent { // details as rendering progresses through render states. string message = 1; - // The name of the `Release`. + // The name of the release. string release = 2; + + // The state of the release render. + Release.RenderState release_render_state = 3; } diff --git a/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/rollout_update_payload.proto b/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/rollout_update_payload.proto new file mode 100644 index 000000000000..5da1f453375e --- /dev/null +++ b/java-deploy/proto-google-cloud-deploy-v1/src/main/proto/google/cloud/deploy/v1/rollout_update_payload.proto @@ -0,0 +1,94 @@ +// Copyright 2023 Google LLC +// +// Licensed under the Apache License, Version 2.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 = "cloud.google.com/go/deploy/apiv1/deploypb;deploypb"; +option java_multiple_files = true; +option java_outer_classname = "RolloutUpdatePayloadProto"; +option java_package = "com.google.cloud.deploy.v1"; + +// Payload proto for "clouddeploy.googleapis.com/rollout_update" +// Platform Log event that describes the rollout update event. +message RolloutUpdateEvent { + // RolloutUpdateType indicates the type of the rollout update. + enum RolloutUpdateType { + // Rollout update type unspecified. + ROLLOUT_UPDATE_TYPE_UNSPECIFIED = 0; + + // rollout state updated to pending. + PENDING = 1; + + // Rollout state updated to pending release. + PENDING_RELEASE = 2; + + // Rollout state updated to in progress. + IN_PROGRESS = 3; + + // Rollout state updated to cancelling. + CANCELLING = 4; + + // Rollout state updated to cancelled. + CANCELLED = 5; + + // Rollout state updated to halted. + HALTED = 6; + + // Rollout state updated to succeeded. + SUCCEEDED = 7; + + // Rollout state updated to failed. + FAILED = 8; + + // Rollout requires approval. + APPROVAL_REQUIRED = 9; + + // Rollout has been approved. + APPROVED = 10; + + // Rollout has been rejected. + REJECTED = 11; + + // Rollout requires advance to the next phase. + ADVANCE_REQUIRED = 12; + + // Rollout has been advanced. + ADVANCED = 13; + } + + // Unique identifier of the pipeline. + string pipeline_uid = 1; + + // Unique identifier of the release. + string release_uid = 2; + + // The name of the rollout. + string rollout = 3; + + // ID of the target. + string target_id = 4; + + // The type of the rollout update. + RolloutUpdateType rollout_update_type = 5; + + // Debug message for when a rollout update event occurs. + string message = 6; + + // Type of this notification, e.g. for a rollout update event. + Type type = 7; +} diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/cancelautomationrun/AsyncCancelAutomationRun.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/cancelautomationrun/AsyncCancelAutomationRun.java new file mode 100644 index 000000000000..769a945ce696 --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/cancelautomationrun/AsyncCancelAutomationRun.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_CancelAutomationRun_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.deploy.v1.AutomationRunName; +import com.google.cloud.deploy.v1.CancelAutomationRunRequest; +import com.google.cloud.deploy.v1.CancelAutomationRunResponse; +import com.google.cloud.deploy.v1.CloudDeployClient; + +public class AsyncCancelAutomationRun { + + public static void main(String[] args) throws Exception { + asyncCancelAutomationRun(); + } + + public static void asyncCancelAutomationRun() 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()) { + CancelAutomationRunRequest request = + CancelAutomationRunRequest.newBuilder() + .setName( + AutomationRunName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]") + .toString()) + .build(); + ApiFuture future = + cloudDeployClient.cancelAutomationRunCallable().futureCall(request); + // Do something. + CancelAutomationRunResponse response = future.get(); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_CancelAutomationRun_async] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/cancelautomationrun/SyncCancelAutomationRun.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/cancelautomationrun/SyncCancelAutomationRun.java new file mode 100644 index 000000000000..296c19886440 --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/cancelautomationrun/SyncCancelAutomationRun.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_CancelAutomationRun_sync] +import com.google.cloud.deploy.v1.AutomationRunName; +import com.google.cloud.deploy.v1.CancelAutomationRunRequest; +import com.google.cloud.deploy.v1.CancelAutomationRunResponse; +import com.google.cloud.deploy.v1.CloudDeployClient; + +public class SyncCancelAutomationRun { + + public static void main(String[] args) throws Exception { + syncCancelAutomationRun(); + } + + public static void syncCancelAutomationRun() 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()) { + CancelAutomationRunRequest request = + CancelAutomationRunRequest.newBuilder() + .setName( + AutomationRunName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]") + .toString()) + .build(); + CancelAutomationRunResponse response = cloudDeployClient.cancelAutomationRun(request); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_CancelAutomationRun_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/cancelautomationrun/SyncCancelAutomationRunAutomationrunname.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/cancelautomationrun/SyncCancelAutomationRunAutomationrunname.java new file mode 100644 index 000000000000..114f3eb99a9f --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/cancelautomationrun/SyncCancelAutomationRunAutomationrunname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_CancelAutomationRun_Automationrunname_sync] +import com.google.cloud.deploy.v1.AutomationRunName; +import com.google.cloud.deploy.v1.CancelAutomationRunResponse; +import com.google.cloud.deploy.v1.CloudDeployClient; + +public class SyncCancelAutomationRunAutomationrunname { + + public static void main(String[] args) throws Exception { + syncCancelAutomationRunAutomationrunname(); + } + + public static void syncCancelAutomationRunAutomationrunname() 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()) { + AutomationRunName name = + AutomationRunName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]"); + CancelAutomationRunResponse response = cloudDeployClient.cancelAutomationRun(name); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_CancelAutomationRun_Automationrunname_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/cancelautomationrun/SyncCancelAutomationRunString.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/cancelautomationrun/SyncCancelAutomationRunString.java new file mode 100644 index 000000000000..7727ac4a00fa --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/cancelautomationrun/SyncCancelAutomationRunString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_CancelAutomationRun_String_sync] +import com.google.cloud.deploy.v1.AutomationRunName; +import com.google.cloud.deploy.v1.CancelAutomationRunResponse; +import com.google.cloud.deploy.v1.CloudDeployClient; + +public class SyncCancelAutomationRunString { + + public static void main(String[] args) throws Exception { + syncCancelAutomationRunString(); + } + + public static void syncCancelAutomationRunString() 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 = + AutomationRunName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]") + .toString(); + CancelAutomationRunResponse response = cloudDeployClient.cancelAutomationRun(name); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_CancelAutomationRun_String_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/createautomation/AsyncCreateAutomation.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/createautomation/AsyncCreateAutomation.java new file mode 100644 index 000000000000..7bbd4dd57505 --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/createautomation/AsyncCreateAutomation.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_CreateAutomation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.CreateAutomationRequest; +import com.google.cloud.deploy.v1.DeliveryPipelineName; +import com.google.longrunning.Operation; + +public class AsyncCreateAutomation { + + public static void main(String[] args) throws Exception { + asyncCreateAutomation(); + } + + public static void asyncCreateAutomation() 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()) { + CreateAutomationRequest request = + CreateAutomationRequest.newBuilder() + .setParent( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setAutomationId("automationId64173202") + .setAutomation(Automation.newBuilder().build()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .build(); + ApiFuture future = + cloudDeployClient.createAutomationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_CreateAutomation_async] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/createautomation/AsyncCreateAutomationLRO.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/createautomation/AsyncCreateAutomationLRO.java new file mode 100644 index 000000000000..b5df4803400e --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/createautomation/AsyncCreateAutomationLRO.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_CreateAutomation_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.CreateAutomationRequest; +import com.google.cloud.deploy.v1.DeliveryPipelineName; +import com.google.cloud.deploy.v1.OperationMetadata; + +public class AsyncCreateAutomationLRO { + + public static void main(String[] args) throws Exception { + asyncCreateAutomationLRO(); + } + + public static void asyncCreateAutomationLRO() 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()) { + CreateAutomationRequest request = + CreateAutomationRequest.newBuilder() + .setParent( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setAutomationId("automationId64173202") + .setAutomation(Automation.newBuilder().build()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .build(); + OperationFuture future = + cloudDeployClient.createAutomationOperationCallable().futureCall(request); + // Do something. + Automation response = future.get(); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_CreateAutomation_LRO_async] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/createautomation/SyncCreateAutomation.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/createautomation/SyncCreateAutomation.java new file mode 100644 index 000000000000..3bd671d5c491 --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/createautomation/SyncCreateAutomation.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_CreateAutomation_sync] +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.CreateAutomationRequest; +import com.google.cloud.deploy.v1.DeliveryPipelineName; + +public class SyncCreateAutomation { + + public static void main(String[] args) throws Exception { + syncCreateAutomation(); + } + + public static void syncCreateAutomation() 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()) { + CreateAutomationRequest request = + CreateAutomationRequest.newBuilder() + .setParent( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setAutomationId("automationId64173202") + .setAutomation(Automation.newBuilder().build()) + .setRequestId("requestId693933066") + .setValidateOnly(true) + .build(); + Automation response = cloudDeployClient.createAutomationAsync(request).get(); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_CreateAutomation_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/createautomation/SyncCreateAutomationDeliverypipelinenameAutomationString.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/createautomation/SyncCreateAutomationDeliverypipelinenameAutomationString.java new file mode 100644 index 000000000000..9bca32a1140a --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/createautomation/SyncCreateAutomationDeliverypipelinenameAutomationString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_CreateAutomation_DeliverypipelinenameAutomationString_sync] +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; + +public class SyncCreateAutomationDeliverypipelinenameAutomationString { + + public static void main(String[] args) throws Exception { + syncCreateAutomationDeliverypipelinenameAutomationString(); + } + + public static void syncCreateAutomationDeliverypipelinenameAutomationString() 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()) { + DeliveryPipelineName parent = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + Automation automation = Automation.newBuilder().build(); + String automationId = "automationId64173202"; + Automation response = + cloudDeployClient.createAutomationAsync(parent, automation, automationId).get(); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_CreateAutomation_DeliverypipelinenameAutomationString_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/createautomation/SyncCreateAutomationStringAutomationString.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/createautomation/SyncCreateAutomationStringAutomationString.java new file mode 100644 index 000000000000..abaf5b06c35f --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/createautomation/SyncCreateAutomationStringAutomationString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_CreateAutomation_StringAutomationString_sync] +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; + +public class SyncCreateAutomationStringAutomationString { + + public static void main(String[] args) throws Exception { + syncCreateAutomationStringAutomationString(); + } + + public static void syncCreateAutomationStringAutomationString() 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 = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString(); + Automation automation = Automation.newBuilder().build(); + String automationId = "automationId64173202"; + Automation response = + cloudDeployClient.createAutomationAsync(parent, automation, automationId).get(); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_CreateAutomation_StringAutomationString_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/deleteautomation/AsyncDeleteAutomation.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/deleteautomation/AsyncDeleteAutomation.java new file mode 100644 index 000000000000..62beea13c207 --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/deleteautomation/AsyncDeleteAutomation.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.deploy.v1.AutomationName; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeleteAutomationRequest; +import com.google.longrunning.Operation; + +public class AsyncDeleteAutomation { + + public static void main(String[] args) throws Exception { + asyncDeleteAutomation(); + } + + public static void asyncDeleteAutomation() 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()) { + DeleteAutomationRequest request = + DeleteAutomationRequest.newBuilder() + .setName( + AutomationName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]") + .toString()) + .setRequestId("requestId693933066") + .setAllowMissing(true) + .setValidateOnly(true) + .setEtag("etag3123477") + .build(); + ApiFuture future = + cloudDeployClient.deleteAutomationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_async] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/deleteautomation/AsyncDeleteAutomationLRO.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/deleteautomation/AsyncDeleteAutomationLRO.java new file mode 100644 index 000000000000..1d5000bde50a --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/deleteautomation/AsyncDeleteAutomationLRO.java @@ -0,0 +1,58 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.deploy.v1.AutomationName; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeleteAutomationRequest; +import com.google.cloud.deploy.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteAutomationLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteAutomationLRO(); + } + + public static void asyncDeleteAutomationLRO() 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()) { + DeleteAutomationRequest request = + DeleteAutomationRequest.newBuilder() + .setName( + AutomationName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]") + .toString()) + .setRequestId("requestId693933066") + .setAllowMissing(true) + .setValidateOnly(true) + .setEtag("etag3123477") + .build(); + OperationFuture future = + cloudDeployClient.deleteAutomationOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_LRO_async] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/deleteautomation/SyncDeleteAutomation.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/deleteautomation/SyncDeleteAutomation.java new file mode 100644 index 000000000000..6c793cdcabb6 --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/deleteautomation/SyncDeleteAutomation.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_sync] +import com.google.cloud.deploy.v1.AutomationName; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeleteAutomationRequest; +import com.google.protobuf.Empty; + +public class SyncDeleteAutomation { + + public static void main(String[] args) throws Exception { + syncDeleteAutomation(); + } + + public static void syncDeleteAutomation() 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()) { + DeleteAutomationRequest request = + DeleteAutomationRequest.newBuilder() + .setName( + AutomationName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]") + .toString()) + .setRequestId("requestId693933066") + .setAllowMissing(true) + .setValidateOnly(true) + .setEtag("etag3123477") + .build(); + cloudDeployClient.deleteAutomationAsync(request).get(); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/deleteautomation/SyncDeleteAutomationAutomationname.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/deleteautomation/SyncDeleteAutomationAutomationname.java new file mode 100644 index 000000000000..6793e2102b6a --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/deleteautomation/SyncDeleteAutomationAutomationname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_Automationname_sync] +import com.google.cloud.deploy.v1.AutomationName; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.protobuf.Empty; + +public class SyncDeleteAutomationAutomationname { + + public static void main(String[] args) throws Exception { + syncDeleteAutomationAutomationname(); + } + + public static void syncDeleteAutomationAutomationname() 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()) { + AutomationName name = + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]"); + cloudDeployClient.deleteAutomationAsync(name).get(); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_Automationname_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/deleteautomation/SyncDeleteAutomationString.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/deleteautomation/SyncDeleteAutomationString.java new file mode 100644 index 000000000000..712c5fe4d3d9 --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/deleteautomation/SyncDeleteAutomationString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_String_sync] +import com.google.cloud.deploy.v1.AutomationName; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.protobuf.Empty; + +public class SyncDeleteAutomationString { + + public static void main(String[] args) throws Exception { + syncDeleteAutomationString(); + } + + public static void syncDeleteAutomationString() 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 = + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]") + .toString(); + cloudDeployClient.deleteAutomationAsync(name).get(); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_DeleteAutomation_String_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomation/AsyncGetAutomation.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomation/AsyncGetAutomation.java new file mode 100644 index 000000000000..2909fe701e29 --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomation/AsyncGetAutomation.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_GetAutomation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.AutomationName; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.GetAutomationRequest; + +public class AsyncGetAutomation { + + public static void main(String[] args) throws Exception { + asyncGetAutomation(); + } + + public static void asyncGetAutomation() 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()) { + GetAutomationRequest request = + GetAutomationRequest.newBuilder() + .setName( + AutomationName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]") + .toString()) + .build(); + ApiFuture future = cloudDeployClient.getAutomationCallable().futureCall(request); + // Do something. + Automation response = future.get(); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_GetAutomation_async] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomation/SyncGetAutomation.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomation/SyncGetAutomation.java new file mode 100644 index 000000000000..6ad9368f197e --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomation/SyncGetAutomation.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_GetAutomation_sync] +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.AutomationName; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.GetAutomationRequest; + +public class SyncGetAutomation { + + public static void main(String[] args) throws Exception { + syncGetAutomation(); + } + + public static void syncGetAutomation() 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()) { + GetAutomationRequest request = + GetAutomationRequest.newBuilder() + .setName( + AutomationName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]") + .toString()) + .build(); + Automation response = cloudDeployClient.getAutomation(request); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_GetAutomation_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomation/SyncGetAutomationAutomationname.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomation/SyncGetAutomationAutomationname.java new file mode 100644 index 000000000000..29462e6eb8ef --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomation/SyncGetAutomationAutomationname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_GetAutomation_Automationname_sync] +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.AutomationName; +import com.google.cloud.deploy.v1.CloudDeployClient; + +public class SyncGetAutomationAutomationname { + + public static void main(String[] args) throws Exception { + syncGetAutomationAutomationname(); + } + + public static void syncGetAutomationAutomationname() 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()) { + AutomationName name = + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]"); + Automation response = cloudDeployClient.getAutomation(name); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_GetAutomation_Automationname_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomation/SyncGetAutomationString.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomation/SyncGetAutomationString.java new file mode 100644 index 000000000000..4f6cd5d5c767 --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomation/SyncGetAutomationString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_GetAutomation_String_sync] +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.AutomationName; +import com.google.cloud.deploy.v1.CloudDeployClient; + +public class SyncGetAutomationString { + + public static void main(String[] args) throws Exception { + syncGetAutomationString(); + } + + public static void syncGetAutomationString() 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 = + AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]") + .toString(); + Automation response = cloudDeployClient.getAutomation(name); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_GetAutomation_String_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomationrun/AsyncGetAutomationRun.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomationrun/AsyncGetAutomationRun.java new file mode 100644 index 000000000000..2515b754107c --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomationrun/AsyncGetAutomationRun.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_GetAutomationRun_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.deploy.v1.AutomationRun; +import com.google.cloud.deploy.v1.AutomationRunName; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.GetAutomationRunRequest; + +public class AsyncGetAutomationRun { + + public static void main(String[] args) throws Exception { + asyncGetAutomationRun(); + } + + public static void asyncGetAutomationRun() 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()) { + GetAutomationRunRequest request = + GetAutomationRunRequest.newBuilder() + .setName( + AutomationRunName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]") + .toString()) + .build(); + ApiFuture future = + cloudDeployClient.getAutomationRunCallable().futureCall(request); + // Do something. + AutomationRun response = future.get(); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_GetAutomationRun_async] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomationrun/SyncGetAutomationRun.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomationrun/SyncGetAutomationRun.java new file mode 100644 index 000000000000..d56d2e7df6ad --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomationrun/SyncGetAutomationRun.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_GetAutomationRun_sync] +import com.google.cloud.deploy.v1.AutomationRun; +import com.google.cloud.deploy.v1.AutomationRunName; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.GetAutomationRunRequest; + +public class SyncGetAutomationRun { + + public static void main(String[] args) throws Exception { + syncGetAutomationRun(); + } + + public static void syncGetAutomationRun() 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()) { + GetAutomationRunRequest request = + GetAutomationRunRequest.newBuilder() + .setName( + AutomationRunName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]") + .toString()) + .build(); + AutomationRun response = cloudDeployClient.getAutomationRun(request); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_GetAutomationRun_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomationrun/SyncGetAutomationRunAutomationrunname.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomationrun/SyncGetAutomationRunAutomationrunname.java new file mode 100644 index 000000000000..b47296094d0a --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomationrun/SyncGetAutomationRunAutomationrunname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_GetAutomationRun_Automationrunname_sync] +import com.google.cloud.deploy.v1.AutomationRun; +import com.google.cloud.deploy.v1.AutomationRunName; +import com.google.cloud.deploy.v1.CloudDeployClient; + +public class SyncGetAutomationRunAutomationrunname { + + public static void main(String[] args) throws Exception { + syncGetAutomationRunAutomationrunname(); + } + + public static void syncGetAutomationRunAutomationrunname() 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()) { + AutomationRunName name = + AutomationRunName.of( + "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]"); + AutomationRun response = cloudDeployClient.getAutomationRun(name); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_GetAutomationRun_Automationrunname_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomationrun/SyncGetAutomationRunString.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomationrun/SyncGetAutomationRunString.java new file mode 100644 index 000000000000..b1411aab8a03 --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/getautomationrun/SyncGetAutomationRunString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_GetAutomationRun_String_sync] +import com.google.cloud.deploy.v1.AutomationRun; +import com.google.cloud.deploy.v1.AutomationRunName; +import com.google.cloud.deploy.v1.CloudDeployClient; + +public class SyncGetAutomationRunString { + + public static void main(String[] args) throws Exception { + syncGetAutomationRunString(); + } + + public static void syncGetAutomationRunString() 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 = + AutomationRunName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]") + .toString(); + AutomationRun response = cloudDeployClient.getAutomationRun(name); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_GetAutomationRun_String_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomationruns/AsyncListAutomationRuns.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomationruns/AsyncListAutomationRuns.java new file mode 100644 index 000000000000..28d81cb2fdf4 --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomationruns/AsyncListAutomationRuns.java @@ -0,0 +1,58 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_ListAutomationRuns_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.deploy.v1.AutomationRun; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; +import com.google.cloud.deploy.v1.ListAutomationRunsRequest; + +public class AsyncListAutomationRuns { + + public static void main(String[] args) throws Exception { + asyncListAutomationRuns(); + } + + public static void asyncListAutomationRuns() 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()) { + ListAutomationRunsRequest request = + ListAutomationRunsRequest.newBuilder() + .setParent( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + cloudDeployClient.listAutomationRunsPagedCallable().futureCall(request); + // Do something. + for (AutomationRun element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_ListAutomationRuns_async] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomationruns/AsyncListAutomationRunsPaged.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomationruns/AsyncListAutomationRunsPaged.java new file mode 100644 index 000000000000..41c665dc4ba6 --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomationruns/AsyncListAutomationRunsPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_ListAutomationRuns_Paged_async] +import com.google.cloud.deploy.v1.AutomationRun; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; +import com.google.cloud.deploy.v1.ListAutomationRunsRequest; +import com.google.cloud.deploy.v1.ListAutomationRunsResponse; +import com.google.common.base.Strings; + +public class AsyncListAutomationRunsPaged { + + public static void main(String[] args) throws Exception { + asyncListAutomationRunsPaged(); + } + + public static void asyncListAutomationRunsPaged() 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()) { + ListAutomationRunsRequest request = + ListAutomationRunsRequest.newBuilder() + .setParent( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListAutomationRunsResponse response = + cloudDeployClient.listAutomationRunsCallable().call(request); + for (AutomationRun element : response.getAutomationRunsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_ListAutomationRuns_Paged_async] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomationruns/SyncListAutomationRuns.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomationruns/SyncListAutomationRuns.java new file mode 100644 index 000000000000..fd4cdd63138e --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomationruns/SyncListAutomationRuns.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_ListAutomationRuns_sync] +import com.google.cloud.deploy.v1.AutomationRun; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; +import com.google.cloud.deploy.v1.ListAutomationRunsRequest; + +public class SyncListAutomationRuns { + + public static void main(String[] args) throws Exception { + syncListAutomationRuns(); + } + + public static void syncListAutomationRuns() 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()) { + ListAutomationRunsRequest request = + ListAutomationRunsRequest.newBuilder() + .setParent( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (AutomationRun element : cloudDeployClient.listAutomationRuns(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_ListAutomationRuns_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomationruns/SyncListAutomationRunsDeliverypipelinename.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomationruns/SyncListAutomationRunsDeliverypipelinename.java new file mode 100644 index 000000000000..d32a31cdab26 --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomationruns/SyncListAutomationRunsDeliverypipelinename.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_ListAutomationRuns_Deliverypipelinename_sync] +import com.google.cloud.deploy.v1.AutomationRun; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; + +public class SyncListAutomationRunsDeliverypipelinename { + + public static void main(String[] args) throws Exception { + syncListAutomationRunsDeliverypipelinename(); + } + + public static void syncListAutomationRunsDeliverypipelinename() 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()) { + DeliveryPipelineName parent = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + for (AutomationRun element : cloudDeployClient.listAutomationRuns(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_ListAutomationRuns_Deliverypipelinename_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomationruns/SyncListAutomationRunsString.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomationruns/SyncListAutomationRunsString.java new file mode 100644 index 000000000000..140d0c6dcd54 --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomationruns/SyncListAutomationRunsString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_ListAutomationRuns_String_sync] +import com.google.cloud.deploy.v1.AutomationRun; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; + +public class SyncListAutomationRunsString { + + public static void main(String[] args) throws Exception { + syncListAutomationRunsString(); + } + + public static void syncListAutomationRunsString() 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 = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString(); + for (AutomationRun element : cloudDeployClient.listAutomationRuns(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_ListAutomationRuns_String_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomations/AsyncListAutomations.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomations/AsyncListAutomations.java new file mode 100644 index 000000000000..215e61a21a35 --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomations/AsyncListAutomations.java @@ -0,0 +1,58 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_ListAutomations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; +import com.google.cloud.deploy.v1.ListAutomationsRequest; + +public class AsyncListAutomations { + + public static void main(String[] args) throws Exception { + asyncListAutomations(); + } + + public static void asyncListAutomations() 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()) { + ListAutomationsRequest request = + ListAutomationsRequest.newBuilder() + .setParent( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + cloudDeployClient.listAutomationsPagedCallable().futureCall(request); + // Do something. + for (Automation element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_ListAutomations_async] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomations/AsyncListAutomationsPaged.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomations/AsyncListAutomationsPaged.java new file mode 100644 index 000000000000..69ee692bcd90 --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomations/AsyncListAutomationsPaged.java @@ -0,0 +1,66 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_ListAutomations_Paged_async] +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; +import com.google.cloud.deploy.v1.ListAutomationsRequest; +import com.google.cloud.deploy.v1.ListAutomationsResponse; +import com.google.common.base.Strings; + +public class AsyncListAutomationsPaged { + + public static void main(String[] args) throws Exception { + asyncListAutomationsPaged(); + } + + public static void asyncListAutomationsPaged() 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()) { + ListAutomationsRequest request = + ListAutomationsRequest.newBuilder() + .setParent( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListAutomationsResponse response = + cloudDeployClient.listAutomationsCallable().call(request); + for (Automation element : response.getAutomationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_ListAutomations_Paged_async] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomations/SyncListAutomations.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomations/SyncListAutomations.java new file mode 100644 index 000000000000..73340708a5fc --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomations/SyncListAutomations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_ListAutomations_sync] +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; +import com.google.cloud.deploy.v1.ListAutomationsRequest; + +public class SyncListAutomations { + + public static void main(String[] args) throws Exception { + syncListAutomations(); + } + + public static void syncListAutomations() 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()) { + ListAutomationsRequest request = + ListAutomationsRequest.newBuilder() + .setParent( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (Automation element : cloudDeployClient.listAutomations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_ListAutomations_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomations/SyncListAutomationsDeliverypipelinename.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomations/SyncListAutomationsDeliverypipelinename.java new file mode 100644 index 000000000000..6d4e5556d7e4 --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomations/SyncListAutomationsDeliverypipelinename.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_ListAutomations_Deliverypipelinename_sync] +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; + +public class SyncListAutomationsDeliverypipelinename { + + public static void main(String[] args) throws Exception { + syncListAutomationsDeliverypipelinename(); + } + + public static void syncListAutomationsDeliverypipelinename() 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()) { + DeliveryPipelineName parent = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + for (Automation element : cloudDeployClient.listAutomations(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_ListAutomations_Deliverypipelinename_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomations/SyncListAutomationsString.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomations/SyncListAutomationsString.java new file mode 100644 index 000000000000..35f33a28133b --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/listautomations/SyncListAutomationsString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_ListAutomations_String_sync] +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; + +public class SyncListAutomationsString { + + public static void main(String[] args) throws Exception { + syncListAutomationsString(); + } + + public static void syncListAutomationsString() 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 = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString(); + for (Automation element : cloudDeployClient.listAutomations(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_ListAutomations_String_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/rollbacktarget/AsyncRollbackTarget.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/rollbacktarget/AsyncRollbackTarget.java new file mode 100644 index 000000000000..64a9e9a0941b --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/rollbacktarget/AsyncRollbackTarget.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_RollbackTarget_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; +import com.google.cloud.deploy.v1.RollbackTargetConfig; +import com.google.cloud.deploy.v1.RollbackTargetRequest; +import com.google.cloud.deploy.v1.RollbackTargetResponse; + +public class AsyncRollbackTarget { + + public static void main(String[] args) throws Exception { + asyncRollbackTarget(); + } + + public static void asyncRollbackTarget() 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()) { + RollbackTargetRequest request = + RollbackTargetRequest.newBuilder() + .setName( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setTargetId("targetId-441951604") + .setRolloutId("rolloutId551248556") + .setReleaseId("releaseId89607042") + .setRolloutToRollBack("rolloutToRollBack-1195544784") + .setRollbackConfig(RollbackTargetConfig.newBuilder().build()) + .setValidateOnly(true) + .build(); + ApiFuture future = + cloudDeployClient.rollbackTargetCallable().futureCall(request); + // Do something. + RollbackTargetResponse response = future.get(); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_RollbackTarget_async] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/rollbacktarget/SyncRollbackTarget.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/rollbacktarget/SyncRollbackTarget.java new file mode 100644 index 000000000000..1e7d8b3239cd --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/rollbacktarget/SyncRollbackTarget.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_RollbackTarget_sync] +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; +import com.google.cloud.deploy.v1.RollbackTargetConfig; +import com.google.cloud.deploy.v1.RollbackTargetRequest; +import com.google.cloud.deploy.v1.RollbackTargetResponse; + +public class SyncRollbackTarget { + + public static void main(String[] args) throws Exception { + syncRollbackTarget(); + } + + public static void syncRollbackTarget() 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()) { + RollbackTargetRequest request = + RollbackTargetRequest.newBuilder() + .setName( + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]") + .toString()) + .setTargetId("targetId-441951604") + .setRolloutId("rolloutId551248556") + .setReleaseId("releaseId89607042") + .setRolloutToRollBack("rolloutToRollBack-1195544784") + .setRollbackConfig(RollbackTargetConfig.newBuilder().build()) + .setValidateOnly(true) + .build(); + RollbackTargetResponse response = cloudDeployClient.rollbackTarget(request); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_RollbackTarget_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/rollbacktarget/SyncRollbackTargetDeliverypipelinenameStringString.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/rollbacktarget/SyncRollbackTargetDeliverypipelinenameStringString.java new file mode 100644 index 000000000000..61a3e378a478 --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/rollbacktarget/SyncRollbackTargetDeliverypipelinenameStringString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_RollbackTarget_DeliverypipelinenameStringString_sync] +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; +import com.google.cloud.deploy.v1.RollbackTargetResponse; + +public class SyncRollbackTargetDeliverypipelinenameStringString { + + public static void main(String[] args) throws Exception { + syncRollbackTargetDeliverypipelinenameStringString(); + } + + public static void syncRollbackTargetDeliverypipelinenameStringString() 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()) { + DeliveryPipelineName name = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]"); + String targetId = "targetId-441951604"; + String rolloutId = "rolloutId551248556"; + RollbackTargetResponse response = cloudDeployClient.rollbackTarget(name, targetId, rolloutId); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_RollbackTarget_DeliverypipelinenameStringString_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/rollbacktarget/SyncRollbackTargetStringStringString.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/rollbacktarget/SyncRollbackTargetStringStringString.java new file mode 100644 index 000000000000..26b23aeb919f --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/rollbacktarget/SyncRollbackTargetStringStringString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_RollbackTarget_StringStringString_sync] +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.DeliveryPipelineName; +import com.google.cloud.deploy.v1.RollbackTargetResponse; + +public class SyncRollbackTargetStringStringString { + + public static void main(String[] args) throws Exception { + syncRollbackTargetStringStringString(); + } + + public static void syncRollbackTargetStringStringString() 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 = + DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString(); + String targetId = "targetId-441951604"; + String rolloutId = "rolloutId551248556"; + RollbackTargetResponse response = cloudDeployClient.rollbackTarget(name, targetId, rolloutId); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_RollbackTarget_StringStringString_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/updateautomation/AsyncUpdateAutomation.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/updateautomation/AsyncUpdateAutomation.java new file mode 100644 index 000000000000..9344a06e264d --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/updateautomation/AsyncUpdateAutomation.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_UpdateAutomation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.UpdateAutomationRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateAutomation { + + public static void main(String[] args) throws Exception { + asyncUpdateAutomation(); + } + + public static void asyncUpdateAutomation() 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()) { + UpdateAutomationRequest request = + UpdateAutomationRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setAutomation(Automation.newBuilder().build()) + .setRequestId("requestId693933066") + .setAllowMissing(true) + .setValidateOnly(true) + .build(); + ApiFuture future = + cloudDeployClient.updateAutomationCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_UpdateAutomation_async] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/updateautomation/AsyncUpdateAutomationLRO.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/updateautomation/AsyncUpdateAutomationLRO.java new file mode 100644 index 000000000000..c32a1a52cb22 --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/updateautomation/AsyncUpdateAutomationLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_UpdateAutomation_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.OperationMetadata; +import com.google.cloud.deploy.v1.UpdateAutomationRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateAutomationLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateAutomationLRO(); + } + + public static void asyncUpdateAutomationLRO() 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()) { + UpdateAutomationRequest request = + UpdateAutomationRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setAutomation(Automation.newBuilder().build()) + .setRequestId("requestId693933066") + .setAllowMissing(true) + .setValidateOnly(true) + .build(); + OperationFuture future = + cloudDeployClient.updateAutomationOperationCallable().futureCall(request); + // Do something. + Automation response = future.get(); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_UpdateAutomation_LRO_async] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/updateautomation/SyncUpdateAutomation.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/updateautomation/SyncUpdateAutomation.java new file mode 100644 index 000000000000..6dc4d0ac5b1e --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/updateautomation/SyncUpdateAutomation.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_UpdateAutomation_sync] +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.cloud.deploy.v1.UpdateAutomationRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateAutomation { + + public static void main(String[] args) throws Exception { + syncUpdateAutomation(); + } + + public static void syncUpdateAutomation() 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()) { + UpdateAutomationRequest request = + UpdateAutomationRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setAutomation(Automation.newBuilder().build()) + .setRequestId("requestId693933066") + .setAllowMissing(true) + .setValidateOnly(true) + .build(); + Automation response = cloudDeployClient.updateAutomationAsync(request).get(); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_UpdateAutomation_sync] diff --git a/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/updateautomation/SyncUpdateAutomationAutomationFieldmask.java b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/updateautomation/SyncUpdateAutomationAutomationFieldmask.java new file mode 100644 index 000000000000..2fadefc2c77b --- /dev/null +++ b/java-deploy/samples/snippets/generated/com/google/cloud/deploy/v1/clouddeploy/updateautomation/SyncUpdateAutomationAutomationFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF 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 clouddeploy_v1_generated_CloudDeploy_UpdateAutomation_AutomationFieldmask_sync] +import com.google.cloud.deploy.v1.Automation; +import com.google.cloud.deploy.v1.CloudDeployClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateAutomationAutomationFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateAutomationAutomationFieldmask(); + } + + public static void syncUpdateAutomationAutomationFieldmask() 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()) { + Automation automation = Automation.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Automation response = cloudDeployClient.updateAutomationAsync(automation, updateMask).get(); + } + } +} +// [END clouddeploy_v1_generated_CloudDeploy_UpdateAutomation_AutomationFieldmask_sync]