getConfigCallable() {
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists information about the supported locations for this service.
+ * Creates a new Automation in a given project and location.
*
* Sample code:
*
@@ -4114,29 +4251,36 @@ public final UnaryCallable getConfigCallable() {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * for (Location element : cloudDeployClient.listLocations(request).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * DeliveryPipelineName parent =
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
+ * Automation automation = Automation.newBuilder().build();
+ * String automationId = "automationId64173202";
+ * Automation response =
+ * cloudDeployClient.createAutomationAsync(parent, automation, automationId).get();
* }
* }
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param parent Required. The parent collection in which the `Automation` should be created.
+ * Format should be
+ * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+ * @param automation Required. The `Automation` to create.
+ * @param automationId Required. ID of the `Automation`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
- return listLocationsPagedCallable().call(request);
+ public final OperationFuture createAutomationAsync(
+ DeliveryPipelineName parent, Automation automation, String automationId) {
+ CreateAutomationRequest request =
+ CreateAutomationRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setAutomation(automation)
+ .setAutomationId(automationId)
+ .build();
+ return createAutomationAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists information about the supported locations for this service.
+ * Creates a new Automation in a given project and location.
*
* Sample code:
*
@@ -4147,30 +4291,36 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * ApiFuture future =
- * cloudDeployClient.listLocationsPagedCallable().futureCall(request);
- * // Do something.
- * for (Location element : future.get().iterateAll()) {
- * // doThingsWith(element);
- * }
+ * String parent =
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
+ * Automation automation = Automation.newBuilder().build();
+ * String automationId = "automationId64173202";
+ * Automation response =
+ * cloudDeployClient.createAutomationAsync(parent, automation, automationId).get();
* }
* }
+ *
+ * @param parent Required. The parent collection in which the `Automation` should be created.
+ * Format should be
+ * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+ * @param automation Required. The `Automation` to create.
+ * @param automationId Required. ID of the `Automation`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable
- listLocationsPagedCallable() {
- return stub.listLocationsPagedCallable();
+ public final OperationFuture createAutomationAsync(
+ String parent, Automation automation, String automationId) {
+ CreateAutomationRequest request =
+ CreateAutomationRequest.newBuilder()
+ .setParent(parent)
+ .setAutomation(automation)
+ .setAutomationId(automationId)
+ .build();
+ return createAutomationAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists information about the supported locations for this service.
+ * Creates a new Automation in a given project and location.
*
* Sample code:
*
@@ -4181,35 +4331,31 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
+ * CreateAutomationRequest request =
+ * CreateAutomationRequest.newBuilder()
+ * .setParent(
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+ * .toString())
+ * .setAutomationId("automationId64173202")
+ * .setAutomation(Automation.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setValidateOnly(true)
* .build();
- * while (true) {
- * ListLocationsResponse response = cloudDeployClient.listLocationsCallable().call(request);
- * for (Location element : response.getLocationsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
+ * Automation response = cloudDeployClient.createAutomationAsync(request).get();
* }
* }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable listLocationsCallable() {
- return stub.listLocationsCallable();
+ public final OperationFuture createAutomationAsync(
+ CreateAutomationRequest request) {
+ return createAutomationOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Gets information about a location.
+ * Creates a new Automation in a given project and location.
*
* Sample code:
*
@@ -4220,21 +4366,31 @@ public final UnaryCallable listLoca
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
- * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
- * Location response = cloudDeployClient.getLocation(request);
+ * CreateAutomationRequest request =
+ * CreateAutomationRequest.newBuilder()
+ * .setParent(
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+ * .toString())
+ * .setAutomationId("automationId64173202")
+ * .setAutomation(Automation.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setValidateOnly(true)
+ * .build();
+ * OperationFuture future =
+ * cloudDeployClient.createAutomationOperationCallable().futureCall(request);
+ * // Do something.
+ * Automation response = future.get();
* }
* }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Location getLocation(GetLocationRequest request) {
- return getLocationCallable().call(request);
+ public final OperationCallable
+ createAutomationOperationCallable() {
+ return stub.createAutomationOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Gets information about a location.
+ * Creates a new Automation in a given project and location.
*
* Sample code:
*
@@ -4245,22 +4401,30 @@ public final Location getLocation(GetLocationRequest request) {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
- * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
- * ApiFuture future = cloudDeployClient.getLocationCallable().futureCall(request);
+ * CreateAutomationRequest request =
+ * CreateAutomationRequest.newBuilder()
+ * .setParent(
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+ * .toString())
+ * .setAutomationId("automationId64173202")
+ * .setAutomation(Automation.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture future =
+ * cloudDeployClient.createAutomationCallable().futureCall(request);
* // Do something.
- * Location response = future.get();
+ * Operation response = future.get();
* }
* }
*/
- public final UnaryCallable getLocationCallable() {
- return stub.getLocationCallable();
+ public final UnaryCallable createAutomationCallable() {
+ return stub.createAutomationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Sets the access control policy on the specified resource. Replacesany existing policy.
- *
- * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ * Updates the parameters of a single Automation resource.
*
*
Sample code:
*
@@ -4271,30 +4435,32 @@ public final UnaryCallable getLocationCallable() {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
- * SetIamPolicyRequest request =
- * SetIamPolicyRequest.newBuilder()
- * .setResource(
- * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
- * .toString())
- * .setPolicy(Policy.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * Policy response = cloudDeployClient.setIamPolicy(request);
+ * Automation automation = Automation.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Automation response = cloudDeployClient.updateAutomationAsync(automation, updateMask).get();
* }
* }
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param automation Required. The `Automation` to update.
+ * @param updateMask Required. Field mask is used to specify the fields to be overwritten in the
+ * `Automation` resource by the update. The fields specified in the update_mask are relative
+ * to the resource, not the full request. A field will be overwritten if it is in the mask. If
+ * the user does not provide a mask then all fields will be overwritten.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final Policy setIamPolicy(SetIamPolicyRequest request) {
- return setIamPolicyCallable().call(request);
+ public final OperationFuture updateAutomationAsync(
+ Automation automation, FieldMask updateMask) {
+ UpdateAutomationRequest request =
+ UpdateAutomationRequest.newBuilder()
+ .setAutomation(automation)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateAutomationAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Sets the access control policy on the specified resource. Replacesany existing policy.
- *
- * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ * Updates the parameters of a single Automation resource.
*
*
Sample code:
*
@@ -4305,28 +4471,29 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
- * SetIamPolicyRequest request =
- * SetIamPolicyRequest.newBuilder()
- * .setResource(
- * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
- * .toString())
- * .setPolicy(Policy.newBuilder().build())
+ * UpdateAutomationRequest request =
+ * UpdateAutomationRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
+ * .setAutomation(Automation.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setAllowMissing(true)
+ * .setValidateOnly(true)
* .build();
- * ApiFuture future = cloudDeployClient.setIamPolicyCallable().futureCall(request);
- * // Do something.
- * Policy response = future.get();
+ * Automation response = cloudDeployClient.updateAutomationAsync(request).get();
* }
* }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable setIamPolicyCallable() {
- return stub.setIamPolicyCallable();
+ public final OperationFuture updateAutomationAsync(
+ UpdateAutomationRequest request) {
+ return updateAutomationOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Gets the access control policy for a resource. Returns an empty policyif the resource exists
- * and does not have a policy set.
+ * Updates the parameters of a single Automation resource.
*
* Sample code:
*
@@ -4337,15 +4504,1204 @@ public final UnaryCallable setIamPolicyCallable() {
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
- * GetIamPolicyRequest request =
- * GetIamPolicyRequest.newBuilder()
- * .setResource(
- * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
- * .toString())
- * .setOptions(GetPolicyOptions.newBuilder().build())
- * .build();
- * Policy response = cloudDeployClient.getIamPolicy(request);
- * }
+ * UpdateAutomationRequest request =
+ * UpdateAutomationRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setAutomation(Automation.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setAllowMissing(true)
+ * .setValidateOnly(true)
+ * .build();
+ * OperationFuture future =
+ * cloudDeployClient.updateAutomationOperationCallable().futureCall(request);
+ * // Do something.
+ * Automation response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ updateAutomationOperationCallable() {
+ return stub.updateAutomationOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates the parameters of a single Automation resource.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * UpdateAutomationRequest request =
+ * UpdateAutomationRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setAutomation(Automation.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setAllowMissing(true)
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture future =
+ * cloudDeployClient.updateAutomationCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable updateAutomationCallable() {
+ return stub.updateAutomationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a single Automation resource.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * AutomationName name =
+ * AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]");
+ * cloudDeployClient.deleteAutomationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the `Automation` to delete. Format should be
+ * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteAutomationAsync(
+ AutomationName name) {
+ DeleteAutomationRequest request =
+ DeleteAutomationRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return deleteAutomationAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a single Automation resource.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * String name =
+ * AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
+ * .toString();
+ * cloudDeployClient.deleteAutomationAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the `Automation` to delete. Format should be
+ * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteAutomationAsync(String name) {
+ DeleteAutomationRequest request = DeleteAutomationRequest.newBuilder().setName(name).build();
+ return deleteAutomationAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a single Automation resource.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * DeleteAutomationRequest request =
+ * DeleteAutomationRequest.newBuilder()
+ * .setName(
+ * AutomationName.of(
+ * "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
+ * .toString())
+ * .setRequestId("requestId693933066")
+ * .setAllowMissing(true)
+ * .setValidateOnly(true)
+ * .setEtag("etag3123477")
+ * .build();
+ * cloudDeployClient.deleteAutomationAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture deleteAutomationAsync(
+ DeleteAutomationRequest request) {
+ return deleteAutomationOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a single Automation resource.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * DeleteAutomationRequest request =
+ * DeleteAutomationRequest.newBuilder()
+ * .setName(
+ * AutomationName.of(
+ * "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
+ * .toString())
+ * .setRequestId("requestId693933066")
+ * .setAllowMissing(true)
+ * .setValidateOnly(true)
+ * .setEtag("etag3123477")
+ * .build();
+ * OperationFuture future =
+ * cloudDeployClient.deleteAutomationOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ deleteAutomationOperationCallable() {
+ return stub.deleteAutomationOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a single Automation resource.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * DeleteAutomationRequest request =
+ * DeleteAutomationRequest.newBuilder()
+ * .setName(
+ * AutomationName.of(
+ * "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
+ * .toString())
+ * .setRequestId("requestId693933066")
+ * .setAllowMissing(true)
+ * .setValidateOnly(true)
+ * .setEtag("etag3123477")
+ * .build();
+ * ApiFuture future =
+ * cloudDeployClient.deleteAutomationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable deleteAutomationCallable() {
+ return stub.deleteAutomationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Automation.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * AutomationName name =
+ * AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]");
+ * Automation response = cloudDeployClient.getAutomation(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the `Automation`. Format must be
+ * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Automation getAutomation(AutomationName name) {
+ GetAutomationRequest request =
+ GetAutomationRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getAutomation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Automation.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * String name =
+ * AutomationName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
+ * .toString();
+ * Automation response = cloudDeployClient.getAutomation(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the `Automation`. Format must be
+ * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/automations/{automation_name}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Automation getAutomation(String name) {
+ GetAutomationRequest request = GetAutomationRequest.newBuilder().setName(name).build();
+ return getAutomation(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Automation.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * GetAutomationRequest request =
+ * GetAutomationRequest.newBuilder()
+ * .setName(
+ * AutomationName.of(
+ * "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
+ * .toString())
+ * .build();
+ * Automation response = cloudDeployClient.getAutomation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Automation getAutomation(GetAutomationRequest request) {
+ return getAutomationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single Automation.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * GetAutomationRequest request =
+ * GetAutomationRequest.newBuilder()
+ * .setName(
+ * AutomationName.of(
+ * "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION]")
+ * .toString())
+ * .build();
+ * ApiFuture future = cloudDeployClient.getAutomationCallable().futureCall(request);
+ * // Do something.
+ * Automation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getAutomationCallable() {
+ return stub.getAutomationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Automations in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * DeliveryPipelineName parent =
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
+ * for (Automation element : cloudDeployClient.listAutomations(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, which owns this collection of automations. Format must be
+ * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAutomationsPagedResponse listAutomations(DeliveryPipelineName parent) {
+ ListAutomationsRequest request =
+ ListAutomationsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listAutomations(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Automations in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * String parent =
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
+ * for (Automation element : cloudDeployClient.listAutomations(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, which owns this collection of automations. Format must be
+ * `projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAutomationsPagedResponse listAutomations(String parent) {
+ ListAutomationsRequest request = ListAutomationsRequest.newBuilder().setParent(parent).build();
+ return listAutomations(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Automations in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * ListAutomationsRequest request =
+ * ListAutomationsRequest.newBuilder()
+ * .setParent(
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Automation element : cloudDeployClient.listAutomations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAutomationsPagedResponse listAutomations(ListAutomationsRequest request) {
+ return listAutomationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Automations in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * ListAutomationsRequest request =
+ * ListAutomationsRequest.newBuilder()
+ * .setParent(
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * cloudDeployClient.listAutomationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Automation element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listAutomationsPagedCallable() {
+ return stub.listAutomationsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Automations in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * ListAutomationsRequest request =
+ * ListAutomationsRequest.newBuilder()
+ * .setParent(
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListAutomationsResponse response =
+ * cloudDeployClient.listAutomationsCallable().call(request);
+ * for (Automation element : response.getAutomationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listAutomationsCallable() {
+ return stub.listAutomationsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single AutomationRun.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * AutomationRunName name =
+ * AutomationRunName.of(
+ * "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]");
+ * AutomationRun response = cloudDeployClient.getAutomationRun(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the `AutomationRun`. Format must be
+ * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AutomationRun getAutomationRun(AutomationRunName name) {
+ GetAutomationRunRequest request =
+ GetAutomationRunRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getAutomationRun(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single AutomationRun.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * String name =
+ * AutomationRunName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]")
+ * .toString();
+ * AutomationRun response = cloudDeployClient.getAutomationRun(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the `AutomationRun`. Format must be
+ * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AutomationRun getAutomationRun(String name) {
+ GetAutomationRunRequest request = GetAutomationRunRequest.newBuilder().setName(name).build();
+ return getAutomationRun(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single AutomationRun.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * GetAutomationRunRequest request =
+ * GetAutomationRunRequest.newBuilder()
+ * .setName(
+ * AutomationRunName.of(
+ * "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]")
+ * .toString())
+ * .build();
+ * AutomationRun response = cloudDeployClient.getAutomationRun(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AutomationRun getAutomationRun(GetAutomationRunRequest request) {
+ return getAutomationRunCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets details of a single AutomationRun.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * GetAutomationRunRequest request =
+ * GetAutomationRunRequest.newBuilder()
+ * .setName(
+ * AutomationRunName.of(
+ * "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * cloudDeployClient.getAutomationRunCallable().futureCall(request);
+ * // Do something.
+ * AutomationRun response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getAutomationRunCallable() {
+ return stub.getAutomationRunCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists AutomationRuns in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * DeliveryPipelineName parent =
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
+ * for (AutomationRun element : cloudDeployClient.listAutomationRuns(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, which owns this collection of automationRuns. Format must
+ * be `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAutomationRunsPagedResponse listAutomationRuns(DeliveryPipelineName parent) {
+ ListAutomationRunsRequest request =
+ ListAutomationRunsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listAutomationRuns(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists AutomationRuns in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * String parent =
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
+ * for (AutomationRun element : cloudDeployClient.listAutomationRuns(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, which owns this collection of automationRuns. Format must
+ * be `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAutomationRunsPagedResponse listAutomationRuns(String parent) {
+ ListAutomationRunsRequest request =
+ ListAutomationRunsRequest.newBuilder().setParent(parent).build();
+ return listAutomationRuns(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists AutomationRuns in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * ListAutomationRunsRequest request =
+ * ListAutomationRunsRequest.newBuilder()
+ * .setParent(
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (AutomationRun element : cloudDeployClient.listAutomationRuns(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAutomationRunsPagedResponse listAutomationRuns(
+ ListAutomationRunsRequest request) {
+ return listAutomationRunsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists AutomationRuns in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * ListAutomationRunsRequest request =
+ * ListAutomationRunsRequest.newBuilder()
+ * .setParent(
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * cloudDeployClient.listAutomationRunsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (AutomationRun element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listAutomationRunsPagedCallable() {
+ return stub.listAutomationRunsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists AutomationRuns in a given project and location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * ListAutomationRunsRequest request =
+ * ListAutomationRunsRequest.newBuilder()
+ * .setParent(
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListAutomationRunsResponse response =
+ * cloudDeployClient.listAutomationRunsCallable().call(request);
+ * for (AutomationRun element : response.getAutomationRunsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listAutomationRunsCallable() {
+ return stub.listAutomationRunsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Cancels an AutomationRun. The `state` of the `AutomationRun` after cancelling is `CANCELLED`.
+ * `CancelAutomationRun` can be called on AutomationRun in the state `IN_PROGRESS` and `PENDING`;
+ * AutomationRun in a different state returns an `FAILED_PRECONDITION` error.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * AutomationRunName name =
+ * AutomationRunName.of(
+ * "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]");
+ * CancelAutomationRunResponse response = cloudDeployClient.cancelAutomationRun(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the `AutomationRun`. Format is
+ * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final CancelAutomationRunResponse cancelAutomationRun(AutomationRunName name) {
+ CancelAutomationRunRequest request =
+ CancelAutomationRunRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return cancelAutomationRun(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Cancels an AutomationRun. The `state` of the `AutomationRun` after cancelling is `CANCELLED`.
+ * `CancelAutomationRun` can be called on AutomationRun in the state `IN_PROGRESS` and `PENDING`;
+ * AutomationRun in a different state returns an `FAILED_PRECONDITION` error.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * String name =
+ * AutomationRunName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]")
+ * .toString();
+ * CancelAutomationRunResponse response = cloudDeployClient.cancelAutomationRun(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the `AutomationRun`. Format is
+ * `projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final CancelAutomationRunResponse cancelAutomationRun(String name) {
+ CancelAutomationRunRequest request =
+ CancelAutomationRunRequest.newBuilder().setName(name).build();
+ return cancelAutomationRun(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Cancels an AutomationRun. The `state` of the `AutomationRun` after cancelling is `CANCELLED`.
+ * `CancelAutomationRun` can be called on AutomationRun in the state `IN_PROGRESS` and `PENDING`;
+ * AutomationRun in a different state returns an `FAILED_PRECONDITION` error.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * CancelAutomationRunRequest request =
+ * CancelAutomationRunRequest.newBuilder()
+ * .setName(
+ * AutomationRunName.of(
+ * "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]")
+ * .toString())
+ * .build();
+ * CancelAutomationRunResponse response = cloudDeployClient.cancelAutomationRun(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final CancelAutomationRunResponse cancelAutomationRun(CancelAutomationRunRequest request) {
+ return cancelAutomationRunCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Cancels an AutomationRun. The `state` of the `AutomationRun` after cancelling is `CANCELLED`.
+ * `CancelAutomationRun` can be called on AutomationRun in the state `IN_PROGRESS` and `PENDING`;
+ * AutomationRun in a different state returns an `FAILED_PRECONDITION` error.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * CancelAutomationRunRequest request =
+ * CancelAutomationRunRequest.newBuilder()
+ * .setName(
+ * AutomationRunName.of(
+ * "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[AUTOMATION_RUN]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * cloudDeployClient.cancelAutomationRunCallable().futureCall(request);
+ * // Do something.
+ * CancelAutomationRunResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ cancelAutomationRunCallable() {
+ return stub.cancelAutomationRunCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : cloudDeployClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * cloudDeployClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listLocationsPagedCallable() {
+ return stub.listLocationsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response = cloudDeployClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable listLocationsCallable() {
+ return stub.listLocationsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = cloudDeployClient.getLocation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future = cloudDeployClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getLocationCallable() {
+ return stub.getLocationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replacesany existing policy.
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Policy response = cloudDeployClient.setIamPolicy(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy setIamPolicy(SetIamPolicyRequest request) {
+ return setIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replacesany existing policy.
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+ * .toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = cloudDeployClient.setIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable setIamPolicyCallable() {
+ return stub.setIamPolicyCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. Returns an empty policyif the resource exists
+ * and does not have a policy set.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
+ * .toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = cloudDeployClient.getIamPolicy(request);
+ * }
* }
*
* @param request The request object containing all of the parameters for the API call.
@@ -4869,6 +6225,163 @@ protected ListJobRunsFixedSizeCollection createCollection(
}
}
+ public static class ListAutomationsPagedResponse
+ extends AbstractPagedListResponse<
+ ListAutomationsRequest,
+ ListAutomationsResponse,
+ Automation,
+ ListAutomationsPage,
+ ListAutomationsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListAutomationsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListAutomationsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListAutomationsPagedResponse(ListAutomationsPage page) {
+ super(page, ListAutomationsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListAutomationsPage
+ extends AbstractPage<
+ ListAutomationsRequest, ListAutomationsResponse, Automation, ListAutomationsPage> {
+
+ private ListAutomationsPage(
+ PageContext context,
+ ListAutomationsResponse response) {
+ super(context, response);
+ }
+
+ private static ListAutomationsPage createEmptyPage() {
+ return new ListAutomationsPage(null, null);
+ }
+
+ @Override
+ protected ListAutomationsPage createPage(
+ PageContext context,
+ ListAutomationsResponse response) {
+ return new ListAutomationsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListAutomationsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListAutomationsRequest,
+ ListAutomationsResponse,
+ Automation,
+ ListAutomationsPage,
+ ListAutomationsFixedSizeCollection> {
+
+ private ListAutomationsFixedSizeCollection(
+ List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListAutomationsFixedSizeCollection createEmptyCollection() {
+ return new ListAutomationsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListAutomationsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListAutomationsFixedSizeCollection(pages, collectionSize);
+ }
+ }
+
+ public static class ListAutomationRunsPagedResponse
+ extends AbstractPagedListResponse<
+ ListAutomationRunsRequest,
+ ListAutomationRunsResponse,
+ AutomationRun,
+ ListAutomationRunsPage,
+ ListAutomationRunsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListAutomationRunsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListAutomationRunsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListAutomationRunsPagedResponse(ListAutomationRunsPage page) {
+ super(page, ListAutomationRunsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListAutomationRunsPage
+ extends AbstractPage<
+ ListAutomationRunsRequest,
+ ListAutomationRunsResponse,
+ AutomationRun,
+ ListAutomationRunsPage> {
+
+ private ListAutomationRunsPage(
+ PageContext context,
+ ListAutomationRunsResponse response) {
+ super(context, response);
+ }
+
+ private static ListAutomationRunsPage createEmptyPage() {
+ return new ListAutomationRunsPage(null, null);
+ }
+
+ @Override
+ protected ListAutomationRunsPage createPage(
+ PageContext context,
+ ListAutomationRunsResponse response) {
+ return new ListAutomationRunsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListAutomationRunsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListAutomationRunsRequest,
+ ListAutomationRunsResponse,
+ AutomationRun,
+ ListAutomationRunsPage,
+ ListAutomationRunsFixedSizeCollection> {
+
+ private ListAutomationRunsFixedSizeCollection(
+ List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListAutomationRunsFixedSizeCollection createEmptyCollection() {
+ return new ListAutomationRunsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListAutomationRunsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListAutomationRunsFixedSizeCollection(pages, collectionSize);
+ }
+ }
+
public static class ListLocationsPagedResponse
extends AbstractPagedListResponse<
ListLocationsRequest,
diff --git a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeploySettings.java b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeploySettings.java
index b6f07bf68336..5d7cd4158900 100644
--- a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeploySettings.java
+++ b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/CloudDeploySettings.java
@@ -16,6 +16,8 @@
package com.google.cloud.deploy.v1;
+import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationRunsPagedResponse;
+import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListJobRunsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListLocationsPagedResponse;
@@ -148,6 +150,11 @@ public class CloudDeploySettings extends ClientSettings {
return ((CloudDeployStubSettings) getStubSettings()).listTargetsSettings();
}
+ /** Returns the object with the settings used for calls to rollbackTarget. */
+ public UnaryCallSettings rollbackTargetSettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).rollbackTargetSettings();
+ }
+
/** Returns the object with the settings used for calls to getTarget. */
public UnaryCallSettings getTargetSettings() {
return ((CloudDeployStubSettings) getStubSettings()).getTargetSettings();
@@ -282,6 +289,69 @@ public UnaryCallSettings getConfigSettings() {
return ((CloudDeployStubSettings) getStubSettings()).getConfigSettings();
}
+ /** Returns the object with the settings used for calls to createAutomation. */
+ public UnaryCallSettings createAutomationSettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).createAutomationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to createAutomation. */
+ public OperationCallSettings
+ createAutomationOperationSettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).createAutomationOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to updateAutomation. */
+ public UnaryCallSettings updateAutomationSettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).updateAutomationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to updateAutomation. */
+ public OperationCallSettings
+ updateAutomationOperationSettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).updateAutomationOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteAutomation. */
+ public UnaryCallSettings deleteAutomationSettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).deleteAutomationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteAutomation. */
+ public OperationCallSettings
+ deleteAutomationOperationSettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).deleteAutomationOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getAutomation. */
+ public UnaryCallSettings getAutomationSettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).getAutomationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to listAutomations. */
+ public PagedCallSettings<
+ ListAutomationsRequest, ListAutomationsResponse, ListAutomationsPagedResponse>
+ listAutomationsSettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).listAutomationsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getAutomationRun. */
+ public UnaryCallSettings getAutomationRunSettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).getAutomationRunSettings();
+ }
+
+ /** Returns the object with the settings used for calls to listAutomationRuns. */
+ public PagedCallSettings<
+ ListAutomationRunsRequest, ListAutomationRunsResponse, ListAutomationRunsPagedResponse>
+ listAutomationRunsSettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).listAutomationRunsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to cancelAutomationRun. */
+ public UnaryCallSettings
+ cancelAutomationRunSettings() {
+ return ((CloudDeployStubSettings) getStubSettings()).cancelAutomationRunSettings();
+ }
+
/** Returns the object with the settings used for calls to listLocations. */
public PagedCallSettings
listLocationsSettings() {
@@ -483,6 +553,12 @@ public Builder applyToAllUnaryMethods(
return getStubSettingsBuilder().listTargetsSettings();
}
+ /** Returns the builder for the settings used for calls to rollbackTarget. */
+ public UnaryCallSettings.Builder
+ rollbackTargetSettings() {
+ return getStubSettingsBuilder().rollbackTargetSettings();
+ }
+
/** Returns the builder for the settings used for calls to getTarget. */
public UnaryCallSettings.Builder getTargetSettings() {
return getStubSettingsBuilder().getTargetSettings();
@@ -624,6 +700,73 @@ public UnaryCallSettings.Builder getConfigSettings() {
return getStubSettingsBuilder().getConfigSettings();
}
+ /** Returns the builder for the settings used for calls to createAutomation. */
+ public UnaryCallSettings.Builder
+ createAutomationSettings() {
+ return getStubSettingsBuilder().createAutomationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to createAutomation. */
+ public OperationCallSettings.Builder
+ createAutomationOperationSettings() {
+ return getStubSettingsBuilder().createAutomationOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to updateAutomation. */
+ public UnaryCallSettings.Builder
+ updateAutomationSettings() {
+ return getStubSettingsBuilder().updateAutomationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to updateAutomation. */
+ public OperationCallSettings.Builder
+ updateAutomationOperationSettings() {
+ return getStubSettingsBuilder().updateAutomationOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteAutomation. */
+ public UnaryCallSettings.Builder
+ deleteAutomationSettings() {
+ return getStubSettingsBuilder().deleteAutomationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteAutomation. */
+ public OperationCallSettings.Builder
+ deleteAutomationOperationSettings() {
+ return getStubSettingsBuilder().deleteAutomationOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getAutomation. */
+ public UnaryCallSettings.Builder getAutomationSettings() {
+ return getStubSettingsBuilder().getAutomationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listAutomations. */
+ public PagedCallSettings.Builder<
+ ListAutomationsRequest, ListAutomationsResponse, ListAutomationsPagedResponse>
+ listAutomationsSettings() {
+ return getStubSettingsBuilder().listAutomationsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getAutomationRun. */
+ public UnaryCallSettings.Builder
+ getAutomationRunSettings() {
+ return getStubSettingsBuilder().getAutomationRunSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listAutomationRuns. */
+ public PagedCallSettings.Builder<
+ ListAutomationRunsRequest, ListAutomationRunsResponse, ListAutomationRunsPagedResponse>
+ listAutomationRunsSettings() {
+ return getStubSettingsBuilder().listAutomationRunsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to cancelAutomationRun. */
+ public UnaryCallSettings.Builder
+ cancelAutomationRunSettings() {
+ return getStubSettingsBuilder().cancelAutomationRunSettings();
+ }
+
/** Returns the builder for the settings used for calls to listLocations. */
public PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
diff --git a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/gapic_metadata.json b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/gapic_metadata.json
index 8dfd98802ec6..b5120d3225d5 100644
--- a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/gapic_metadata.json
+++ b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/gapic_metadata.json
@@ -19,9 +19,15 @@
"ApproveRollout": {
"methods": ["approveRollout", "approveRollout", "approveRollout", "approveRolloutCallable"]
},
+ "CancelAutomationRun": {
+ "methods": ["cancelAutomationRun", "cancelAutomationRun", "cancelAutomationRun", "cancelAutomationRunCallable"]
+ },
"CancelRollout": {
"methods": ["cancelRollout", "cancelRollout", "cancelRollout", "cancelRolloutCallable"]
},
+ "CreateAutomation": {
+ "methods": ["createAutomationAsync", "createAutomationAsync", "createAutomationAsync", "createAutomationOperationCallable", "createAutomationCallable"]
+ },
"CreateDeliveryPipeline": {
"methods": ["createDeliveryPipelineAsync", "createDeliveryPipelineAsync", "createDeliveryPipelineAsync", "createDeliveryPipelineOperationCallable", "createDeliveryPipelineCallable"]
},
@@ -34,12 +40,21 @@
"CreateTarget": {
"methods": ["createTargetAsync", "createTargetAsync", "createTargetAsync", "createTargetOperationCallable", "createTargetCallable"]
},
+ "DeleteAutomation": {
+ "methods": ["deleteAutomationAsync", "deleteAutomationAsync", "deleteAutomationAsync", "deleteAutomationOperationCallable", "deleteAutomationCallable"]
+ },
"DeleteDeliveryPipeline": {
"methods": ["deleteDeliveryPipelineAsync", "deleteDeliveryPipelineAsync", "deleteDeliveryPipelineAsync", "deleteDeliveryPipelineOperationCallable", "deleteDeliveryPipelineCallable"]
},
"DeleteTarget": {
"methods": ["deleteTargetAsync", "deleteTargetAsync", "deleteTargetAsync", "deleteTargetOperationCallable", "deleteTargetCallable"]
},
+ "GetAutomation": {
+ "methods": ["getAutomation", "getAutomation", "getAutomation", "getAutomationCallable"]
+ },
+ "GetAutomationRun": {
+ "methods": ["getAutomationRun", "getAutomationRun", "getAutomationRun", "getAutomationRunCallable"]
+ },
"GetConfig": {
"methods": ["getConfig", "getConfig", "getConfig", "getConfigCallable"]
},
@@ -67,6 +82,12 @@
"IgnoreJob": {
"methods": ["ignoreJob", "ignoreJob", "ignoreJob", "ignoreJobCallable"]
},
+ "ListAutomationRuns": {
+ "methods": ["listAutomationRuns", "listAutomationRuns", "listAutomationRuns", "listAutomationRunsPagedCallable", "listAutomationRunsCallable"]
+ },
+ "ListAutomations": {
+ "methods": ["listAutomations", "listAutomations", "listAutomations", "listAutomationsPagedCallable", "listAutomationsCallable"]
+ },
"ListDeliveryPipelines": {
"methods": ["listDeliveryPipelines", "listDeliveryPipelines", "listDeliveryPipelines", "listDeliveryPipelinesPagedCallable", "listDeliveryPipelinesCallable"]
},
@@ -88,6 +109,9 @@
"RetryJob": {
"methods": ["retryJob", "retryJob", "retryJob", "retryJobCallable"]
},
+ "RollbackTarget": {
+ "methods": ["rollbackTarget", "rollbackTarget", "rollbackTarget", "rollbackTargetCallable"]
+ },
"SetIamPolicy": {
"methods": ["setIamPolicy", "setIamPolicyCallable"]
},
@@ -97,6 +121,9 @@
"TestIamPermissions": {
"methods": ["testIamPermissions", "testIamPermissionsCallable"]
},
+ "UpdateAutomation": {
+ "methods": ["updateAutomationAsync", "updateAutomationAsync", "updateAutomationOperationCallable", "updateAutomationCallable"]
+ },
"UpdateDeliveryPipeline": {
"methods": ["updateDeliveryPipelineAsync", "updateDeliveryPipelineAsync", "updateDeliveryPipelineOperationCallable", "updateDeliveryPipelineCallable"]
},
diff --git a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStub.java b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStub.java
index d172b9b3da90..0b0ed2819963 100644
--- a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStub.java
+++ b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStub.java
@@ -16,6 +16,8 @@
package com.google.cloud.deploy.v1.stub;
+import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationRunsPagedResponse;
+import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListJobRunsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListLocationsPagedResponse;
@@ -32,16 +34,24 @@
import com.google.cloud.deploy.v1.AdvanceRolloutResponse;
import com.google.cloud.deploy.v1.ApproveRolloutRequest;
import com.google.cloud.deploy.v1.ApproveRolloutResponse;
+import com.google.cloud.deploy.v1.Automation;
+import com.google.cloud.deploy.v1.AutomationRun;
+import com.google.cloud.deploy.v1.CancelAutomationRunRequest;
+import com.google.cloud.deploy.v1.CancelAutomationRunResponse;
import com.google.cloud.deploy.v1.CancelRolloutRequest;
import com.google.cloud.deploy.v1.CancelRolloutResponse;
import com.google.cloud.deploy.v1.Config;
+import com.google.cloud.deploy.v1.CreateAutomationRequest;
import com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.CreateReleaseRequest;
import com.google.cloud.deploy.v1.CreateRolloutRequest;
import com.google.cloud.deploy.v1.CreateTargetRequest;
+import com.google.cloud.deploy.v1.DeleteAutomationRequest;
import com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.DeleteTargetRequest;
import com.google.cloud.deploy.v1.DeliveryPipeline;
+import com.google.cloud.deploy.v1.GetAutomationRequest;
+import com.google.cloud.deploy.v1.GetAutomationRunRequest;
import com.google.cloud.deploy.v1.GetConfigRequest;
import com.google.cloud.deploy.v1.GetDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.GetJobRunRequest;
@@ -51,6 +61,10 @@
import com.google.cloud.deploy.v1.IgnoreJobRequest;
import com.google.cloud.deploy.v1.IgnoreJobResponse;
import com.google.cloud.deploy.v1.JobRun;
+import com.google.cloud.deploy.v1.ListAutomationRunsRequest;
+import com.google.cloud.deploy.v1.ListAutomationRunsResponse;
+import com.google.cloud.deploy.v1.ListAutomationsRequest;
+import com.google.cloud.deploy.v1.ListAutomationsResponse;
import com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest;
import com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse;
import com.google.cloud.deploy.v1.ListJobRunsRequest;
@@ -65,10 +79,13 @@
import com.google.cloud.deploy.v1.Release;
import com.google.cloud.deploy.v1.RetryJobRequest;
import com.google.cloud.deploy.v1.RetryJobResponse;
+import com.google.cloud.deploy.v1.RollbackTargetRequest;
+import com.google.cloud.deploy.v1.RollbackTargetResponse;
import com.google.cloud.deploy.v1.Rollout;
import com.google.cloud.deploy.v1.Target;
import com.google.cloud.deploy.v1.TerminateJobRunRequest;
import com.google.cloud.deploy.v1.TerminateJobRunResponse;
+import com.google.cloud.deploy.v1.UpdateAutomationRequest;
import com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.UpdateTargetRequest;
import com.google.cloud.location.GetLocationRequest;
@@ -155,6 +172,10 @@ public UnaryCallable listTargetsCallabl
throw new UnsupportedOperationException("Not implemented: listTargetsCallable()");
}
+ public UnaryCallable rollbackTargetCallable() {
+ throw new UnsupportedOperationException("Not implemented: rollbackTargetCallable()");
+ }
+
public UnaryCallable getTargetCallable() {
throw new UnsupportedOperationException("Not implemented: getTargetCallable()");
}
@@ -272,6 +293,65 @@ public UnaryCallable getConfigCallable() {
throw new UnsupportedOperationException("Not implemented: getConfigCallable()");
}
+ public OperationCallable
+ createAutomationOperationCallable() {
+ throw new UnsupportedOperationException("Not implemented: createAutomationOperationCallable()");
+ }
+
+ public UnaryCallable createAutomationCallable() {
+ throw new UnsupportedOperationException("Not implemented: createAutomationCallable()");
+ }
+
+ public OperationCallable
+ updateAutomationOperationCallable() {
+ throw new UnsupportedOperationException("Not implemented: updateAutomationOperationCallable()");
+ }
+
+ public UnaryCallable updateAutomationCallable() {
+ throw new UnsupportedOperationException("Not implemented: updateAutomationCallable()");
+ }
+
+ public OperationCallable
+ deleteAutomationOperationCallable() {
+ throw new UnsupportedOperationException("Not implemented: deleteAutomationOperationCallable()");
+ }
+
+ public UnaryCallable deleteAutomationCallable() {
+ throw new UnsupportedOperationException("Not implemented: deleteAutomationCallable()");
+ }
+
+ public UnaryCallable getAutomationCallable() {
+ throw new UnsupportedOperationException("Not implemented: getAutomationCallable()");
+ }
+
+ public UnaryCallable
+ listAutomationsPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listAutomationsPagedCallable()");
+ }
+
+ public UnaryCallable listAutomationsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listAutomationsCallable()");
+ }
+
+ public UnaryCallable getAutomationRunCallable() {
+ throw new UnsupportedOperationException("Not implemented: getAutomationRunCallable()");
+ }
+
+ public UnaryCallable
+ listAutomationRunsPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listAutomationRunsPagedCallable()");
+ }
+
+ public UnaryCallable
+ listAutomationRunsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listAutomationRunsCallable()");
+ }
+
+ public UnaryCallable
+ cancelAutomationRunCallable() {
+ throw new UnsupportedOperationException("Not implemented: cancelAutomationRunCallable()");
+ }
+
public UnaryCallable
listLocationsPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");
diff --git a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStubSettings.java b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStubSettings.java
index 076a9a65974f..5d24e7a0b948 100644
--- a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStubSettings.java
+++ b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/CloudDeployStubSettings.java
@@ -16,6 +16,8 @@
package com.google.cloud.deploy.v1.stub;
+import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationRunsPagedResponse;
+import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListJobRunsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListLocationsPagedResponse;
@@ -58,16 +60,24 @@
import com.google.cloud.deploy.v1.AdvanceRolloutResponse;
import com.google.cloud.deploy.v1.ApproveRolloutRequest;
import com.google.cloud.deploy.v1.ApproveRolloutResponse;
+import com.google.cloud.deploy.v1.Automation;
+import com.google.cloud.deploy.v1.AutomationRun;
+import com.google.cloud.deploy.v1.CancelAutomationRunRequest;
+import com.google.cloud.deploy.v1.CancelAutomationRunResponse;
import com.google.cloud.deploy.v1.CancelRolloutRequest;
import com.google.cloud.deploy.v1.CancelRolloutResponse;
import com.google.cloud.deploy.v1.Config;
+import com.google.cloud.deploy.v1.CreateAutomationRequest;
import com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.CreateReleaseRequest;
import com.google.cloud.deploy.v1.CreateRolloutRequest;
import com.google.cloud.deploy.v1.CreateTargetRequest;
+import com.google.cloud.deploy.v1.DeleteAutomationRequest;
import com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.DeleteTargetRequest;
import com.google.cloud.deploy.v1.DeliveryPipeline;
+import com.google.cloud.deploy.v1.GetAutomationRequest;
+import com.google.cloud.deploy.v1.GetAutomationRunRequest;
import com.google.cloud.deploy.v1.GetConfigRequest;
import com.google.cloud.deploy.v1.GetDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.GetJobRunRequest;
@@ -77,6 +87,10 @@
import com.google.cloud.deploy.v1.IgnoreJobRequest;
import com.google.cloud.deploy.v1.IgnoreJobResponse;
import com.google.cloud.deploy.v1.JobRun;
+import com.google.cloud.deploy.v1.ListAutomationRunsRequest;
+import com.google.cloud.deploy.v1.ListAutomationRunsResponse;
+import com.google.cloud.deploy.v1.ListAutomationsRequest;
+import com.google.cloud.deploy.v1.ListAutomationsResponse;
import com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest;
import com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse;
import com.google.cloud.deploy.v1.ListJobRunsRequest;
@@ -91,10 +105,13 @@
import com.google.cloud.deploy.v1.Release;
import com.google.cloud.deploy.v1.RetryJobRequest;
import com.google.cloud.deploy.v1.RetryJobResponse;
+import com.google.cloud.deploy.v1.RollbackTargetRequest;
+import com.google.cloud.deploy.v1.RollbackTargetResponse;
import com.google.cloud.deploy.v1.Rollout;
import com.google.cloud.deploy.v1.Target;
import com.google.cloud.deploy.v1.TerminateJobRunRequest;
import com.google.cloud.deploy.v1.TerminateJobRunResponse;
+import com.google.cloud.deploy.v1.UpdateAutomationRequest;
import com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.UpdateTargetRequest;
import com.google.cloud.location.GetLocationRequest;
@@ -183,6 +200,8 @@ public class CloudDeployStubSettings extends StubSettings
listTargetsSettings;
+ private final UnaryCallSettings
+ rollbackTargetSettings;
private final UnaryCallSettings getTargetSettings;
private final UnaryCallSettings createTargetSettings;
private final OperationCallSettings
@@ -223,6 +242,25 @@ public class CloudDeployStubSettings extends StubSettings
terminateJobRunSettings;
private final UnaryCallSettings getConfigSettings;
+ private final UnaryCallSettings createAutomationSettings;
+ private final OperationCallSettings
+ createAutomationOperationSettings;
+ private final UnaryCallSettings updateAutomationSettings;
+ private final OperationCallSettings
+ updateAutomationOperationSettings;
+ private final UnaryCallSettings deleteAutomationSettings;
+ private final OperationCallSettings
+ deleteAutomationOperationSettings;
+ private final UnaryCallSettings getAutomationSettings;
+ private final PagedCallSettings<
+ ListAutomationsRequest, ListAutomationsResponse, ListAutomationsPagedResponse>
+ listAutomationsSettings;
+ private final UnaryCallSettings getAutomationRunSettings;
+ private final PagedCallSettings<
+ ListAutomationRunsRequest, ListAutomationRunsResponse, ListAutomationRunsPagedResponse>
+ listAutomationRunsSettings;
+ private final UnaryCallSettings
+ cancelAutomationRunSettings;
private final PagedCallSettings<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings;
@@ -417,6 +455,85 @@ public Iterable extractResources(ListJobRunsResponse payload) {
}
};
+ private static final PagedListDescriptor<
+ ListAutomationsRequest, ListAutomationsResponse, Automation>
+ LIST_AUTOMATIONS_PAGE_STR_DESC =
+ new PagedListDescriptor() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListAutomationsRequest injectToken(
+ ListAutomationsRequest payload, String token) {
+ return ListAutomationsRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListAutomationsRequest injectPageSize(
+ ListAutomationsRequest payload, int pageSize) {
+ return ListAutomationsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListAutomationsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListAutomationsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(ListAutomationsResponse payload) {
+ return payload.getAutomationsList() == null
+ ? ImmutableList.of()
+ : payload.getAutomationsList();
+ }
+ };
+
+ private static final PagedListDescriptor<
+ ListAutomationRunsRequest, ListAutomationRunsResponse, AutomationRun>
+ LIST_AUTOMATION_RUNS_PAGE_STR_DESC =
+ new PagedListDescriptor<
+ ListAutomationRunsRequest, ListAutomationRunsResponse, AutomationRun>() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListAutomationRunsRequest injectToken(
+ ListAutomationRunsRequest payload, String token) {
+ return ListAutomationRunsRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListAutomationRunsRequest injectPageSize(
+ ListAutomationRunsRequest payload, int pageSize) {
+ return ListAutomationRunsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListAutomationRunsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListAutomationRunsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(ListAutomationRunsResponse payload) {
+ return payload.getAutomationRunsList() == null
+ ? ImmutableList.of()
+ : payload.getAutomationRunsList();
+ }
+ };
+
private static final PagedListDescriptor
LIST_LOCATIONS_PAGE_STR_DESC =
new PagedListDescriptor() {
@@ -545,6 +662,44 @@ public ApiFuture getFuturePagedResponse(
}
};
+ private static final PagedListResponseFactory<
+ ListAutomationsRequest, ListAutomationsResponse, ListAutomationsPagedResponse>
+ LIST_AUTOMATIONS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListAutomationsRequest, ListAutomationsResponse, ListAutomationsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListAutomationsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext pageContext =
+ PageContext.create(callable, LIST_AUTOMATIONS_PAGE_STR_DESC, request, context);
+ return ListAutomationsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
+ private static final PagedListResponseFactory<
+ ListAutomationRunsRequest, ListAutomationRunsResponse, ListAutomationRunsPagedResponse>
+ LIST_AUTOMATION_RUNS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListAutomationRunsRequest,
+ ListAutomationRunsResponse,
+ ListAutomationRunsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListAutomationRunsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext
+ pageContext =
+ PageContext.create(
+ callable, LIST_AUTOMATION_RUNS_PAGE_STR_DESC, request, context);
+ return ListAutomationRunsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
private static final PagedListResponseFactory<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
LIST_LOCATIONS_PAGE_STR_FACT =
@@ -619,6 +774,11 @@ public ApiFuture getFuturePagedResponse(
return listTargetsSettings;
}
+ /** Returns the object with the settings used for calls to rollbackTarget. */
+ public UnaryCallSettings rollbackTargetSettings() {
+ return rollbackTargetSettings;
+ }
+
/** Returns the object with the settings used for calls to getTarget. */
public UnaryCallSettings getTargetSettings() {
return getTargetSettings;
@@ -753,6 +913,69 @@ public UnaryCallSettings getConfigSettings() {
return getConfigSettings;
}
+ /** Returns the object with the settings used for calls to createAutomation. */
+ public UnaryCallSettings createAutomationSettings() {
+ return createAutomationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to createAutomation. */
+ public OperationCallSettings
+ createAutomationOperationSettings() {
+ return createAutomationOperationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to updateAutomation. */
+ public UnaryCallSettings updateAutomationSettings() {
+ return updateAutomationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to updateAutomation. */
+ public OperationCallSettings
+ updateAutomationOperationSettings() {
+ return updateAutomationOperationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deleteAutomation. */
+ public UnaryCallSettings deleteAutomationSettings() {
+ return deleteAutomationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deleteAutomation. */
+ public OperationCallSettings
+ deleteAutomationOperationSettings() {
+ return deleteAutomationOperationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getAutomation. */
+ public UnaryCallSettings getAutomationSettings() {
+ return getAutomationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to listAutomations. */
+ public PagedCallSettings<
+ ListAutomationsRequest, ListAutomationsResponse, ListAutomationsPagedResponse>
+ listAutomationsSettings() {
+ return listAutomationsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getAutomationRun. */
+ public UnaryCallSettings getAutomationRunSettings() {
+ return getAutomationRunSettings;
+ }
+
+ /** Returns the object with the settings used for calls to listAutomationRuns. */
+ public PagedCallSettings<
+ ListAutomationRunsRequest, ListAutomationRunsResponse, ListAutomationRunsPagedResponse>
+ listAutomationRunsSettings() {
+ return listAutomationRunsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to cancelAutomationRun. */
+ public UnaryCallSettings
+ cancelAutomationRunSettings() {
+ return cancelAutomationRunSettings;
+ }
+
/** Returns the object with the settings used for calls to listLocations. */
public PagedCallSettings
listLocationsSettings() {
@@ -898,6 +1121,7 @@ protected CloudDeployStubSettings(Builder settingsBuilder) throws IOException {
deleteDeliveryPipelineOperationSettings =
settingsBuilder.deleteDeliveryPipelineOperationSettings().build();
listTargetsSettings = settingsBuilder.listTargetsSettings().build();
+ rollbackTargetSettings = settingsBuilder.rollbackTargetSettings().build();
getTargetSettings = settingsBuilder.getTargetSettings().build();
createTargetSettings = settingsBuilder.createTargetSettings().build();
createTargetOperationSettings = settingsBuilder.createTargetOperationSettings().build();
@@ -923,6 +1147,17 @@ protected CloudDeployStubSettings(Builder settingsBuilder) throws IOException {
getJobRunSettings = settingsBuilder.getJobRunSettings().build();
terminateJobRunSettings = settingsBuilder.terminateJobRunSettings().build();
getConfigSettings = settingsBuilder.getConfigSettings().build();
+ createAutomationSettings = settingsBuilder.createAutomationSettings().build();
+ createAutomationOperationSettings = settingsBuilder.createAutomationOperationSettings().build();
+ updateAutomationSettings = settingsBuilder.updateAutomationSettings().build();
+ updateAutomationOperationSettings = settingsBuilder.updateAutomationOperationSettings().build();
+ deleteAutomationSettings = settingsBuilder.deleteAutomationSettings().build();
+ deleteAutomationOperationSettings = settingsBuilder.deleteAutomationOperationSettings().build();
+ getAutomationSettings = settingsBuilder.getAutomationSettings().build();
+ listAutomationsSettings = settingsBuilder.listAutomationsSettings().build();
+ getAutomationRunSettings = settingsBuilder.getAutomationRunSettings().build();
+ listAutomationRunsSettings = settingsBuilder.listAutomationRunsSettings().build();
+ cancelAutomationRunSettings = settingsBuilder.cancelAutomationRunSettings().build();
listLocationsSettings = settingsBuilder.listLocationsSettings().build();
getLocationSettings = settingsBuilder.getLocationSettings().build();
setIamPolicySettings = settingsBuilder.setIamPolicySettings().build();
@@ -958,6 +1193,8 @@ public static class Builder extends StubSettings.Builder
listTargetsSettings;
+ private final UnaryCallSettings.Builder
+ rollbackTargetSettings;
private final UnaryCallSettings.Builder getTargetSettings;
private final UnaryCallSettings.Builder createTargetSettings;
private final OperationCallSettings.Builder
@@ -999,6 +1236,31 @@ public static class Builder extends StubSettings.Builder
terminateJobRunSettings;
private final UnaryCallSettings.Builder getConfigSettings;
+ private final UnaryCallSettings.Builder
+ createAutomationSettings;
+ private final OperationCallSettings.Builder<
+ CreateAutomationRequest, Automation, OperationMetadata>
+ createAutomationOperationSettings;
+ private final UnaryCallSettings.Builder
+ updateAutomationSettings;
+ private final OperationCallSettings.Builder<
+ UpdateAutomationRequest, Automation, OperationMetadata>
+ updateAutomationOperationSettings;
+ private final UnaryCallSettings.Builder
+ deleteAutomationSettings;
+ private final OperationCallSettings.Builder
+ deleteAutomationOperationSettings;
+ private final UnaryCallSettings.Builder getAutomationSettings;
+ private final PagedCallSettings.Builder<
+ ListAutomationsRequest, ListAutomationsResponse, ListAutomationsPagedResponse>
+ listAutomationsSettings;
+ private final UnaryCallSettings.Builder
+ getAutomationRunSettings;
+ private final PagedCallSettings.Builder<
+ ListAutomationRunsRequest, ListAutomationRunsResponse, ListAutomationRunsPagedResponse>
+ listAutomationRunsSettings;
+ private final UnaryCallSettings.Builder
+ cancelAutomationRunSettings;
private final PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings;
@@ -1068,6 +1330,7 @@ protected Builder(ClientContext clientContext) {
deleteDeliveryPipelineSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteDeliveryPipelineOperationSettings = OperationCallSettings.newBuilder();
listTargetsSettings = PagedCallSettings.newBuilder(LIST_TARGETS_PAGE_STR_FACT);
+ rollbackTargetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
getTargetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createTargetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createTargetOperationSettings = OperationCallSettings.newBuilder();
@@ -1093,6 +1356,17 @@ protected Builder(ClientContext clientContext) {
getJobRunSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
terminateJobRunSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
getConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ createAutomationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ createAutomationOperationSettings = OperationCallSettings.newBuilder();
+ updateAutomationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ updateAutomationOperationSettings = OperationCallSettings.newBuilder();
+ deleteAutomationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ deleteAutomationOperationSettings = OperationCallSettings.newBuilder();
+ getAutomationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ listAutomationsSettings = PagedCallSettings.newBuilder(LIST_AUTOMATIONS_PAGE_STR_FACT);
+ getAutomationRunSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ listAutomationRunsSettings = PagedCallSettings.newBuilder(LIST_AUTOMATION_RUNS_PAGE_STR_FACT);
+ cancelAutomationRunSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT);
getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
@@ -1107,6 +1381,7 @@ protected Builder(ClientContext clientContext) {
updateDeliveryPipelineSettings,
deleteDeliveryPipelineSettings,
listTargetsSettings,
+ rollbackTargetSettings,
getTargetSettings,
createTargetSettings,
updateTargetSettings,
@@ -1127,6 +1402,14 @@ protected Builder(ClientContext clientContext) {
getJobRunSettings,
terminateJobRunSettings,
getConfigSettings,
+ createAutomationSettings,
+ updateAutomationSettings,
+ deleteAutomationSettings,
+ getAutomationSettings,
+ listAutomationsSettings,
+ getAutomationRunSettings,
+ listAutomationRunsSettings,
+ cancelAutomationRunSettings,
listLocationsSettings,
getLocationSettings,
setIamPolicySettings,
@@ -1150,6 +1433,7 @@ protected Builder(CloudDeployStubSettings settings) {
deleteDeliveryPipelineOperationSettings =
settings.deleteDeliveryPipelineOperationSettings.toBuilder();
listTargetsSettings = settings.listTargetsSettings.toBuilder();
+ rollbackTargetSettings = settings.rollbackTargetSettings.toBuilder();
getTargetSettings = settings.getTargetSettings.toBuilder();
createTargetSettings = settings.createTargetSettings.toBuilder();
createTargetOperationSettings = settings.createTargetOperationSettings.toBuilder();
@@ -1175,6 +1459,17 @@ protected Builder(CloudDeployStubSettings settings) {
getJobRunSettings = settings.getJobRunSettings.toBuilder();
terminateJobRunSettings = settings.terminateJobRunSettings.toBuilder();
getConfigSettings = settings.getConfigSettings.toBuilder();
+ createAutomationSettings = settings.createAutomationSettings.toBuilder();
+ createAutomationOperationSettings = settings.createAutomationOperationSettings.toBuilder();
+ updateAutomationSettings = settings.updateAutomationSettings.toBuilder();
+ updateAutomationOperationSettings = settings.updateAutomationOperationSettings.toBuilder();
+ deleteAutomationSettings = settings.deleteAutomationSettings.toBuilder();
+ deleteAutomationOperationSettings = settings.deleteAutomationOperationSettings.toBuilder();
+ getAutomationSettings = settings.getAutomationSettings.toBuilder();
+ listAutomationsSettings = settings.listAutomationsSettings.toBuilder();
+ getAutomationRunSettings = settings.getAutomationRunSettings.toBuilder();
+ listAutomationRunsSettings = settings.listAutomationRunsSettings.toBuilder();
+ cancelAutomationRunSettings = settings.cancelAutomationRunSettings.toBuilder();
listLocationsSettings = settings.listLocationsSettings.toBuilder();
getLocationSettings = settings.getLocationSettings.toBuilder();
setIamPolicySettings = settings.setIamPolicySettings.toBuilder();
@@ -1189,6 +1484,7 @@ protected Builder(CloudDeployStubSettings settings) {
updateDeliveryPipelineSettings,
deleteDeliveryPipelineSettings,
listTargetsSettings,
+ rollbackTargetSettings,
getTargetSettings,
createTargetSettings,
updateTargetSettings,
@@ -1209,6 +1505,14 @@ protected Builder(CloudDeployStubSettings settings) {
getJobRunSettings,
terminateJobRunSettings,
getConfigSettings,
+ createAutomationSettings,
+ updateAutomationSettings,
+ deleteAutomationSettings,
+ getAutomationSettings,
+ listAutomationsSettings,
+ getAutomationRunSettings,
+ listAutomationRunsSettings,
+ cancelAutomationRunSettings,
listLocationsSettings,
getLocationSettings,
setIamPolicySettings,
@@ -1273,6 +1577,11 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+ builder
+ .rollbackTargetSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
builder
.getTargetSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
@@ -1373,6 +1682,46 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+ builder
+ .createAutomationSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+
+ builder
+ .updateAutomationSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+
+ builder
+ .deleteAutomationSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+
+ builder
+ .getAutomationSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .listAutomationsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .getAutomationRunSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .listAutomationRunsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .cancelAutomationRunSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+
builder
.listLocationsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
@@ -1590,6 +1939,78 @@ private static Builder initDefaults(Builder builder) {
.setTotalTimeout(Duration.ofMillis(300000L))
.build()));
+ builder
+ .createAutomationOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(Automation.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelay(Duration.ofMillis(45000L))
+ .setInitialRpcTimeout(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ZERO)
+ .setTotalTimeout(Duration.ofMillis(300000L))
+ .build()));
+
+ builder
+ .updateAutomationOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(Automation.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelay(Duration.ofMillis(45000L))
+ .setInitialRpcTimeout(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ZERO)
+ .setTotalTimeout(Duration.ofMillis(300000L))
+ .build()));
+
+ builder
+ .deleteAutomationOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelay(Duration.ofMillis(45000L))
+ .setInitialRpcTimeout(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ZERO)
+ .setTotalTimeout(Duration.ofMillis(300000L))
+ .build()));
+
return builder;
}
@@ -1674,6 +2095,12 @@ public Builder applyToAllUnaryMethods(
return listTargetsSettings;
}
+ /** Returns the builder for the settings used for calls to rollbackTarget. */
+ public UnaryCallSettings.Builder
+ rollbackTargetSettings() {
+ return rollbackTargetSettings;
+ }
+
/** Returns the builder for the settings used for calls to getTarget. */
public UnaryCallSettings.Builder getTargetSettings() {
return getTargetSettings;
@@ -1825,6 +2252,79 @@ public UnaryCallSettings.Builder getConfigSettings() {
return getConfigSettings;
}
+ /** Returns the builder for the settings used for calls to createAutomation. */
+ public UnaryCallSettings.Builder
+ createAutomationSettings() {
+ return createAutomationSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to createAutomation. */
+ @BetaApi(
+ "The surface for use by generated code is not stable yet and may change in the future.")
+ public OperationCallSettings.Builder
+ createAutomationOperationSettings() {
+ return createAutomationOperationSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to updateAutomation. */
+ public UnaryCallSettings.Builder
+ updateAutomationSettings() {
+ return updateAutomationSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to updateAutomation. */
+ @BetaApi(
+ "The surface for use by generated code is not stable yet and may change in the future.")
+ public OperationCallSettings.Builder
+ updateAutomationOperationSettings() {
+ return updateAutomationOperationSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to deleteAutomation. */
+ public UnaryCallSettings.Builder
+ deleteAutomationSettings() {
+ return deleteAutomationSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to deleteAutomation. */
+ @BetaApi(
+ "The surface for use by generated code is not stable yet and may change in the future.")
+ public OperationCallSettings.Builder
+ deleteAutomationOperationSettings() {
+ return deleteAutomationOperationSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getAutomation. */
+ public UnaryCallSettings.Builder getAutomationSettings() {
+ return getAutomationSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to listAutomations. */
+ public PagedCallSettings.Builder<
+ ListAutomationsRequest, ListAutomationsResponse, ListAutomationsPagedResponse>
+ listAutomationsSettings() {
+ return listAutomationsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getAutomationRun. */
+ public UnaryCallSettings.Builder
+ getAutomationRunSettings() {
+ return getAutomationRunSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to listAutomationRuns. */
+ public PagedCallSettings.Builder<
+ ListAutomationRunsRequest, ListAutomationRunsResponse, ListAutomationRunsPagedResponse>
+ listAutomationRunsSettings() {
+ return listAutomationRunsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to cancelAutomationRun. */
+ public UnaryCallSettings.Builder
+ cancelAutomationRunSettings() {
+ return cancelAutomationRunSettings;
+ }
+
/** Returns the builder for the settings used for calls to listLocations. */
public PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
diff --git a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployStub.java b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployStub.java
index 889cee7038c0..aa825f4d3c42 100644
--- a/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployStub.java
+++ b/java-deploy/google-cloud-deploy/src/main/java/com/google/cloud/deploy/v1/stub/GrpcCloudDeployStub.java
@@ -16,6 +16,8 @@
package com.google.cloud.deploy.v1.stub;
+import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationRunsPagedResponse;
+import static com.google.cloud.deploy.v1.CloudDeployClient.ListAutomationsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListDeliveryPipelinesPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListJobRunsPagedResponse;
import static com.google.cloud.deploy.v1.CloudDeployClient.ListLocationsPagedResponse;
@@ -37,16 +39,24 @@
import com.google.cloud.deploy.v1.AdvanceRolloutResponse;
import com.google.cloud.deploy.v1.ApproveRolloutRequest;
import com.google.cloud.deploy.v1.ApproveRolloutResponse;
+import com.google.cloud.deploy.v1.Automation;
+import com.google.cloud.deploy.v1.AutomationRun;
+import com.google.cloud.deploy.v1.CancelAutomationRunRequest;
+import com.google.cloud.deploy.v1.CancelAutomationRunResponse;
import com.google.cloud.deploy.v1.CancelRolloutRequest;
import com.google.cloud.deploy.v1.CancelRolloutResponse;
import com.google.cloud.deploy.v1.Config;
+import com.google.cloud.deploy.v1.CreateAutomationRequest;
import com.google.cloud.deploy.v1.CreateDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.CreateReleaseRequest;
import com.google.cloud.deploy.v1.CreateRolloutRequest;
import com.google.cloud.deploy.v1.CreateTargetRequest;
+import com.google.cloud.deploy.v1.DeleteAutomationRequest;
import com.google.cloud.deploy.v1.DeleteDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.DeleteTargetRequest;
import com.google.cloud.deploy.v1.DeliveryPipeline;
+import com.google.cloud.deploy.v1.GetAutomationRequest;
+import com.google.cloud.deploy.v1.GetAutomationRunRequest;
import com.google.cloud.deploy.v1.GetConfigRequest;
import com.google.cloud.deploy.v1.GetDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.GetJobRunRequest;
@@ -56,6 +66,10 @@
import com.google.cloud.deploy.v1.IgnoreJobRequest;
import com.google.cloud.deploy.v1.IgnoreJobResponse;
import com.google.cloud.deploy.v1.JobRun;
+import com.google.cloud.deploy.v1.ListAutomationRunsRequest;
+import com.google.cloud.deploy.v1.ListAutomationRunsResponse;
+import com.google.cloud.deploy.v1.ListAutomationsRequest;
+import com.google.cloud.deploy.v1.ListAutomationsResponse;
import com.google.cloud.deploy.v1.ListDeliveryPipelinesRequest;
import com.google.cloud.deploy.v1.ListDeliveryPipelinesResponse;
import com.google.cloud.deploy.v1.ListJobRunsRequest;
@@ -70,10 +84,13 @@
import com.google.cloud.deploy.v1.Release;
import com.google.cloud.deploy.v1.RetryJobRequest;
import com.google.cloud.deploy.v1.RetryJobResponse;
+import com.google.cloud.deploy.v1.RollbackTargetRequest;
+import com.google.cloud.deploy.v1.RollbackTargetResponse;
import com.google.cloud.deploy.v1.Rollout;
import com.google.cloud.deploy.v1.Target;
import com.google.cloud.deploy.v1.TerminateJobRunRequest;
import com.google.cloud.deploy.v1.TerminateJobRunResponse;
+import com.google.cloud.deploy.v1.UpdateAutomationRequest;
import com.google.cloud.deploy.v1.UpdateDeliveryPipelineRequest;
import com.google.cloud.deploy.v1.UpdateTargetRequest;
import com.google.cloud.location.GetLocationRequest;
@@ -163,6 +180,17 @@ public class GrpcCloudDeployStub extends CloudDeployStub {
ProtoUtils.marshaller(ListTargetsResponse.getDefaultInstance()))
.build();
+ private static final MethodDescriptor
+ rollbackTargetMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/RollbackTarget")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(RollbackTargetRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(RollbackTargetResponse.getDefaultInstance()))
+ .build();
+
private static final MethodDescriptor getTargetMethodDescriptor =
MethodDescriptor.newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
@@ -353,6 +381,89 @@ public class GrpcCloudDeployStub extends CloudDeployStub {
.setResponseMarshaller(ProtoUtils.marshaller(Config.getDefaultInstance()))
.build();
+ private static final MethodDescriptor
+ createAutomationMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/CreateAutomation")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(CreateAutomationRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ updateAutomationMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/UpdateAutomation")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(UpdateAutomationRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ deleteAutomationMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/DeleteAutomation")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(DeleteAutomationRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ getAutomationMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/GetAutomation")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(GetAutomationRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Automation.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ listAutomationsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/ListAutomations")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListAutomationsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListAutomationsResponse.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ getAutomationRunMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/GetAutomationRun")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(GetAutomationRunRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(AutomationRun.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ listAutomationRunsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/ListAutomationRuns")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListAutomationRunsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListAutomationRunsResponse.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ cancelAutomationRunMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.deploy.v1.CloudDeploy/CancelAutomationRun")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(CancelAutomationRunRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(CancelAutomationRunResponse.getDefaultInstance()))
+ .build();
+
private static final MethodDescriptor
listLocationsMethodDescriptor =
MethodDescriptor.newBuilder()
@@ -422,6 +533,7 @@ public class GrpcCloudDeployStub extends CloudDeployStub {
private final UnaryCallable listTargetsCallable;
private final UnaryCallable
listTargetsPagedCallable;
+ private final UnaryCallable rollbackTargetCallable;
private final UnaryCallable getTargetCallable;
private final UnaryCallable createTargetCallable;
private final OperationCallable
@@ -459,6 +571,27 @@ public class GrpcCloudDeployStub extends CloudDeployStub {
private final UnaryCallable
terminateJobRunCallable;
private final UnaryCallable getConfigCallable;
+ private final UnaryCallable createAutomationCallable;
+ private final OperationCallable
+ createAutomationOperationCallable;
+ private final UnaryCallable updateAutomationCallable;
+ private final OperationCallable
+ updateAutomationOperationCallable;
+ private final UnaryCallable deleteAutomationCallable;
+ private final OperationCallable
+ deleteAutomationOperationCallable;
+ private final UnaryCallable getAutomationCallable;
+ private final UnaryCallable
+ listAutomationsCallable;
+ private final UnaryCallable