createRolloutCallabl
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Gets the configuration for a location.
+ * Retries the specified Job in a Rollout.
*
* Sample code:
*
@@ -2824,23 +2953,35 @@ public final UnaryCallable createRolloutCallabl
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
- * ConfigName name = ConfigName.of("[PROJECT]", "[LOCATION]");
- * Config response = cloudDeployClient.getConfig(name);
+ * RolloutName rollout =
+ * RolloutName.of(
+ * "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]");
+ * String phaseId = "phaseId-608264202";
+ * String jobId = "jobId101296568";
+ * RetryJobResponse response = cloudDeployClient.retryJob(rollout, phaseId, jobId);
* }
* }
*
- * @param name Required. Name of requested configuration.
+ * @param rollout Required. Name of the Rollout. Format is
+ * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+ * releases/{release}/rollouts/{rollout}.
+ * @param phaseId Required. The phase ID the Job to retry belongs to.
+ * @param jobId Required. The job ID for the Job to retry.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Config getConfig(ConfigName name) {
- GetConfigRequest request =
- GetConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build();
- return getConfig(request);
+ public final RetryJobResponse retryJob(RolloutName rollout, String phaseId, String jobId) {
+ RetryJobRequest request =
+ RetryJobRequest.newBuilder()
+ .setRollout(rollout == null ? null : rollout.toString())
+ .setPhaseId(phaseId)
+ .setJobId(jobId)
+ .build();
+ return retryJob(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Gets the configuration for a location.
+ * Retries the specified Job in a Rollout.
*
* Sample code:
*
@@ -2851,22 +2992,35 @@ public final Config getConfig(ConfigName name) {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
- * String name = ConfigName.of("[PROJECT]", "[LOCATION]").toString();
- * Config response = cloudDeployClient.getConfig(name);
+ * String rollout =
+ * RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]")
+ * .toString();
+ * String phaseId = "phaseId-608264202";
+ * String jobId = "jobId101296568";
+ * RetryJobResponse response = cloudDeployClient.retryJob(rollout, phaseId, jobId);
* }
* }
*
- * @param name Required. Name of requested configuration.
+ * @param rollout Required. Name of the Rollout. Format is
+ * projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
+ * releases/{release}/rollouts/{rollout}.
+ * @param phaseId Required. The phase ID the Job to retry belongs to.
+ * @param jobId Required. The job ID for the Job to retry.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Config getConfig(String name) {
- GetConfigRequest request = GetConfigRequest.newBuilder().setName(name).build();
- return getConfig(request);
+ public final RetryJobResponse retryJob(String rollout, String phaseId, String jobId) {
+ RetryJobRequest request =
+ RetryJobRequest.newBuilder()
+ .setRollout(rollout)
+ .setPhaseId(phaseId)
+ .setJobId(jobId)
+ .build();
+ return retryJob(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Gets the configuration for a location.
+ * Retries the specified Job in a Rollout.
*
*
Sample code:
*
@@ -2877,24 +3031,33 @@ public final Config getConfig(String name) {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
- * GetConfigRequest request =
- * GetConfigRequest.newBuilder()
- * .setName(ConfigName.of("[PROJECT]", "[LOCATION]").toString())
+ * RetryJobRequest request =
+ * RetryJobRequest.newBuilder()
+ * .setRollout(
+ * RolloutName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[DELIVERY_PIPELINE]",
+ * "[RELEASE]",
+ * "[ROLLOUT]")
+ * .toString())
+ * .setPhaseId("phaseId-608264202")
+ * .setJobId("jobId101296568")
* .build();
- * Config response = cloudDeployClient.getConfig(request);
+ * RetryJobResponse response = cloudDeployClient.retryJob(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Config getConfig(GetConfigRequest request) {
- return getConfigCallable().call(request);
+ public final RetryJobResponse retryJob(RetryJobRequest request) {
+ return retryJobCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Gets the configuration for a location.
+ * Retries the specified Job in a Rollout.
*
*
Sample code:
*
@@ -2905,59 +3068,867 @@ public final Config getConfig(GetConfigRequest request) {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
- * GetConfigRequest request =
- * GetConfigRequest.newBuilder()
- * .setName(ConfigName.of("[PROJECT]", "[LOCATION]").toString())
+ * RetryJobRequest request =
+ * RetryJobRequest.newBuilder()
+ * .setRollout(
+ * RolloutName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[DELIVERY_PIPELINE]",
+ * "[RELEASE]",
+ * "[ROLLOUT]")
+ * .toString())
+ * .setPhaseId("phaseId-608264202")
+ * .setJobId("jobId101296568")
* .build();
- * ApiFuture future = cloudDeployClient.getConfigCallable().futureCall(request);
+ * ApiFuture future = cloudDeployClient.retryJobCallable().futureCall(request);
* // Do something.
- * Config response = future.get();
+ * RetryJobResponse response = future.get();
* }
* }
*/
- public final UnaryCallable getConfigCallable() {
- return stub.getConfigCallable();
- }
-
- @Override
- public final void close() {
- stub.close();
- }
-
- @Override
- public void shutdown() {
- stub.shutdown();
- }
-
- @Override
- public boolean isShutdown() {
- return stub.isShutdown();
+ public final UnaryCallable retryJobCallable() {
+ return stub.retryJobCallable();
}
- @Override
- public boolean isTerminated() {
- return stub.isTerminated();
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists JobRuns in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * RolloutName parent =
+ * RolloutName.of(
+ * "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]");
+ * for (JobRun element : cloudDeployClient.listJobRuns(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The `Rollout` which owns this collection of `JobRun` objects.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListJobRunsPagedResponse listJobRuns(RolloutName parent) {
+ ListJobRunsRequest request =
+ ListJobRunsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listJobRuns(request);
}
- @Override
- public void shutdownNow() {
- stub.shutdownNow();
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists JobRuns in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * String parent =
+ * RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]")
+ * .toString();
+ * for (JobRun element : cloudDeployClient.listJobRuns(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The `Rollout` which owns this collection of `JobRun` objects.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListJobRunsPagedResponse listJobRuns(String parent) {
+ ListJobRunsRequest request = ListJobRunsRequest.newBuilder().setParent(parent).build();
+ return listJobRuns(request);
}
- @Override
- public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
- return stub.awaitTermination(duration, unit);
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists JobRuns in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * ListJobRunsRequest request =
+ * ListJobRunsRequest.newBuilder()
+ * .setParent(
+ * RolloutName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[DELIVERY_PIPELINE]",
+ * "[RELEASE]",
+ * "[ROLLOUT]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (JobRun element : cloudDeployClient.listJobRuns(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListJobRunsPagedResponse listJobRuns(ListJobRunsRequest request) {
+ return listJobRunsPagedCallable().call(request);
}
- public static class ListDeliveryPipelinesPagedResponse
- extends AbstractPagedListResponse<
- ListDeliveryPipelinesRequest,
- ListDeliveryPipelinesResponse,
- DeliveryPipeline,
- ListDeliveryPipelinesPage,
- ListDeliveryPipelinesFixedSizeCollection> {
-
- public static ApiFuture createAsync(
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists JobRuns in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * ListJobRunsRequest request =
+ * ListJobRunsRequest.newBuilder()
+ * .setParent(
+ * RolloutName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[DELIVERY_PIPELINE]",
+ * "[RELEASE]",
+ * "[ROLLOUT]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future = cloudDeployClient.listJobRunsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (JobRun element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listJobRunsPagedCallable() {
+ return stub.listJobRunsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists JobRuns in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * ListJobRunsRequest request =
+ * ListJobRunsRequest.newBuilder()
+ * .setParent(
+ * RolloutName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[DELIVERY_PIPELINE]",
+ * "[RELEASE]",
+ * "[ROLLOUT]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListJobRunsResponse response = cloudDeployClient.listJobRunsCallable().call(request);
+ * for (JobRun element : response.getJobRunsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable listJobRunsCallable() {
+ return stub.listJobRunsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single JobRun.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * JobRunName name =
+ * JobRunName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[DELIVERY_PIPELINE]",
+ * "[RELEASE]",
+ * "[ROLLOUT]",
+ * "[JOB_RUN]");
+ * JobRun response = cloudDeployClient.getJobRun(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the `JobRun`. Format must be
+ * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final JobRun getJobRun(JobRunName name) {
+ GetJobRunRequest request =
+ GetJobRunRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getJobRun(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single JobRun.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * String name =
+ * JobRunName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[DELIVERY_PIPELINE]",
+ * "[RELEASE]",
+ * "[ROLLOUT]",
+ * "[JOB_RUN]")
+ * .toString();
+ * JobRun response = cloudDeployClient.getJobRun(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the `JobRun`. Format must be
+ * projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final JobRun getJobRun(String name) {
+ GetJobRunRequest request = GetJobRunRequest.newBuilder().setName(name).build();
+ return getJobRun(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single JobRun.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * GetJobRunRequest request =
+ * GetJobRunRequest.newBuilder()
+ * .setName(
+ * JobRunName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[DELIVERY_PIPELINE]",
+ * "[RELEASE]",
+ * "[ROLLOUT]",
+ * "[JOB_RUN]")
+ * .toString())
+ * .build();
+ * JobRun response = cloudDeployClient.getJobRun(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final JobRun getJobRun(GetJobRunRequest request) {
+ return getJobRunCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single JobRun.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * GetJobRunRequest request =
+ * GetJobRunRequest.newBuilder()
+ * .setName(
+ * JobRunName.of(
+ * "[PROJECT]",
+ * "[LOCATION]",
+ * "[DELIVERY_PIPELINE]",
+ * "[RELEASE]",
+ * "[ROLLOUT]",
+ * "[JOB_RUN]")
+ * .toString())
+ * .build();
+ * ApiFuture future = cloudDeployClient.getJobRunCallable().futureCall(request);
+ * // Do something.
+ * JobRun response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getJobRunCallable() {
+ return stub.getJobRunCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the configuration for a location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * ConfigName name = ConfigName.of("[PROJECT]", "[LOCATION]");
+ * Config response = cloudDeployClient.getConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of requested configuration.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Config getConfig(ConfigName name) {
+ GetConfigRequest request =
+ GetConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the configuration for a location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * String name = ConfigName.of("[PROJECT]", "[LOCATION]").toString();
+ * Config response = cloudDeployClient.getConfig(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of requested configuration.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Config getConfig(String name) {
+ GetConfigRequest request = GetConfigRequest.newBuilder().setName(name).build();
+ return getConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the configuration for a location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * GetConfigRequest request =
+ * GetConfigRequest.newBuilder()
+ * .setName(ConfigName.of("[PROJECT]", "[LOCATION]").toString())
+ * .build();
+ * Config response = cloudDeployClient.getConfig(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Config getConfig(GetConfigRequest request) {
+ return getConfigCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the configuration for a location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * GetConfigRequest request =
+ * GetConfigRequest.newBuilder()
+ * .setName(ConfigName.of("[PROJECT]", "[LOCATION]").toString())
+ * .build();
+ * ApiFuture future = cloudDeployClient.getConfigCallable().futureCall(request);
+ * // Do something.
+ * Config response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getConfigCallable() {
+ return stub.getConfigCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : cloudDeployClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * cloudDeployClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listLocationsPagedCallable() {
+ return stub.listLocationsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response = cloudDeployClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable listLocationsCallable() {
+ return stub.listLocationsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = cloudDeployClient.getLocation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future = cloudDeployClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getLocationCallable() {
+ return stub.getLocationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replacesany existing policy.
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Policy response = cloudDeployClient.setIamPolicy(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy setIamPolicy(SetIamPolicyRequest request) {
+ return setIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replacesany existing policy.
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = cloudDeployClient.setIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable setIamPolicyCallable() {
+ return stub.setIamPolicyCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. Returns an empty policyif the resource exists
+ * and does not have a policy set.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = cloudDeployClient.getIamPolicy(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy getIamPolicy(GetIamPolicyRequest request) {
+ return getIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. Returns an empty policyif the resource exists
+ * and does not have a policy set.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture future = cloudDeployClient.getIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getIamPolicyCallable() {
+ return stub.getIamPolicyCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified resource. If theresource does not exist,
+ * this will return an empty set ofpermissions, not a `NOT_FOUND` error.
+ *
+ * Note: This operation is designed to be used for buildingpermission-aware UIs and
+ * command-line tools, not for authorizationchecking. This operation may "fail open" without
+ * warning.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+ * .toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * TestIamPermissionsResponse response = cloudDeployClient.testIamPermissions(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
+ return testIamPermissionsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns permissions that a caller has on the specified resource. If theresource does not exist,
+ * this will return an empty set ofpermissions, not a `NOT_FOUND` error.
+ *
+ * Note: This operation is designed to be used for buildingpermission-aware UIs and
+ * command-line tools, not for authorizationchecking. This operation may "fail open" without
+ * warning.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+ * .toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * cloudDeployClient.testIamPermissionsCallable().futureCall(request);
+ * // Do something.
+ * TestIamPermissionsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ testIamPermissionsCallable() {
+ return stub.testIamPermissionsCallable();
+ }
+
+ @Override
+ public final void close() {
+ stub.close();
+ }
+
+ @Override
+ public void shutdown() {
+ stub.shutdown();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return stub.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return stub.isTerminated();
+ }
+
+ @Override
+ public void shutdownNow() {
+ stub.shutdownNow();
+ }
+
+ @Override
+ public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
+ return stub.awaitTermination(duration, unit);
+ }
+
+ public static class ListDeliveryPipelinesPagedResponse
+ extends AbstractPagedListResponse<
+ ListDeliveryPipelinesRequest,
+ ListDeliveryPipelinesResponse,
+ DeliveryPipeline,
+ ListDeliveryPipelinesPage,
+ ListDeliveryPipelinesFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
PageContext
context,
ApiFuture futureResponse) {
@@ -3255,4 +4226,153 @@ protected ListRolloutsFixedSizeCollection createCollection(
return new ListRolloutsFixedSizeCollection(pages, collectionSize);
}
}
+
+ public static class ListJobRunsPagedResponse
+ extends AbstractPagedListResponse<
+ ListJobRunsRequest,
+ ListJobRunsResponse,
+ JobRun,
+ ListJobRunsPage,
+ ListJobRunsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListJobRunsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage, input -> new ListJobRunsPagedResponse(input), MoreExecutors.directExecutor());
+ }
+
+ private ListJobRunsPagedResponse(ListJobRunsPage page) {
+ super(page, ListJobRunsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListJobRunsPage
+ extends AbstractPage {
+
+ private ListJobRunsPage(
+ PageContext context,
+ ListJobRunsResponse response) {
+ super(context, response);
+ }
+
+ private static ListJobRunsPage createEmptyPage() {
+ return new ListJobRunsPage(null, null);
+ }
+
+ @Override
+ protected ListJobRunsPage createPage(
+ PageContext context,
+ ListJobRunsResponse response) {
+ return new ListJobRunsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListJobRunsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListJobRunsRequest,
+ ListJobRunsResponse,
+ JobRun,
+ ListJobRunsPage,
+ ListJobRunsFixedSizeCollection> {
+
+ private ListJobRunsFixedSizeCollection(List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListJobRunsFixedSizeCollection createEmptyCollection() {
+ return new ListJobRunsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListJobRunsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListJobRunsFixedSizeCollection(pages, collectionSize);
+ }
+ }
+
+ public static class ListLocationsPagedResponse
+ extends AbstractPagedListResponse<
+ ListLocationsRequest,
+ ListLocationsResponse,
+ Location,
+ ListLocationsPage,
+ ListLocationsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListLocationsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListLocationsPagedResponse(ListLocationsPage page) {
+ super(page, ListLocationsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListLocationsPage
+ extends AbstractPage<
+ ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> {
+
+ private ListLocationsPage(
+ PageContext context,
+ ListLocationsResponse response) {
+ super(context, response);
+ }
+
+ private static ListLocationsPage createEmptyPage() {
+ return new ListLocationsPage(null, null);
+ }
+
+ @Override
+ protected ListLocationsPage createPage(
+ PageContext context,
+ ListLocationsResponse response) {
+ return new ListLocationsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListLocationsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListLocationsRequest,
+ ListLocationsResponse,
+ Location,
+ ListLocationsPage,
+ ListLocationsFixedSizeCollection> {
+
+ private ListLocationsFixedSizeCollection(List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListLocationsFixedSizeCollection createEmptyCollection() {
+ return new ListLocationsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListLocationsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListLocationsFixedSizeCollection(pages, collectionSize);
+ }
+ }
}
diff --git a/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 30e28d89cba8..fed821f714a4 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
@@ -17,6 +17,8 @@
package com.google.cloud.deploy.v1;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse;
+import static com.google.cloud.deploy.v1.CloudDeployClient.ListJobRunsPagedResponse;
+import static com.google.cloud.deploy.v1.CloudDeployClient.ListLocationsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListReleasesPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListRolloutsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListTargetsPagedResponse;
@@ -35,6 +37,15 @@
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.deploy.v1.stub.CloudDeployStubSettings;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import java.io.IOException;
@@ -194,6 +205,11 @@ public UnaryCallSettings createReleaseSettings(
return ((CloudDeployStubSettings) getStubSettings()).createReleaseOperationSettings();
}
+ /** Returns the object with the settings used for calls to abandonRelease. */
+ public UnaryCallSettings abandonReleaseSettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).abandonReleaseSettings();
+ }
+
/** Returns the object with the settings used for calls to approveRollout. */
public UnaryCallSettings approveRolloutSettings() {
return ((CloudDeployStubSettings) getStubSettings()).approveRolloutSettings();
@@ -221,11 +237,54 @@ public UnaryCallSettings createRolloutSettings(
return ((CloudDeployStubSettings) getStubSettings()).createRolloutOperationSettings();
}
+ /** Returns the object with the settings used for calls to retryJob. */
+ public UnaryCallSettings retryJobSettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).retryJobSettings();
+ }
+
+ /** Returns the object with the settings used for calls to listJobRuns. */
+ public PagedCallSettings
+ listJobRunsSettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).listJobRunsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getJobRun. */
+ public UnaryCallSettings getJobRunSettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).getJobRunSettings();
+ }
+
/** Returns the object with the settings used for calls to getConfig. */
public UnaryCallSettings getConfigSettings() {
return ((CloudDeployStubSettings) getStubSettings()).getConfigSettings();
}
+ /** Returns the object with the settings used for calls to listLocations. */
+ public PagedCallSettings
+ listLocationsSettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).listLocationsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getLocation. */
+ public UnaryCallSettings getLocationSettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).getLocationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings setIamPolicySettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).setIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings getIamPolicySettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).getIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings
+ testIamPermissionsSettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).testIamPermissionsSettings();
+ }
+
public static final CloudDeploySettings create(CloudDeployStubSettings stub) throws IOException {
return new CloudDeploySettings.Builder(stub.toBuilder()).build();
}
@@ -461,6 +520,12 @@ public UnaryCallSettings.Builder createReleaseS
return getStubSettingsBuilder().createReleaseOperationSettings();
}
+ /** Returns the builder for the settings used for calls to abandonRelease. */
+ public UnaryCallSettings.Builder
+ abandonReleaseSettings() {
+ return getStubSettingsBuilder().abandonReleaseSettings();
+ }
+
/** Returns the builder for the settings used for calls to approveRollout. */
public UnaryCallSettings.Builder
approveRolloutSettings() {
@@ -490,11 +555,56 @@ public UnaryCallSettings.Builder createRolloutS
return getStubSettingsBuilder().createRolloutOperationSettings();
}
+ /** Returns the builder for the settings used for calls to retryJob. */
+ public UnaryCallSettings.Builder retryJobSettings() {
+ return getStubSettingsBuilder().retryJobSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listJobRuns. */
+ public PagedCallSettings.Builder<
+ ListJobRunsRequest, ListJobRunsResponse, ListJobRunsPagedResponse>
+ listJobRunsSettings() {
+ return getStubSettingsBuilder().listJobRunsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getJobRun. */
+ public UnaryCallSettings.Builder getJobRunSettings() {
+ return getStubSettingsBuilder().getJobRunSettings();
+ }
+
/** Returns the builder for the settings used for calls to getConfig. */
public UnaryCallSettings.Builder getConfigSettings() {
return getStubSettingsBuilder().getConfigSettings();
}
+ /** Returns the builder for the settings used for calls to listLocations. */
+ public PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings() {
+ return getStubSettingsBuilder().listLocationsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getLocation. */
+ public UnaryCallSettings.Builder getLocationSettings() {
+ return getStubSettingsBuilder().getLocationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings.Builder setIamPolicySettings() {
+ return getStubSettingsBuilder().setIamPolicySettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings.Builder getIamPolicySettings() {
+ return getStubSettingsBuilder().getIamPolicySettings();
+ }
+
+ /** Returns the builder for the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings.Builder
+ testIamPermissionsSettings() {
+ return getStubSettingsBuilder().testIamPermissionsSettings();
+ }
+
@Override
public CloudDeploySettings build() throws IOException {
return new CloudDeploySettings(this);
diff --git a/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 ceb3857a9eb7..c7edaecae2ab 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
@@ -10,6 +10,9 @@
"grpc": {
"libraryClient": "CloudDeployClient",
"rpcs": {
+ "AbandonRelease": {
+ "methods": ["abandonRelease", "abandonRelease", "abandonRelease", "abandonReleaseCallable"]
+ },
"ApproveRollout": {
"methods": ["approveRollout", "approveRollout", "approveRollout", "approveRolloutCallable"]
},
@@ -37,6 +40,15 @@
"GetDeliveryPipeline": {
"methods": ["getDeliveryPipeline", "getDeliveryPipeline", "getDeliveryPipeline", "getDeliveryPipelineCallable"]
},
+ "GetIamPolicy": {
+ "methods": ["getIamPolicy", "getIamPolicyCallable"]
+ },
+ "GetJobRun": {
+ "methods": ["getJobRun", "getJobRun", "getJobRun", "getJobRunCallable"]
+ },
+ "GetLocation": {
+ "methods": ["getLocation", "getLocationCallable"]
+ },
"GetRelease": {
"methods": ["getRelease", "getRelease", "getRelease", "getReleaseCallable"]
},
@@ -49,6 +61,12 @@
"ListDeliveryPipelines": {
"methods": ["listDeliveryPipelines", "listDeliveryPipelines", "listDeliveryPipelines", "listDeliveryPipelinesPagedCallable", "listDeliveryPipelinesCallable"]
},
+ "ListJobRuns": {
+ "methods": ["listJobRuns", "listJobRuns", "listJobRuns", "listJobRunsPagedCallable", "listJobRunsCallable"]
+ },
+ "ListLocations": {
+ "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
+ },
"ListReleases": {
"methods": ["listReleases", "listReleases", "listReleases", "listReleasesPagedCallable", "listReleasesCallable"]
},
@@ -58,6 +76,15 @@
"ListTargets": {
"methods": ["listTargets", "listTargets", "listTargets", "listTargetsPagedCallable", "listTargetsCallable"]
},
+ "RetryJob": {
+ "methods": ["retryJob", "retryJob", "retryJob", "retryJobCallable"]
+ },
+ "SetIamPolicy": {
+ "methods": ["setIamPolicy", "setIamPolicyCallable"]
+ },
+ "TestIamPermissions": {
+ "methods": ["testIamPermissions", "testIamPermissionsCallable"]
+ },
"UpdateDeliveryPipeline": {
"methods": ["updateDeliveryPipelineAsync", "updateDeliveryPipelineAsync", "updateDeliveryPipelineOperationCallable", "updateDeliveryPipelineCallable"]
},
diff --git a/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 04291252e1dc..6ba4947864f3 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
@@ -17,6 +17,8 @@
package com.google.cloud.deploy.v1.stub;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse;
+import static com.google.cloud.deploy.v1.CloudDeployClient.ListJobRunsPagedResponse;
+import static com.google.cloud.deploy.v1.CloudDeployClient.ListLocationsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListReleasesPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListRolloutsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListTargetsPagedResponse;
@@ -24,6 +26,8 @@
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.deploy.v1.AbandonReleaseRequest;
+import com.google.cloud.deploy.v1.AbandonReleaseResponse;
import com.google.cloud.deploy.v1.ApproveRolloutRequest;
import com.google.cloud.deploy.v1.ApproveRolloutResponse;
import com.google.cloud.deploy.v1.Config;
@@ -36,11 +40,15 @@
import com.google.cloud.deploy.v1.DeliveryPipeline;
import com.google.cloud.deploy.v1.GetConfigRequest;
import com.google.cloud.deploy.v1.GetDeliveryPipelineRequest;
+import com.google.cloud.deploy.v1.GetJobRunRequest;
import com.google.cloud.deploy.v1.GetReleaseRequest;
import com.google.cloud.deploy.v1.GetRolloutRequest;
import com.google.cloud.deploy.v1.GetTargetRequest;
+import com.google.cloud.deploy.v1.JobRun;
import com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest;
import com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse;
+import com.google.cloud.deploy.v1.ListJobRunsRequest;
+import com.google.cloud.deploy.v1.ListJobRunsResponse;
import com.google.cloud.deploy.v1.ListReleasesRequest;
import com.google.cloud.deploy.v1.ListReleasesResponse;
import com.google.cloud.deploy.v1.ListRolloutsRequest;
@@ -49,10 +57,21 @@
import com.google.cloud.deploy.v1.ListTargetsResponse;
import com.google.cloud.deploy.v1.OperationMetadata;
import com.google.cloud.deploy.v1.Release;
+import com.google.cloud.deploy.v1.RetryJobRequest;
+import com.google.cloud.deploy.v1.RetryJobResponse;
import com.google.cloud.deploy.v1.Rollout;
import com.google.cloud.deploy.v1.Target;
import com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.UpdateTargetRequest;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.OperationsStub;
import com.google.protobuf.Empty;
@@ -180,6 +199,10 @@ public UnaryCallable createReleaseCallable() {
throw new UnsupportedOperationException("Not implemented: createReleaseCallable()");
}
+ public UnaryCallable abandonReleaseCallable() {
+ throw new UnsupportedOperationException("Not implemented: abandonReleaseCallable()");
+ }
+
public UnaryCallable approveRolloutCallable() {
throw new UnsupportedOperationException("Not implemented: approveRolloutCallable()");
}
@@ -205,10 +228,52 @@ public UnaryCallable createRolloutCallable() {
throw new UnsupportedOperationException("Not implemented: createRolloutCallable()");
}
+ public UnaryCallable retryJobCallable() {
+ throw new UnsupportedOperationException("Not implemented: retryJobCallable()");
+ }
+
+ public UnaryCallable listJobRunsPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listJobRunsPagedCallable()");
+ }
+
+ public UnaryCallable listJobRunsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listJobRunsCallable()");
+ }
+
+ public UnaryCallable getJobRunCallable() {
+ throw new UnsupportedOperationException("Not implemented: getJobRunCallable()");
+ }
+
public UnaryCallable getConfigCallable() {
throw new UnsupportedOperationException("Not implemented: getConfigCallable()");
}
+ public UnaryCallable
+ listLocationsPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");
+ }
+
+ public UnaryCallable listLocationsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listLocationsCallable()");
+ }
+
+ public UnaryCallable getLocationCallable() {
+ throw new UnsupportedOperationException("Not implemented: getLocationCallable()");
+ }
+
+ public UnaryCallable setIamPolicyCallable() {
+ throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()");
+ }
+
+ public UnaryCallable getIamPolicyCallable() {
+ throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()");
+ }
+
+ public UnaryCallable
+ testIamPermissionsCallable() {
+ throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()");
+ }
+
@Override
public abstract void close();
}
diff --git a/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 e991b6bf64a2..f357da528409 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
@@ -17,6 +17,8 @@
package com.google.cloud.deploy.v1.stub;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse;
+import static com.google.cloud.deploy.v1.CloudDeployClient.ListJobRunsPagedResponse;
+import static com.google.cloud.deploy.v1.CloudDeployClient.ListLocationsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListReleasesPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListRolloutsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListTargetsPagedResponse;
@@ -50,6 +52,8 @@
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.deploy.v1.AbandonReleaseRequest;
+import com.google.cloud.deploy.v1.AbandonReleaseResponse;
import com.google.cloud.deploy.v1.ApproveRolloutRequest;
import com.google.cloud.deploy.v1.ApproveRolloutResponse;
import com.google.cloud.deploy.v1.Config;
@@ -62,11 +66,15 @@
import com.google.cloud.deploy.v1.DeliveryPipeline;
import com.google.cloud.deploy.v1.GetConfigRequest;
import com.google.cloud.deploy.v1.GetDeliveryPipelineRequest;
+import com.google.cloud.deploy.v1.GetJobRunRequest;
import com.google.cloud.deploy.v1.GetReleaseRequest;
import com.google.cloud.deploy.v1.GetRolloutRequest;
import com.google.cloud.deploy.v1.GetTargetRequest;
+import com.google.cloud.deploy.v1.JobRun;
import com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest;
import com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse;
+import com.google.cloud.deploy.v1.ListJobRunsRequest;
+import com.google.cloud.deploy.v1.ListJobRunsResponse;
import com.google.cloud.deploy.v1.ListReleasesRequest;
import com.google.cloud.deploy.v1.ListReleasesResponse;
import com.google.cloud.deploy.v1.ListRolloutsRequest;
@@ -75,14 +83,25 @@
import com.google.cloud.deploy.v1.ListTargetsResponse;
import com.google.cloud.deploy.v1.OperationMetadata;
import com.google.cloud.deploy.v1.Release;
+import com.google.cloud.deploy.v1.RetryJobRequest;
+import com.google.cloud.deploy.v1.RetryJobResponse;
import com.google.cloud.deploy.v1.Rollout;
import com.google.cloud.deploy.v1.Target;
import com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.UpdateTargetRequest;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import java.io.IOException;
@@ -170,6 +189,8 @@ public class CloudDeployStubSettings extends StubSettings createReleaseSettings;
private final OperationCallSettings
createReleaseOperationSettings;
+ private final UnaryCallSettings
+ abandonReleaseSettings;
private final UnaryCallSettings
approveRolloutSettings;
private final PagedCallSettings<
@@ -179,7 +200,19 @@ public class CloudDeployStubSettings extends StubSettings createRolloutSettings;
private final OperationCallSettings
createRolloutOperationSettings;
+ private final UnaryCallSettings retryJobSettings;
+ private final PagedCallSettings
+ listJobRunsSettings;
+ private final UnaryCallSettings getJobRunSettings;
private final UnaryCallSettings getConfigSettings;
+ private final PagedCallSettings<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings;
+ private final UnaryCallSettings getLocationSettings;
+ private final UnaryCallSettings setIamPolicySettings;
+ private final UnaryCallSettings getIamPolicySettings;
+ private final UnaryCallSettings
+ testIamPermissionsSettings;
private static final PagedListDescriptor<
ListDeliveryPipelinesRequest, ListDeliveryPipelinesResponse, DeliveryPipeline>
@@ -330,6 +363,78 @@ public Iterable extractResources(ListRolloutsResponse payload) {
}
};
+ private static final PagedListDescriptor
+ LIST_JOB_RUNS_PAGE_STR_DESC =
+ new PagedListDescriptor() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListJobRunsRequest injectToken(ListJobRunsRequest payload, String token) {
+ return ListJobRunsRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListJobRunsRequest injectPageSize(ListJobRunsRequest payload, int pageSize) {
+ return ListJobRunsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListJobRunsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListJobRunsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(ListJobRunsResponse payload) {
+ return payload.getJobRunsList() == null
+ ? ImmutableList.of()
+ : payload.getJobRunsList();
+ }
+ };
+
+ private static final PagedListDescriptor
+ LIST_LOCATIONS_PAGE_STR_DESC =
+ new PagedListDescriptor() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) {
+ return ListLocationsRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) {
+ return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListLocationsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListLocationsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(ListLocationsResponse payload) {
+ return payload.getLocationsList() == null
+ ? ImmutableList.of()
+ : payload.getLocationsList();
+ }
+ };
+
private static final PagedListResponseFactory<
ListDeliveryPipelinesRequest,
ListDeliveryPipelinesResponse,
@@ -405,6 +510,40 @@ public ApiFuture getFuturePagedResponse(
}
};
+ private static final PagedListResponseFactory<
+ ListJobRunsRequest, ListJobRunsResponse, ListJobRunsPagedResponse>
+ LIST_JOB_RUNS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListJobRunsRequest, ListJobRunsResponse, ListJobRunsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListJobRunsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext pageContext =
+ PageContext.create(callable, LIST_JOB_RUNS_PAGE_STR_DESC, request, context);
+ return ListJobRunsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
+ private static final PagedListResponseFactory<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ LIST_LOCATIONS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListLocationsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext pageContext =
+ PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context);
+ return ListLocationsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
/** Returns the object with the settings used for calls to listDeliveryPipelines. */
public PagedCallSettings<
ListDeliveryPipelinesRequest,
@@ -522,6 +661,11 @@ public UnaryCallSettings createReleaseSettings(
return createReleaseOperationSettings;
}
+ /** Returns the object with the settings used for calls to abandonRelease. */
+ public UnaryCallSettings abandonReleaseSettings() {
+ return abandonReleaseSettings;
+ }
+
/** Returns the object with the settings used for calls to approveRollout. */
public UnaryCallSettings approveRolloutSettings() {
return approveRolloutSettings;
@@ -549,11 +693,54 @@ public UnaryCallSettings createRolloutSettings(
return createRolloutOperationSettings;
}
+ /** Returns the object with the settings used for calls to retryJob. */
+ public UnaryCallSettings retryJobSettings() {
+ return retryJobSettings;
+ }
+
+ /** Returns the object with the settings used for calls to listJobRuns. */
+ public PagedCallSettings
+ listJobRunsSettings() {
+ return listJobRunsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getJobRun. */
+ public UnaryCallSettings getJobRunSettings() {
+ return getJobRunSettings;
+ }
+
/** Returns the object with the settings used for calls to getConfig. */
public UnaryCallSettings getConfigSettings() {
return getConfigSettings;
}
+ /** Returns the object with the settings used for calls to listLocations. */
+ public PagedCallSettings
+ listLocationsSettings() {
+ return listLocationsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getLocation. */
+ public UnaryCallSettings getLocationSettings() {
+ return getLocationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings setIamPolicySettings() {
+ return setIamPolicySettings;
+ }
+
+ /** Returns the object with the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings getIamPolicySettings() {
+ return getIamPolicySettings;
+ }
+
+ /** Returns the object with the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings
+ testIamPermissionsSettings() {
+ return testIamPermissionsSettings;
+ }
+
public CloudDeployStub createStub() throws IOException {
if (getTransportChannelProvider()
.getTransportName()
@@ -683,12 +870,21 @@ protected CloudDeployStubSettings(Builder settingsBuilder) throws IOException {
getReleaseSettings = settingsBuilder.getReleaseSettings().build();
createReleaseSettings = settingsBuilder.createReleaseSettings().build();
createReleaseOperationSettings = settingsBuilder.createReleaseOperationSettings().build();
+ abandonReleaseSettings = settingsBuilder.abandonReleaseSettings().build();
approveRolloutSettings = settingsBuilder.approveRolloutSettings().build();
listRolloutsSettings = settingsBuilder.listRolloutsSettings().build();
getRolloutSettings = settingsBuilder.getRolloutSettings().build();
createRolloutSettings = settingsBuilder.createRolloutSettings().build();
createRolloutOperationSettings = settingsBuilder.createRolloutOperationSettings().build();
+ retryJobSettings = settingsBuilder.retryJobSettings().build();
+ listJobRunsSettings = settingsBuilder.listJobRunsSettings().build();
+ getJobRunSettings = settingsBuilder.getJobRunSettings().build();
getConfigSettings = settingsBuilder.getConfigSettings().build();
+ listLocationsSettings = settingsBuilder.listLocationsSettings().build();
+ getLocationSettings = settingsBuilder.getLocationSettings().build();
+ setIamPolicySettings = settingsBuilder.setIamPolicySettings().build();
+ getIamPolicySettings = settingsBuilder.getIamPolicySettings().build();
+ testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build();
}
/** Builder for CloudDeployStubSettings. */
@@ -736,6 +932,8 @@ public static class Builder extends StubSettings.Builder createReleaseSettings;
private final OperationCallSettings.Builder
createReleaseOperationSettings;
+ private final UnaryCallSettings.Builder
+ abandonReleaseSettings;
private final UnaryCallSettings.Builder
approveRolloutSettings;
private final PagedCallSettings.Builder<
@@ -745,7 +943,20 @@ public static class Builder extends StubSettings.Builder createRolloutSettings;
private final OperationCallSettings.Builder
createRolloutOperationSettings;
+ private final UnaryCallSettings.Builder retryJobSettings;
+ private final PagedCallSettings.Builder<
+ ListJobRunsRequest, ListJobRunsResponse, ListJobRunsPagedResponse>
+ listJobRunsSettings;
+ private final UnaryCallSettings.Builder getJobRunSettings;
private final UnaryCallSettings.Builder getConfigSettings;
+ private final PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings;
+ private final UnaryCallSettings.Builder getLocationSettings;
+ private final UnaryCallSettings.Builder setIamPolicySettings;
+ private final UnaryCallSettings.Builder getIamPolicySettings;
+ private final UnaryCallSettings.Builder
+ testIamPermissionsSettings;
private static final ImmutableMap>
RETRYABLE_CODE_DEFINITIONS;
@@ -757,6 +968,7 @@ public static class Builder extends StubSettings.BuildernewArrayList(StatusCode.Code.UNAVAILABLE)));
definitions.put(
"no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList()));
RETRYABLE_CODE_DEFINITIONS = definitions.build();
}
@@ -784,6 +996,8 @@ public static class Builder extends StubSettings.Builder>of(
@@ -837,11 +1060,20 @@ protected Builder(ClientContext clientContext) {
listReleasesSettings,
getReleaseSettings,
createReleaseSettings,
+ abandonReleaseSettings,
approveRolloutSettings,
listRolloutsSettings,
getRolloutSettings,
createRolloutSettings,
- getConfigSettings);
+ retryJobSettings,
+ listJobRunsSettings,
+ getJobRunSettings,
+ getConfigSettings,
+ listLocationsSettings,
+ getLocationSettings,
+ setIamPolicySettings,
+ getIamPolicySettings,
+ testIamPermissionsSettings);
initDefaults(this);
}
@@ -871,12 +1103,21 @@ protected Builder(CloudDeployStubSettings settings) {
getReleaseSettings = settings.getReleaseSettings.toBuilder();
createReleaseSettings = settings.createReleaseSettings.toBuilder();
createReleaseOperationSettings = settings.createReleaseOperationSettings.toBuilder();
+ abandonReleaseSettings = settings.abandonReleaseSettings.toBuilder();
approveRolloutSettings = settings.approveRolloutSettings.toBuilder();
listRolloutsSettings = settings.listRolloutsSettings.toBuilder();
getRolloutSettings = settings.getRolloutSettings.toBuilder();
createRolloutSettings = settings.createRolloutSettings.toBuilder();
createRolloutOperationSettings = settings.createRolloutOperationSettings.toBuilder();
+ retryJobSettings = settings.retryJobSettings.toBuilder();
+ listJobRunsSettings = settings.listJobRunsSettings.toBuilder();
+ getJobRunSettings = settings.getJobRunSettings.toBuilder();
getConfigSettings = settings.getConfigSettings.toBuilder();
+ listLocationsSettings = settings.listLocationsSettings.toBuilder();
+ getLocationSettings = settings.getLocationSettings.toBuilder();
+ setIamPolicySettings = settings.setIamPolicySettings.toBuilder();
+ getIamPolicySettings = settings.getIamPolicySettings.toBuilder();
+ testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
@@ -893,11 +1134,20 @@ protected Builder(CloudDeployStubSettings settings) {
listReleasesSettings,
getReleaseSettings,
createReleaseSettings,
+ abandonReleaseSettings,
approveRolloutSettings,
listRolloutsSettings,
getRolloutSettings,
createRolloutSettings,
- getConfigSettings);
+ retryJobSettings,
+ listJobRunsSettings,
+ getJobRunSettings,
+ getConfigSettings,
+ listLocationsSettings,
+ getLocationSettings,
+ setIamPolicySettings,
+ getIamPolicySettings,
+ testIamPermissionsSettings);
}
private static Builder createDefault() {
@@ -992,6 +1242,11 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+ builder
+ .abandonReleaseSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+
builder
.approveRolloutSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
@@ -1012,11 +1267,51 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+ builder
+ .retryJobSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+
+ builder
+ .listJobRunsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .getJobRunSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
builder
.getConfigSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+ builder
+ .listLocationsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .getLocationSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .setIamPolicySettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .getIamPolicySettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .testIamPermissionsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
builder
.createDeliveryPipelineOperationSettings()
.setInitialCallSettings(
@@ -1362,6 +1657,12 @@ public UnaryCallSettings.Builder createReleaseS
return createReleaseOperationSettings;
}
+ /** Returns the builder for the settings used for calls to abandonRelease. */
+ public UnaryCallSettings.Builder
+ abandonReleaseSettings() {
+ return abandonReleaseSettings;
+ }
+
/** Returns the builder for the settings used for calls to approveRollout. */
public UnaryCallSettings.Builder
approveRolloutSettings() {
@@ -1393,11 +1694,56 @@ public UnaryCallSettings.Builder createRolloutS
return createRolloutOperationSettings;
}
+ /** Returns the builder for the settings used for calls to retryJob. */
+ public UnaryCallSettings.Builder retryJobSettings() {
+ return retryJobSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to listJobRuns. */
+ public PagedCallSettings.Builder<
+ ListJobRunsRequest, ListJobRunsResponse, ListJobRunsPagedResponse>
+ listJobRunsSettings() {
+ return listJobRunsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getJobRun. */
+ public UnaryCallSettings.Builder getJobRunSettings() {
+ return getJobRunSettings;
+ }
+
/** Returns the builder for the settings used for calls to getConfig. */
public UnaryCallSettings.Builder getConfigSettings() {
return getConfigSettings;
}
+ /** Returns the builder for the settings used for calls to listLocations. */
+ public PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings() {
+ return listLocationsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getLocation. */
+ public UnaryCallSettings.Builder getLocationSettings() {
+ return getLocationSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings.Builder setIamPolicySettings() {
+ return setIamPolicySettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings.Builder getIamPolicySettings() {
+ return getIamPolicySettings;
+ }
+
+ /** Returns the builder for the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings.Builder
+ testIamPermissionsSettings() {
+ return testIamPermissionsSettings;
+ }
+
@Override
public CloudDeployStubSettings build() throws IOException {
return new CloudDeployStubSettings(this);
diff --git a/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 95e702193f4f..422dd89d0578 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
@@ -17,6 +17,8 @@
package com.google.cloud.deploy.v1.stub;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse;
+import static com.google.cloud.deploy.v1.CloudDeployClient.ListJobRunsPagedResponse;
+import static com.google.cloud.deploy.v1.CloudDeployClient.ListLocationsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListReleasesPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListRolloutsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListTargetsPagedResponse;
@@ -28,6 +30,8 @@
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.deploy.v1.AbandonReleaseRequest;
+import com.google.cloud.deploy.v1.AbandonReleaseResponse;
import com.google.cloud.deploy.v1.ApproveRolloutRequest;
import com.google.cloud.deploy.v1.ApproveRolloutResponse;
import com.google.cloud.deploy.v1.Config;
@@ -40,11 +44,15 @@
import com.google.cloud.deploy.v1.DeliveryPipeline;
import com.google.cloud.deploy.v1.GetConfigRequest;
import com.google.cloud.deploy.v1.GetDeliveryPipelineRequest;
+import com.google.cloud.deploy.v1.GetJobRunRequest;
import com.google.cloud.deploy.v1.GetReleaseRequest;
import com.google.cloud.deploy.v1.GetRolloutRequest;
import com.google.cloud.deploy.v1.GetTargetRequest;
+import com.google.cloud.deploy.v1.JobRun;
import com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest;
import com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse;
+import com.google.cloud.deploy.v1.ListJobRunsRequest;
+import com.google.cloud.deploy.v1.ListJobRunsResponse;
import com.google.cloud.deploy.v1.ListReleasesRequest;
import com.google.cloud.deploy.v1.ListReleasesResponse;
import com.google.cloud.deploy.v1.ListRolloutsRequest;
@@ -53,11 +61,22 @@
import com.google.cloud.deploy.v1.ListTargetsResponse;
import com.google.cloud.deploy.v1.OperationMetadata;
import com.google.cloud.deploy.v1.Release;
+import com.google.cloud.deploy.v1.RetryJobRequest;
+import com.google.cloud.deploy.v1.RetryJobResponse;
import com.google.cloud.deploy.v1.Rollout;
import com.google.cloud.deploy.v1.Target;
import com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.UpdateTargetRequest;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
import com.google.common.collect.ImmutableMap;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.GrpcOperationsStub;
import com.google.protobuf.Empty;
@@ -199,6 +218,17 @@ public class GrpcCloudDeployStub extends CloudDeployStub {
.setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
.build();
+ private static final MethodDescriptor
+ abandonReleaseMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/AbandonRelease")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(AbandonReleaseRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(AbandonReleaseResponse.getDefaultInstance()))
+ .build();
+
private static final MethodDescriptor
approveRolloutMethodDescriptor =
MethodDescriptor.newBuilder()
@@ -238,6 +268,33 @@ public class GrpcCloudDeployStub extends CloudDeployStub {
.setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
.build();
+ private static final MethodDescriptor
+ retryJobMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/RetryJob")
+ .setRequestMarshaller(ProtoUtils.marshaller(RetryJobRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(RetryJobResponse.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ listJobRunsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/ListJobRuns")
+ .setRequestMarshaller(ProtoUtils.marshaller(ListJobRunsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListJobRunsResponse.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor getJobRunMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/GetJobRun")
+ .setRequestMarshaller(ProtoUtils.marshaller(GetJobRunRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(JobRun.getDefaultInstance()))
+ .build();
+
private static final MethodDescriptor getConfigMethodDescriptor =
MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
@@ -246,6 +303,52 @@ public class GrpcCloudDeployStub extends CloudDeployStub {
.setResponseMarshaller(ProtoUtils.marshaller(Config.getDefaultInstance()))
.build();
+ private static final MethodDescriptor
+ listLocationsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.location.Locations/ListLocations")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor getLocationMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.location.Locations/GetLocation")
+ .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor setIamPolicyMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy")
+ .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor getIamPolicyMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy")
+ .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ testIamPermissionsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance()))
+ .build();
+
private final UnaryCallable
listDeliveryPipelinesCallable;
private final UnaryCallable
@@ -286,6 +389,7 @@ public class GrpcCloudDeployStub extends CloudDeployStub {
private final UnaryCallable createReleaseCallable;
private final OperationCallable
createReleaseOperationCallable;
+ private final UnaryCallable abandonReleaseCallable;
private final UnaryCallable approveRolloutCallable;
private final UnaryCallable listRolloutsCallable;
private final UnaryCallable
@@ -294,7 +398,20 @@ public class GrpcCloudDeployStub extends CloudDeployStub {
private final UnaryCallable createRolloutCallable;
private final OperationCallable
createRolloutOperationCallable;
+ private final UnaryCallable retryJobCallable;
+ private final UnaryCallable listJobRunsCallable;
+ private final UnaryCallable
+ listJobRunsPagedCallable;
+ private final UnaryCallable getJobRunCallable;
private final UnaryCallable getConfigCallable;
+ private final UnaryCallable listLocationsCallable;
+ private final UnaryCallable
+ listLocationsPagedCallable;
+ private final UnaryCallable getLocationCallable;
+ private final UnaryCallable setIamPolicyCallable;
+ private final UnaryCallable getIamPolicyCallable;
+ private final UnaryCallable
+ testIamPermissionsCallable;
private final BackgroundResource backgroundResources;
private final GrpcOperationsStub operationsStub;
@@ -476,6 +593,17 @@ protected GrpcCloudDeployStub(
return params.build();
})
.build();
+ GrpcCallSettings
+ abandonReleaseTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(abandonReleaseMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
GrpcCallSettings
approveRolloutTransportSettings =
GrpcCallSettings.newBuilder()
@@ -517,6 +645,36 @@ protected GrpcCloudDeployStub(
return params.build();
})
.build();
+ GrpcCallSettings retryJobTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(retryJobMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("rollout", String.valueOf(request.getRollout()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings listJobRunsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(listJobRunsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings getJobRunTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getJobRunMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
GrpcCallSettings getConfigTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(getConfigMethodDescriptor)
@@ -527,6 +685,57 @@ protected GrpcCloudDeployStub(
return params.build();
})
.build();
+ GrpcCallSettings listLocationsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(listLocationsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings getLocationTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getLocationMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings setIamPolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(setIamPolicyMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("resource", String.valueOf(request.getResource()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings getIamPolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getIamPolicyMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("resource", String.valueOf(request.getResource()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings
+ testIamPermissionsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(testIamPermissionsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("resource", String.valueOf(request.getResource()));
+ return params.build();
+ })
+ .build();
this.listDeliveryPipelinesCallable =
callableFactory.createUnaryCallable(
@@ -630,6 +839,9 @@ protected GrpcCloudDeployStub(
settings.createReleaseOperationSettings(),
clientContext,
operationsStub);
+ this.abandonReleaseCallable =
+ callableFactory.createUnaryCallable(
+ abandonReleaseTransportSettings, settings.abandonReleaseSettings(), clientContext);
this.approveRolloutCallable =
callableFactory.createUnaryCallable(
approveRolloutTransportSettings, settings.approveRolloutSettings(), clientContext);
@@ -651,9 +863,41 @@ protected GrpcCloudDeployStub(
settings.createRolloutOperationSettings(),
clientContext,
operationsStub);
+ this.retryJobCallable =
+ callableFactory.createUnaryCallable(
+ retryJobTransportSettings, settings.retryJobSettings(), clientContext);
+ this.listJobRunsCallable =
+ callableFactory.createUnaryCallable(
+ listJobRunsTransportSettings, settings.listJobRunsSettings(), clientContext);
+ this.listJobRunsPagedCallable =
+ callableFactory.createPagedCallable(
+ listJobRunsTransportSettings, settings.listJobRunsSettings(), clientContext);
+ this.getJobRunCallable =
+ callableFactory.createUnaryCallable(
+ getJobRunTransportSettings, settings.getJobRunSettings(), clientContext);
this.getConfigCallable =
callableFactory.createUnaryCallable(
getConfigTransportSettings, settings.getConfigSettings(), clientContext);
+ this.listLocationsCallable =
+ callableFactory.createUnaryCallable(
+ listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);
+ this.listLocationsPagedCallable =
+ callableFactory.createPagedCallable(
+ listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);
+ this.getLocationCallable =
+ callableFactory.createUnaryCallable(
+ getLocationTransportSettings, settings.getLocationSettings(), clientContext);
+ this.setIamPolicyCallable =
+ callableFactory.createUnaryCallable(
+ setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext);
+ this.getIamPolicyCallable =
+ callableFactory.createUnaryCallable(
+ getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext);
+ this.testIamPermissionsCallable =
+ callableFactory.createUnaryCallable(
+ testIamPermissionsTransportSettings,
+ settings.testIamPermissionsSettings(),
+ clientContext);
this.backgroundResources =
new BackgroundResourceAggregation(clientContext.getBackgroundResources());
@@ -787,6 +1031,11 @@ public UnaryCallable createReleaseCallable() {
return createReleaseOperationCallable;
}
+ @Override
+ public UnaryCallable abandonReleaseCallable() {
+ return abandonReleaseCallable;
+ }
+
@Override
public UnaryCallable approveRolloutCallable() {
return approveRolloutCallable;
@@ -818,11 +1067,63 @@ public UnaryCallable createRolloutCallable() {
return createRolloutOperationCallable;
}
+ @Override
+ public UnaryCallable retryJobCallable() {
+ return retryJobCallable;
+ }
+
+ @Override
+ public UnaryCallable listJobRunsCallable() {
+ return listJobRunsCallable;
+ }
+
+ @Override
+ public UnaryCallable listJobRunsPagedCallable() {
+ return listJobRunsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable getJobRunCallable() {
+ return getJobRunCallable;
+ }
+
@Override
public UnaryCallable getConfigCallable() {
return getConfigCallable;
}
+ @Override
+ public UnaryCallable listLocationsCallable() {
+ return listLocationsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listLocationsPagedCallable() {
+ return listLocationsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable getLocationCallable() {
+ return getLocationCallable;
+ }
+
+ @Override
+ public UnaryCallable setIamPolicyCallable() {
+ return setIamPolicyCallable;
+ }
+
+ @Override
+ public UnaryCallable getIamPolicyCallable() {
+ return getIamPolicyCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ testIamPermissionsCallable() {
+ return testIamPermissionsCallable;
+ }
+
@Override
public final void close() {
try {
diff --git a/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 b3df0fbcf2c1..a223f016eca7 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
@@ -17,6 +17,8 @@
package com.google.cloud.deploy.v1.stub;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse;
+import static com.google.cloud.deploy.v1.CloudDeployClient.ListJobRunsPagedResponse;
+import static com.google.cloud.deploy.v1.CloudDeployClient.ListLocationsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListReleasesPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListRolloutsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListTargetsPagedResponse;
@@ -36,6 +38,8 @@
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.deploy.v1.AbandonReleaseRequest;
+import com.google.cloud.deploy.v1.AbandonReleaseResponse;
import com.google.cloud.deploy.v1.ApproveRolloutRequest;
import com.google.cloud.deploy.v1.ApproveRolloutResponse;
import com.google.cloud.deploy.v1.Config;
@@ -48,11 +52,15 @@
import com.google.cloud.deploy.v1.DeliveryPipeline;
import com.google.cloud.deploy.v1.GetConfigRequest;
import com.google.cloud.deploy.v1.GetDeliveryPipelineRequest;
+import com.google.cloud.deploy.v1.GetJobRunRequest;
import com.google.cloud.deploy.v1.GetReleaseRequest;
import com.google.cloud.deploy.v1.GetRolloutRequest;
import com.google.cloud.deploy.v1.GetTargetRequest;
+import com.google.cloud.deploy.v1.JobRun;
import com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest;
import com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse;
+import com.google.cloud.deploy.v1.ListJobRunsRequest;
+import com.google.cloud.deploy.v1.ListJobRunsResponse;
import com.google.cloud.deploy.v1.ListReleasesRequest;
import com.google.cloud.deploy.v1.ListReleasesResponse;
import com.google.cloud.deploy.v1.ListRolloutsRequest;
@@ -61,10 +69,21 @@
import com.google.cloud.deploy.v1.ListTargetsResponse;
import com.google.cloud.deploy.v1.OperationMetadata;
import com.google.cloud.deploy.v1.Release;
+import com.google.cloud.deploy.v1.RetryJobRequest;
+import com.google.cloud.deploy.v1.RetryJobResponse;
import com.google.cloud.deploy.v1.Rollout;
import com.google.cloud.deploy.v1.Target;
import com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.UpdateTargetRequest;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import com.google.protobuf.TypeRegistry;
@@ -614,6 +633,42 @@ public class HttpJsonCloudDeployStub extends CloudDeployStub {
HttpJsonOperationSnapshot.create(response))
.build();
+ private static final ApiMethodDescriptor
+ abandonReleaseMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/AbandonRelease")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}:abandon",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer