diff --git a/java-orchestration-airflow/README.md b/java-orchestration-airflow/README.md
index b663cc82b2d3..8efc4bb9895f 100644
--- a/java-orchestration-airflow/README.md
+++ b/java-orchestration-airflow/README.md
@@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-orchestration-airflow.svg
-[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-orchestration-airflow/1.34.0
+[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-orchestration-airflow/1.35.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsClient.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsClient.java
index 21fa62d07aa6..8d7fbba1bf9e 100644
--- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsClient.java
+++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsClient.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 Google LLC
+ * Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -205,6 +205,227 @@
*
*
*
* SaveSnapshot |
* Creates a snapshots of a Cloud Composer environment.
* As a result of this operation, snapshot of environment's state is stored in a location specified in the SaveSnapshotRequest. |
@@ -1235,10 +1456,11 @@ public final PollAirflowCommandResponse pollAirflowCommand(PollAirflowCommandReq
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates a snapshots of a Cloud Composer environment.
+ * Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer
+ * component.
*
- * As a result of this operation, snapshot of environment's state is stored in a location
- * specified in the SaveSnapshotRequest.
+ *
This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
*
*
Sample code:
*
@@ -1249,29 +1471,33 @@ public final PollAirflowCommandResponse pollAirflowCommand(PollAirflowCommandReq
* // - 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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
- * SaveSnapshotRequest request =
- * SaveSnapshotRequest.newBuilder()
- * .setEnvironment("environment-85904877")
- * .setSnapshotLocation("snapshotLocation1625609625")
- * .build();
- * SaveSnapshotResponse response = environmentsClient.saveSnapshotAsync(request).get();
+ * EnvironmentName parent = EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]");
+ * for (ListWorkloadsResponse.ComposerWorkload element :
+ * environmentsClient.listWorkloads(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
* }
* }
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param parent Required. The environment name to get workloads for, in the form:
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final OperationFuture saveSnapshotAsync(
- SaveSnapshotRequest request) {
- return saveSnapshotOperationCallable().futureCall(request);
+ public final ListWorkloadsPagedResponse listWorkloads(EnvironmentName parent) {
+ ListWorkloadsRequest request =
+ ListWorkloadsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listWorkloads(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates a snapshots of a Cloud Composer environment.
+ * Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer
+ * component.
*
- * As a result of this operation, snapshot of environment's state is stored in a location
- * specified in the SaveSnapshotRequest.
+ *
This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
*
*
Sample code:
*
@@ -1282,29 +1508,30 @@ public final OperationFuture saveSnapsh
* // - 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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
- * SaveSnapshotRequest request =
- * SaveSnapshotRequest.newBuilder()
- * .setEnvironment("environment-85904877")
- * .setSnapshotLocation("snapshotLocation1625609625")
- * .build();
- * OperationFuture future =
- * environmentsClient.saveSnapshotOperationCallable().futureCall(request);
- * // Do something.
- * SaveSnapshotResponse response = future.get();
+ * String parent = EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString();
+ * for (ListWorkloadsResponse.ComposerWorkload element :
+ * environmentsClient.listWorkloads(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
* }
* }
+ *
+ * @param parent Required. The environment name to get workloads for, in the form:
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final OperationCallable
- saveSnapshotOperationCallable() {
- return stub.saveSnapshotOperationCallable();
+ public final ListWorkloadsPagedResponse listWorkloads(String parent) {
+ ListWorkloadsRequest request = ListWorkloadsRequest.newBuilder().setParent(parent).build();
+ return listWorkloads(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates a snapshots of a Cloud Composer environment.
+ * Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer
+ * component.
*
- * As a result of this operation, snapshot of environment's state is stored in a location
- * specified in the SaveSnapshotRequest.
+ *
This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
*
*
Sample code:
*
@@ -1315,27 +1542,34 @@ public final OperationFuture saveSnapsh
* // - 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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
- * SaveSnapshotRequest request =
- * SaveSnapshotRequest.newBuilder()
- * .setEnvironment("environment-85904877")
- * .setSnapshotLocation("snapshotLocation1625609625")
+ * ListWorkloadsRequest request =
+ * ListWorkloadsRequest.newBuilder()
+ * .setParent(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
* .build();
- * ApiFuture future = environmentsClient.saveSnapshotCallable().futureCall(request);
- * // Do something.
- * Operation response = future.get();
+ * for (ListWorkloadsResponse.ComposerWorkload element :
+ * environmentsClient.listWorkloads(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 UnaryCallable saveSnapshotCallable() {
- return stub.saveSnapshotCallable();
+ public final ListWorkloadsPagedResponse listWorkloads(ListWorkloadsRequest request) {
+ return listWorkloadsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Loads a snapshot of a Cloud Composer environment.
+ * Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer
+ * component.
*
- * As a result of this operation, a snapshot of environment's specified in LoadSnapshotRequest
- * is loaded into the environment.
+ *
This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
*
*
Sample code:
*
@@ -1346,33 +1580,34 @@ public final UnaryCallable saveSnapshotCallable(
* // - 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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
- * LoadSnapshotRequest request =
- * LoadSnapshotRequest.newBuilder()
- * .setEnvironment("environment-85904877")
- * .setSnapshotPath("snapshotPath-931648503")
- * .setSkipPypiPackagesInstallation(true)
- * .setSkipEnvironmentVariablesSetting(true)
- * .setSkipAirflowOverridesSetting(true)
- * .setSkipGcsDataCopying(true)
+ * ListWorkloadsRequest request =
+ * ListWorkloadsRequest.newBuilder()
+ * .setParent(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
* .build();
- * LoadSnapshotResponse response = environmentsClient.loadSnapshotAsync(request).get();
+ * ApiFuture future =
+ * environmentsClient.listWorkloadsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (ListWorkloadsResponse.ComposerWorkload element : future.get().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 OperationFuture loadSnapshotAsync(
- LoadSnapshotRequest request) {
- return loadSnapshotOperationCallable().futureCall(request);
+ public final UnaryCallable
+ listWorkloadsPagedCallable() {
+ return stub.listWorkloadsPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Loads a snapshot of a Cloud Composer environment.
+ * Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer
+ * component.
*
- * As a result of this operation, a snapshot of environment's specified in LoadSnapshotRequest
- * is loaded into the environment.
+ *
This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
*
*
Sample code:
*
@@ -1383,33 +1618,38 @@ public final OperationFuture loadSnapsh
* // - 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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
- * LoadSnapshotRequest request =
- * LoadSnapshotRequest.newBuilder()
- * .setEnvironment("environment-85904877")
- * .setSnapshotPath("snapshotPath-931648503")
- * .setSkipPypiPackagesInstallation(true)
- * .setSkipEnvironmentVariablesSetting(true)
- * .setSkipAirflowOverridesSetting(true)
- * .setSkipGcsDataCopying(true)
+ * ListWorkloadsRequest request =
+ * ListWorkloadsRequest.newBuilder()
+ * .setParent(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
* .build();
- * OperationFuture future =
- * environmentsClient.loadSnapshotOperationCallable().futureCall(request);
- * // Do something.
- * LoadSnapshotResponse response = future.get();
+ * while (true) {
+ * ListWorkloadsResponse response = environmentsClient.listWorkloadsCallable().call(request);
+ * for (ListWorkloadsResponse.ComposerWorkload element : response.getWorkloadsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
* }
* }
*/
- public final OperationCallable
- loadSnapshotOperationCallable() {
- return stub.loadSnapshotOperationCallable();
+ public final UnaryCallable listWorkloadsCallable() {
+ return stub.listWorkloadsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Loads a snapshot of a Cloud Composer environment.
+ * Creates a user workloads Secret.
*
- * As a result of this operation, a snapshot of environment's specified in LoadSnapshotRequest
- * is loaded into the environment.
+ *
This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
*
*
Sample code:
*
@@ -1420,7 +1660,1587 @@ public final OperationFuture loadSnapsh
* // - 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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
- * LoadSnapshotRequest request =
+ * EnvironmentName parent = EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]");
+ * UserWorkloadsSecret userWorkloadsSecret = UserWorkloadsSecret.newBuilder().build();
+ * UserWorkloadsSecret response =
+ * environmentsClient.createUserWorkloadsSecret(parent, userWorkloadsSecret);
+ * }
+ * }
+ *
+ * @param parent Required. The environment name to create a Secret for, in the form:
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+ * @param userWorkloadsSecret Required. User workloads Secret to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UserWorkloadsSecret createUserWorkloadsSecret(
+ EnvironmentName parent, UserWorkloadsSecret userWorkloadsSecret) {
+ CreateUserWorkloadsSecretRequest request =
+ CreateUserWorkloadsSecretRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setUserWorkloadsSecret(userWorkloadsSecret)
+ .build();
+ return createUserWorkloadsSecret(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a user workloads Secret.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * String parent = EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString();
+ * UserWorkloadsSecret userWorkloadsSecret = UserWorkloadsSecret.newBuilder().build();
+ * UserWorkloadsSecret response =
+ * environmentsClient.createUserWorkloadsSecret(parent, userWorkloadsSecret);
+ * }
+ * }
+ *
+ * @param parent Required. The environment name to create a Secret for, in the form:
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+ * @param userWorkloadsSecret Required. User workloads Secret to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UserWorkloadsSecret createUserWorkloadsSecret(
+ String parent, UserWorkloadsSecret userWorkloadsSecret) {
+ CreateUserWorkloadsSecretRequest request =
+ CreateUserWorkloadsSecretRequest.newBuilder()
+ .setParent(parent)
+ .setUserWorkloadsSecret(userWorkloadsSecret)
+ .build();
+ return createUserWorkloadsSecret(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a user workloads Secret.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * CreateUserWorkloadsSecretRequest request =
+ * CreateUserWorkloadsSecretRequest.newBuilder()
+ * .setParent(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString())
+ * .setUserWorkloadsSecret(UserWorkloadsSecret.newBuilder().build())
+ * .build();
+ * UserWorkloadsSecret response = environmentsClient.createUserWorkloadsSecret(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 UserWorkloadsSecret createUserWorkloadsSecret(
+ CreateUserWorkloadsSecretRequest request) {
+ return createUserWorkloadsSecretCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a user workloads Secret.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * CreateUserWorkloadsSecretRequest request =
+ * CreateUserWorkloadsSecretRequest.newBuilder()
+ * .setParent(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString())
+ * .setUserWorkloadsSecret(UserWorkloadsSecret.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * environmentsClient.createUserWorkloadsSecretCallable().futureCall(request);
+ * // Do something.
+ * UserWorkloadsSecret response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ createUserWorkloadsSecretCallable() {
+ return stub.createUserWorkloadsSecretCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an existing user workloads Secret. Values of the "data" field in the response are cleared.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * UserWorkloadsSecretName name =
+ * UserWorkloadsSecretName.of(
+ * "[PROJECT]", "[LOCATION]", "[ENVIRONMENT]", "[USER_WORKLOADS_SECRET]");
+ * UserWorkloadsSecret response = environmentsClient.getUserWorkloadsSecret(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Secret to get, in the form:
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UserWorkloadsSecret getUserWorkloadsSecret(UserWorkloadsSecretName name) {
+ GetUserWorkloadsSecretRequest request =
+ GetUserWorkloadsSecretRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getUserWorkloadsSecret(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an existing user workloads Secret. Values of the "data" field in the response are cleared.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * String name =
+ * UserWorkloadsSecretName.of(
+ * "[PROJECT]", "[LOCATION]", "[ENVIRONMENT]", "[USER_WORKLOADS_SECRET]")
+ * .toString();
+ * UserWorkloadsSecret response = environmentsClient.getUserWorkloadsSecret(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Secret to get, in the form:
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UserWorkloadsSecret getUserWorkloadsSecret(String name) {
+ GetUserWorkloadsSecretRequest request =
+ GetUserWorkloadsSecretRequest.newBuilder().setName(name).build();
+ return getUserWorkloadsSecret(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an existing user workloads Secret. Values of the "data" field in the response are cleared.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * GetUserWorkloadsSecretRequest request =
+ * GetUserWorkloadsSecretRequest.newBuilder()
+ * .setName(
+ * UserWorkloadsSecretName.of(
+ * "[PROJECT]", "[LOCATION]", "[ENVIRONMENT]", "[USER_WORKLOADS_SECRET]")
+ * .toString())
+ * .build();
+ * UserWorkloadsSecret response = environmentsClient.getUserWorkloadsSecret(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 UserWorkloadsSecret getUserWorkloadsSecret(GetUserWorkloadsSecretRequest request) {
+ return getUserWorkloadsSecretCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an existing user workloads Secret. Values of the "data" field in the response are cleared.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * GetUserWorkloadsSecretRequest request =
+ * GetUserWorkloadsSecretRequest.newBuilder()
+ * .setName(
+ * UserWorkloadsSecretName.of(
+ * "[PROJECT]", "[LOCATION]", "[ENVIRONMENT]", "[USER_WORKLOADS_SECRET]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * environmentsClient.getUserWorkloadsSecretCallable().futureCall(request);
+ * // Do something.
+ * UserWorkloadsSecret response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ getUserWorkloadsSecretCallable() {
+ return stub.getUserWorkloadsSecretCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists user workloads Secrets.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * EnvironmentName parent = EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]");
+ * for (UserWorkloadsSecret element :
+ * environmentsClient.listUserWorkloadsSecrets(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. List Secrets in the given environment, in the form:
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListUserWorkloadsSecretsPagedResponse listUserWorkloadsSecrets(
+ EnvironmentName parent) {
+ ListUserWorkloadsSecretsRequest request =
+ ListUserWorkloadsSecretsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listUserWorkloadsSecrets(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists user workloads Secrets.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * String parent = EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString();
+ * for (UserWorkloadsSecret element :
+ * environmentsClient.listUserWorkloadsSecrets(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. List Secrets in the given environment, in the form:
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListUserWorkloadsSecretsPagedResponse listUserWorkloadsSecrets(String parent) {
+ ListUserWorkloadsSecretsRequest request =
+ ListUserWorkloadsSecretsRequest.newBuilder().setParent(parent).build();
+ return listUserWorkloadsSecrets(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists user workloads Secrets.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * ListUserWorkloadsSecretsRequest request =
+ * ListUserWorkloadsSecretsRequest.newBuilder()
+ * .setParent(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (UserWorkloadsSecret element :
+ * environmentsClient.listUserWorkloadsSecrets(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 ListUserWorkloadsSecretsPagedResponse listUserWorkloadsSecrets(
+ ListUserWorkloadsSecretsRequest request) {
+ return listUserWorkloadsSecretsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists user workloads Secrets.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * ListUserWorkloadsSecretsRequest request =
+ * ListUserWorkloadsSecretsRequest.newBuilder()
+ * .setParent(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * environmentsClient.listUserWorkloadsSecretsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (UserWorkloadsSecret element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listUserWorkloadsSecretsPagedCallable() {
+ return stub.listUserWorkloadsSecretsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists user workloads Secrets.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * ListUserWorkloadsSecretsRequest request =
+ * ListUserWorkloadsSecretsRequest.newBuilder()
+ * .setParent(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListUserWorkloadsSecretsResponse response =
+ * environmentsClient.listUserWorkloadsSecretsCallable().call(request);
+ * for (UserWorkloadsSecret element : response.getUserWorkloadsSecretsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listUserWorkloadsSecretsCallable() {
+ return stub.listUserWorkloadsSecretsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a user workloads Secret.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * UserWorkloadsSecret userWorkloadsSecret = UserWorkloadsSecret.newBuilder().build();
+ * UserWorkloadsSecret response =
+ * environmentsClient.updateUserWorkloadsSecret(userWorkloadsSecret);
+ * }
+ * }
+ *
+ * @param userWorkloadsSecret Optional. User workloads Secret to override.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UserWorkloadsSecret updateUserWorkloadsSecret(
+ UserWorkloadsSecret userWorkloadsSecret) {
+ UpdateUserWorkloadsSecretRequest request =
+ UpdateUserWorkloadsSecretRequest.newBuilder()
+ .setUserWorkloadsSecret(userWorkloadsSecret)
+ .build();
+ return updateUserWorkloadsSecret(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a user workloads Secret.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * UpdateUserWorkloadsSecretRequest request =
+ * UpdateUserWorkloadsSecretRequest.newBuilder()
+ * .setUserWorkloadsSecret(UserWorkloadsSecret.newBuilder().build())
+ * .build();
+ * UserWorkloadsSecret response = environmentsClient.updateUserWorkloadsSecret(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 UserWorkloadsSecret updateUserWorkloadsSecret(
+ UpdateUserWorkloadsSecretRequest request) {
+ return updateUserWorkloadsSecretCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a user workloads Secret.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * UpdateUserWorkloadsSecretRequest request =
+ * UpdateUserWorkloadsSecretRequest.newBuilder()
+ * .setUserWorkloadsSecret(UserWorkloadsSecret.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * environmentsClient.updateUserWorkloadsSecretCallable().futureCall(request);
+ * // Do something.
+ * UserWorkloadsSecret response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ updateUserWorkloadsSecretCallable() {
+ return stub.updateUserWorkloadsSecretCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a user workloads Secret.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * UserWorkloadsSecretName name =
+ * UserWorkloadsSecretName.of(
+ * "[PROJECT]", "[LOCATION]", "[ENVIRONMENT]", "[USER_WORKLOADS_SECRET]");
+ * environmentsClient.deleteUserWorkloadsSecret(name);
+ * }
+ * }
+ *
+ * @param name Required. The Secret to delete, in the form:
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteUserWorkloadsSecret(UserWorkloadsSecretName name) {
+ DeleteUserWorkloadsSecretRequest request =
+ DeleteUserWorkloadsSecretRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteUserWorkloadsSecret(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a user workloads Secret.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * String name =
+ * UserWorkloadsSecretName.of(
+ * "[PROJECT]", "[LOCATION]", "[ENVIRONMENT]", "[USER_WORKLOADS_SECRET]")
+ * .toString();
+ * environmentsClient.deleteUserWorkloadsSecret(name);
+ * }
+ * }
+ *
+ * @param name Required. The Secret to delete, in the form:
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteUserWorkloadsSecret(String name) {
+ DeleteUserWorkloadsSecretRequest request =
+ DeleteUserWorkloadsSecretRequest.newBuilder().setName(name).build();
+ deleteUserWorkloadsSecret(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a user workloads Secret.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * DeleteUserWorkloadsSecretRequest request =
+ * DeleteUserWorkloadsSecretRequest.newBuilder()
+ * .setName(
+ * UserWorkloadsSecretName.of(
+ * "[PROJECT]", "[LOCATION]", "[ENVIRONMENT]", "[USER_WORKLOADS_SECRET]")
+ * .toString())
+ * .build();
+ * environmentsClient.deleteUserWorkloadsSecret(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 void deleteUserWorkloadsSecret(DeleteUserWorkloadsSecretRequest request) {
+ deleteUserWorkloadsSecretCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a user workloads Secret.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * DeleteUserWorkloadsSecretRequest request =
+ * DeleteUserWorkloadsSecretRequest.newBuilder()
+ * .setName(
+ * UserWorkloadsSecretName.of(
+ * "[PROJECT]", "[LOCATION]", "[ENVIRONMENT]", "[USER_WORKLOADS_SECRET]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * environmentsClient.deleteUserWorkloadsSecretCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ deleteUserWorkloadsSecretCallable() {
+ return stub.deleteUserWorkloadsSecretCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a user workloads ConfigMap.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * EnvironmentName parent = EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]");
+ * UserWorkloadsConfigMap userWorkloadsConfigMap = UserWorkloadsConfigMap.newBuilder().build();
+ * UserWorkloadsConfigMap response =
+ * environmentsClient.createUserWorkloadsConfigMap(parent, userWorkloadsConfigMap);
+ * }
+ * }
+ *
+ * @param parent Required. The environment name to create a ConfigMap for, in the form:
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+ * @param userWorkloadsConfigMap Required. User workloads ConfigMap to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UserWorkloadsConfigMap createUserWorkloadsConfigMap(
+ EnvironmentName parent, UserWorkloadsConfigMap userWorkloadsConfigMap) {
+ CreateUserWorkloadsConfigMapRequest request =
+ CreateUserWorkloadsConfigMapRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setUserWorkloadsConfigMap(userWorkloadsConfigMap)
+ .build();
+ return createUserWorkloadsConfigMap(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a user workloads ConfigMap.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * String parent = EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString();
+ * UserWorkloadsConfigMap userWorkloadsConfigMap = UserWorkloadsConfigMap.newBuilder().build();
+ * UserWorkloadsConfigMap response =
+ * environmentsClient.createUserWorkloadsConfigMap(parent, userWorkloadsConfigMap);
+ * }
+ * }
+ *
+ * @param parent Required. The environment name to create a ConfigMap for, in the form:
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+ * @param userWorkloadsConfigMap Required. User workloads ConfigMap to create.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UserWorkloadsConfigMap createUserWorkloadsConfigMap(
+ String parent, UserWorkloadsConfigMap userWorkloadsConfigMap) {
+ CreateUserWorkloadsConfigMapRequest request =
+ CreateUserWorkloadsConfigMapRequest.newBuilder()
+ .setParent(parent)
+ .setUserWorkloadsConfigMap(userWorkloadsConfigMap)
+ .build();
+ return createUserWorkloadsConfigMap(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a user workloads ConfigMap.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * CreateUserWorkloadsConfigMapRequest request =
+ * CreateUserWorkloadsConfigMapRequest.newBuilder()
+ * .setParent(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString())
+ * .setUserWorkloadsConfigMap(UserWorkloadsConfigMap.newBuilder().build())
+ * .build();
+ * UserWorkloadsConfigMap response = environmentsClient.createUserWorkloadsConfigMap(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 UserWorkloadsConfigMap createUserWorkloadsConfigMap(
+ CreateUserWorkloadsConfigMapRequest request) {
+ return createUserWorkloadsConfigMapCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a user workloads ConfigMap.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * CreateUserWorkloadsConfigMapRequest request =
+ * CreateUserWorkloadsConfigMapRequest.newBuilder()
+ * .setParent(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString())
+ * .setUserWorkloadsConfigMap(UserWorkloadsConfigMap.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * environmentsClient.createUserWorkloadsConfigMapCallable().futureCall(request);
+ * // Do something.
+ * UserWorkloadsConfigMap response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ createUserWorkloadsConfigMapCallable() {
+ return stub.createUserWorkloadsConfigMapCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an existing user workloads ConfigMap.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * UserWorkloadsConfigMapName name =
+ * UserWorkloadsConfigMapName.of(
+ * "[PROJECT]", "[LOCATION]", "[ENVIRONMENT]", "[USER_WORKLOADS_CONFIG_MAP]");
+ * UserWorkloadsConfigMap response = environmentsClient.getUserWorkloadsConfigMap(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the ConfigMap to get, in the form:
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UserWorkloadsConfigMap getUserWorkloadsConfigMap(UserWorkloadsConfigMapName name) {
+ GetUserWorkloadsConfigMapRequest request =
+ GetUserWorkloadsConfigMapRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getUserWorkloadsConfigMap(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an existing user workloads ConfigMap.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * String name =
+ * UserWorkloadsConfigMapName.of(
+ * "[PROJECT]", "[LOCATION]", "[ENVIRONMENT]", "[USER_WORKLOADS_CONFIG_MAP]")
+ * .toString();
+ * UserWorkloadsConfigMap response = environmentsClient.getUserWorkloadsConfigMap(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the ConfigMap to get, in the form:
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UserWorkloadsConfigMap getUserWorkloadsConfigMap(String name) {
+ GetUserWorkloadsConfigMapRequest request =
+ GetUserWorkloadsConfigMapRequest.newBuilder().setName(name).build();
+ return getUserWorkloadsConfigMap(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an existing user workloads ConfigMap.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * GetUserWorkloadsConfigMapRequest request =
+ * GetUserWorkloadsConfigMapRequest.newBuilder()
+ * .setName(
+ * UserWorkloadsConfigMapName.of(
+ * "[PROJECT]", "[LOCATION]", "[ENVIRONMENT]", "[USER_WORKLOADS_CONFIG_MAP]")
+ * .toString())
+ * .build();
+ * UserWorkloadsConfigMap response = environmentsClient.getUserWorkloadsConfigMap(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 UserWorkloadsConfigMap getUserWorkloadsConfigMap(
+ GetUserWorkloadsConfigMapRequest request) {
+ return getUserWorkloadsConfigMapCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an existing user workloads ConfigMap.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * GetUserWorkloadsConfigMapRequest request =
+ * GetUserWorkloadsConfigMapRequest.newBuilder()
+ * .setName(
+ * UserWorkloadsConfigMapName.of(
+ * "[PROJECT]", "[LOCATION]", "[ENVIRONMENT]", "[USER_WORKLOADS_CONFIG_MAP]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * environmentsClient.getUserWorkloadsConfigMapCallable().futureCall(request);
+ * // Do something.
+ * UserWorkloadsConfigMap response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ getUserWorkloadsConfigMapCallable() {
+ return stub.getUserWorkloadsConfigMapCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists user workloads ConfigMaps.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * EnvironmentName parent = EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]");
+ * for (UserWorkloadsConfigMap element :
+ * environmentsClient.listUserWorkloadsConfigMaps(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. List ConfigMaps in the given environment, in the form:
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListUserWorkloadsConfigMapsPagedResponse listUserWorkloadsConfigMaps(
+ EnvironmentName parent) {
+ ListUserWorkloadsConfigMapsRequest request =
+ ListUserWorkloadsConfigMapsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listUserWorkloadsConfigMaps(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists user workloads ConfigMaps.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * String parent = EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString();
+ * for (UserWorkloadsConfigMap element :
+ * environmentsClient.listUserWorkloadsConfigMaps(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. List ConfigMaps in the given environment, in the form:
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListUserWorkloadsConfigMapsPagedResponse listUserWorkloadsConfigMaps(String parent) {
+ ListUserWorkloadsConfigMapsRequest request =
+ ListUserWorkloadsConfigMapsRequest.newBuilder().setParent(parent).build();
+ return listUserWorkloadsConfigMaps(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists user workloads ConfigMaps.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * ListUserWorkloadsConfigMapsRequest request =
+ * ListUserWorkloadsConfigMapsRequest.newBuilder()
+ * .setParent(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (UserWorkloadsConfigMap element :
+ * environmentsClient.listUserWorkloadsConfigMaps(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 ListUserWorkloadsConfigMapsPagedResponse listUserWorkloadsConfigMaps(
+ ListUserWorkloadsConfigMapsRequest request) {
+ return listUserWorkloadsConfigMapsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists user workloads ConfigMaps.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * ListUserWorkloadsConfigMapsRequest request =
+ * ListUserWorkloadsConfigMapsRequest.newBuilder()
+ * .setParent(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * environmentsClient.listUserWorkloadsConfigMapsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (UserWorkloadsConfigMap element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListUserWorkloadsConfigMapsRequest, ListUserWorkloadsConfigMapsPagedResponse>
+ listUserWorkloadsConfigMapsPagedCallable() {
+ return stub.listUserWorkloadsConfigMapsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists user workloads ConfigMaps.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * ListUserWorkloadsConfigMapsRequest request =
+ * ListUserWorkloadsConfigMapsRequest.newBuilder()
+ * .setParent(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListUserWorkloadsConfigMapsResponse response =
+ * environmentsClient.listUserWorkloadsConfigMapsCallable().call(request);
+ * for (UserWorkloadsConfigMap element : response.getUserWorkloadsConfigMapsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListUserWorkloadsConfigMapsRequest, ListUserWorkloadsConfigMapsResponse>
+ listUserWorkloadsConfigMapsCallable() {
+ return stub.listUserWorkloadsConfigMapsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a user workloads ConfigMap.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * UserWorkloadsConfigMap userWorkloadsConfigMap = UserWorkloadsConfigMap.newBuilder().build();
+ * UserWorkloadsConfigMap response =
+ * environmentsClient.updateUserWorkloadsConfigMap(userWorkloadsConfigMap);
+ * }
+ * }
+ *
+ * @param userWorkloadsConfigMap Optional. User workloads ConfigMap to override.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UserWorkloadsConfigMap updateUserWorkloadsConfigMap(
+ UserWorkloadsConfigMap userWorkloadsConfigMap) {
+ UpdateUserWorkloadsConfigMapRequest request =
+ UpdateUserWorkloadsConfigMapRequest.newBuilder()
+ .setUserWorkloadsConfigMap(userWorkloadsConfigMap)
+ .build();
+ return updateUserWorkloadsConfigMap(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a user workloads ConfigMap.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * UpdateUserWorkloadsConfigMapRequest request =
+ * UpdateUserWorkloadsConfigMapRequest.newBuilder()
+ * .setUserWorkloadsConfigMap(UserWorkloadsConfigMap.newBuilder().build())
+ * .build();
+ * UserWorkloadsConfigMap response = environmentsClient.updateUserWorkloadsConfigMap(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 UserWorkloadsConfigMap updateUserWorkloadsConfigMap(
+ UpdateUserWorkloadsConfigMapRequest request) {
+ return updateUserWorkloadsConfigMapCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a user workloads ConfigMap.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * UpdateUserWorkloadsConfigMapRequest request =
+ * UpdateUserWorkloadsConfigMapRequest.newBuilder()
+ * .setUserWorkloadsConfigMap(UserWorkloadsConfigMap.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * environmentsClient.updateUserWorkloadsConfigMapCallable().futureCall(request);
+ * // Do something.
+ * UserWorkloadsConfigMap response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ updateUserWorkloadsConfigMapCallable() {
+ return stub.updateUserWorkloadsConfigMapCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a user workloads ConfigMap.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * UserWorkloadsConfigMapName name =
+ * UserWorkloadsConfigMapName.of(
+ * "[PROJECT]", "[LOCATION]", "[ENVIRONMENT]", "[USER_WORKLOADS_CONFIG_MAP]");
+ * environmentsClient.deleteUserWorkloadsConfigMap(name);
+ * }
+ * }
+ *
+ * @param name Required. The ConfigMap to delete, in the form:
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteUserWorkloadsConfigMap(UserWorkloadsConfigMapName name) {
+ DeleteUserWorkloadsConfigMapRequest request =
+ DeleteUserWorkloadsConfigMapRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteUserWorkloadsConfigMap(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a user workloads ConfigMap.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * String name =
+ * UserWorkloadsConfigMapName.of(
+ * "[PROJECT]", "[LOCATION]", "[ENVIRONMENT]", "[USER_WORKLOADS_CONFIG_MAP]")
+ * .toString();
+ * environmentsClient.deleteUserWorkloadsConfigMap(name);
+ * }
+ * }
+ *
+ * @param name Required. The ConfigMap to delete, in the form:
+ * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteUserWorkloadsConfigMap(String name) {
+ DeleteUserWorkloadsConfigMapRequest request =
+ DeleteUserWorkloadsConfigMapRequest.newBuilder().setName(name).build();
+ deleteUserWorkloadsConfigMap(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a user workloads ConfigMap.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * DeleteUserWorkloadsConfigMapRequest request =
+ * DeleteUserWorkloadsConfigMapRequest.newBuilder()
+ * .setName(
+ * UserWorkloadsConfigMapName.of(
+ * "[PROJECT]", "[LOCATION]", "[ENVIRONMENT]", "[USER_WORKLOADS_CONFIG_MAP]")
+ * .toString())
+ * .build();
+ * environmentsClient.deleteUserWorkloadsConfigMap(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 void deleteUserWorkloadsConfigMap(DeleteUserWorkloadsConfigMapRequest request) {
+ deleteUserWorkloadsConfigMapCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a user workloads ConfigMap.
+ *
+ * This method is supported for Cloud Composer environments in versions
+ * composer-3.*.*-airflow-*.*.* and newer.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * DeleteUserWorkloadsConfigMapRequest request =
+ * DeleteUserWorkloadsConfigMapRequest.newBuilder()
+ * .setName(
+ * UserWorkloadsConfigMapName.of(
+ * "[PROJECT]", "[LOCATION]", "[ENVIRONMENT]", "[USER_WORKLOADS_CONFIG_MAP]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * environmentsClient.deleteUserWorkloadsConfigMapCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ deleteUserWorkloadsConfigMapCallable() {
+ return stub.deleteUserWorkloadsConfigMapCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a snapshots of a Cloud Composer environment.
+ *
+ * As a result of this operation, snapshot of environment's state is stored in a location
+ * specified in the SaveSnapshotRequest.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * SaveSnapshotRequest request =
+ * SaveSnapshotRequest.newBuilder()
+ * .setEnvironment("environment-85904877")
+ * .setSnapshotLocation("snapshotLocation1625609625")
+ * .build();
+ * SaveSnapshotResponse response = environmentsClient.saveSnapshotAsync(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 saveSnapshotAsync(
+ SaveSnapshotRequest request) {
+ return saveSnapshotOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a snapshots of a Cloud Composer environment.
+ *
+ * As a result of this operation, snapshot of environment's state is stored in a location
+ * specified in the SaveSnapshotRequest.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * SaveSnapshotRequest request =
+ * SaveSnapshotRequest.newBuilder()
+ * .setEnvironment("environment-85904877")
+ * .setSnapshotLocation("snapshotLocation1625609625")
+ * .build();
+ * OperationFuture future =
+ * environmentsClient.saveSnapshotOperationCallable().futureCall(request);
+ * // Do something.
+ * SaveSnapshotResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ saveSnapshotOperationCallable() {
+ return stub.saveSnapshotOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a snapshots of a Cloud Composer environment.
+ *
+ * As a result of this operation, snapshot of environment's state is stored in a location
+ * specified in the SaveSnapshotRequest.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * SaveSnapshotRequest request =
+ * SaveSnapshotRequest.newBuilder()
+ * .setEnvironment("environment-85904877")
+ * .setSnapshotLocation("snapshotLocation1625609625")
+ * .build();
+ * ApiFuture future = environmentsClient.saveSnapshotCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable saveSnapshotCallable() {
+ return stub.saveSnapshotCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Loads a snapshot of a Cloud Composer environment.
+ *
+ * As a result of this operation, a snapshot of environment's specified in LoadSnapshotRequest
+ * is loaded into the environment.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * LoadSnapshotRequest request =
+ * LoadSnapshotRequest.newBuilder()
+ * .setEnvironment("environment-85904877")
+ * .setSnapshotPath("snapshotPath-931648503")
+ * .setSkipPypiPackagesInstallation(true)
+ * .setSkipEnvironmentVariablesSetting(true)
+ * .setSkipAirflowOverridesSetting(true)
+ * .setSkipGcsDataCopying(true)
+ * .build();
+ * LoadSnapshotResponse response = environmentsClient.loadSnapshotAsync(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 loadSnapshotAsync(
+ LoadSnapshotRequest request) {
+ return loadSnapshotOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Loads a snapshot of a Cloud Composer environment.
+ *
+ * As a result of this operation, a snapshot of environment's specified in LoadSnapshotRequest
+ * is loaded into the environment.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * LoadSnapshotRequest request =
+ * LoadSnapshotRequest.newBuilder()
+ * .setEnvironment("environment-85904877")
+ * .setSnapshotPath("snapshotPath-931648503")
+ * .setSkipPypiPackagesInstallation(true)
+ * .setSkipEnvironmentVariablesSetting(true)
+ * .setSkipAirflowOverridesSetting(true)
+ * .setSkipGcsDataCopying(true)
+ * .build();
+ * OperationFuture future =
+ * environmentsClient.loadSnapshotOperationCallable().futureCall(request);
+ * // Do something.
+ * LoadSnapshotResponse response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable
+ loadSnapshotOperationCallable() {
+ return stub.loadSnapshotOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Loads a snapshot of a Cloud Composer environment.
+ *
+ * As a result of this operation, a snapshot of environment's specified in LoadSnapshotRequest
+ * is loaded into the environment.
+ *
+ *
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 (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ * LoadSnapshotRequest request =
* LoadSnapshotRequest.newBuilder()
* .setEnvironment("environment-85904877")
* .setSnapshotPath("snapshotPath-931648503")
@@ -1687,4 +3507,284 @@ protected ListEnvironmentsFixedSizeCollection createCollection(
return new ListEnvironmentsFixedSizeCollection(pages, collectionSize);
}
}
+
+ public static class ListWorkloadsPagedResponse
+ extends AbstractPagedListResponse<
+ ListWorkloadsRequest,
+ ListWorkloadsResponse,
+ ListWorkloadsResponse.ComposerWorkload,
+ ListWorkloadsPage,
+ ListWorkloadsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext<
+ ListWorkloadsRequest, ListWorkloadsResponse, ListWorkloadsResponse.ComposerWorkload>
+ context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListWorkloadsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListWorkloadsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListWorkloadsPagedResponse(ListWorkloadsPage page) {
+ super(page, ListWorkloadsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListWorkloadsPage
+ extends AbstractPage<
+ ListWorkloadsRequest,
+ ListWorkloadsResponse,
+ ListWorkloadsResponse.ComposerWorkload,
+ ListWorkloadsPage> {
+
+ private ListWorkloadsPage(
+ PageContext<
+ ListWorkloadsRequest, ListWorkloadsResponse, ListWorkloadsResponse.ComposerWorkload>
+ context,
+ ListWorkloadsResponse response) {
+ super(context, response);
+ }
+
+ private static ListWorkloadsPage createEmptyPage() {
+ return new ListWorkloadsPage(null, null);
+ }
+
+ @Override
+ protected ListWorkloadsPage createPage(
+ PageContext<
+ ListWorkloadsRequest, ListWorkloadsResponse, ListWorkloadsResponse.ComposerWorkload>
+ context,
+ ListWorkloadsResponse response) {
+ return new ListWorkloadsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext<
+ ListWorkloadsRequest, ListWorkloadsResponse, ListWorkloadsResponse.ComposerWorkload>
+ context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListWorkloadsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListWorkloadsRequest,
+ ListWorkloadsResponse,
+ ListWorkloadsResponse.ComposerWorkload,
+ ListWorkloadsPage,
+ ListWorkloadsFixedSizeCollection> {
+
+ private ListWorkloadsFixedSizeCollection(List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListWorkloadsFixedSizeCollection createEmptyCollection() {
+ return new ListWorkloadsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListWorkloadsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListWorkloadsFixedSizeCollection(pages, collectionSize);
+ }
+ }
+
+ public static class ListUserWorkloadsSecretsPagedResponse
+ extends AbstractPagedListResponse<
+ ListUserWorkloadsSecretsRequest,
+ ListUserWorkloadsSecretsResponse,
+ UserWorkloadsSecret,
+ ListUserWorkloadsSecretsPage,
+ ListUserWorkloadsSecretsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext<
+ ListUserWorkloadsSecretsRequest,
+ ListUserWorkloadsSecretsResponse,
+ UserWorkloadsSecret>
+ context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListUserWorkloadsSecretsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListUserWorkloadsSecretsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListUserWorkloadsSecretsPagedResponse(ListUserWorkloadsSecretsPage page) {
+ super(page, ListUserWorkloadsSecretsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListUserWorkloadsSecretsPage
+ extends AbstractPage<
+ ListUserWorkloadsSecretsRequest,
+ ListUserWorkloadsSecretsResponse,
+ UserWorkloadsSecret,
+ ListUserWorkloadsSecretsPage> {
+
+ private ListUserWorkloadsSecretsPage(
+ PageContext<
+ ListUserWorkloadsSecretsRequest,
+ ListUserWorkloadsSecretsResponse,
+ UserWorkloadsSecret>
+ context,
+ ListUserWorkloadsSecretsResponse response) {
+ super(context, response);
+ }
+
+ private static ListUserWorkloadsSecretsPage createEmptyPage() {
+ return new ListUserWorkloadsSecretsPage(null, null);
+ }
+
+ @Override
+ protected ListUserWorkloadsSecretsPage createPage(
+ PageContext<
+ ListUserWorkloadsSecretsRequest,
+ ListUserWorkloadsSecretsResponse,
+ UserWorkloadsSecret>
+ context,
+ ListUserWorkloadsSecretsResponse response) {
+ return new ListUserWorkloadsSecretsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext<
+ ListUserWorkloadsSecretsRequest,
+ ListUserWorkloadsSecretsResponse,
+ UserWorkloadsSecret>
+ context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListUserWorkloadsSecretsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListUserWorkloadsSecretsRequest,
+ ListUserWorkloadsSecretsResponse,
+ UserWorkloadsSecret,
+ ListUserWorkloadsSecretsPage,
+ ListUserWorkloadsSecretsFixedSizeCollection> {
+
+ private ListUserWorkloadsSecretsFixedSizeCollection(
+ List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListUserWorkloadsSecretsFixedSizeCollection createEmptyCollection() {
+ return new ListUserWorkloadsSecretsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListUserWorkloadsSecretsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListUserWorkloadsSecretsFixedSizeCollection(pages, collectionSize);
+ }
+ }
+
+ public static class ListUserWorkloadsConfigMapsPagedResponse
+ extends AbstractPagedListResponse<
+ ListUserWorkloadsConfigMapsRequest,
+ ListUserWorkloadsConfigMapsResponse,
+ UserWorkloadsConfigMap,
+ ListUserWorkloadsConfigMapsPage,
+ ListUserWorkloadsConfigMapsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext<
+ ListUserWorkloadsConfigMapsRequest,
+ ListUserWorkloadsConfigMapsResponse,
+ UserWorkloadsConfigMap>
+ context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListUserWorkloadsConfigMapsPage.createEmptyPage()
+ .createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListUserWorkloadsConfigMapsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListUserWorkloadsConfigMapsPagedResponse(ListUserWorkloadsConfigMapsPage page) {
+ super(page, ListUserWorkloadsConfigMapsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListUserWorkloadsConfigMapsPage
+ extends AbstractPage<
+ ListUserWorkloadsConfigMapsRequest,
+ ListUserWorkloadsConfigMapsResponse,
+ UserWorkloadsConfigMap,
+ ListUserWorkloadsConfigMapsPage> {
+
+ private ListUserWorkloadsConfigMapsPage(
+ PageContext<
+ ListUserWorkloadsConfigMapsRequest,
+ ListUserWorkloadsConfigMapsResponse,
+ UserWorkloadsConfigMap>
+ context,
+ ListUserWorkloadsConfigMapsResponse response) {
+ super(context, response);
+ }
+
+ private static ListUserWorkloadsConfigMapsPage createEmptyPage() {
+ return new ListUserWorkloadsConfigMapsPage(null, null);
+ }
+
+ @Override
+ protected ListUserWorkloadsConfigMapsPage createPage(
+ PageContext<
+ ListUserWorkloadsConfigMapsRequest,
+ ListUserWorkloadsConfigMapsResponse,
+ UserWorkloadsConfigMap>
+ context,
+ ListUserWorkloadsConfigMapsResponse response) {
+ return new ListUserWorkloadsConfigMapsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext<
+ ListUserWorkloadsConfigMapsRequest,
+ ListUserWorkloadsConfigMapsResponse,
+ UserWorkloadsConfigMap>
+ context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListUserWorkloadsConfigMapsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListUserWorkloadsConfigMapsRequest,
+ ListUserWorkloadsConfigMapsResponse,
+ UserWorkloadsConfigMap,
+ ListUserWorkloadsConfigMapsPage,
+ ListUserWorkloadsConfigMapsFixedSizeCollection> {
+
+ private ListUserWorkloadsConfigMapsFixedSizeCollection(
+ List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListUserWorkloadsConfigMapsFixedSizeCollection createEmptyCollection() {
+ return new ListUserWorkloadsConfigMapsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListUserWorkloadsConfigMapsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListUserWorkloadsConfigMapsFixedSizeCollection(pages, collectionSize);
+ }
+ }
}
diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsSettings.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsSettings.java
index ef1c6dbab570..ca26731c623e 100644
--- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsSettings.java
+++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsSettings.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 Google LLC
+ * Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,9 @@
package com.google.cloud.orchestration.airflow.service.v1;
import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListEnvironmentsPagedResponse;
+import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListUserWorkloadsConfigMapsPagedResponse;
+import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListUserWorkloadsSecretsPagedResponse;
+import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListWorkloadsPagedResponse;
import com.google.api.core.ApiFunction;
import com.google.api.core.BetaApi;
@@ -140,6 +143,78 @@ public UnaryCallSettings deleteEnvironmentS
return ((EnvironmentsStubSettings) getStubSettings()).pollAirflowCommandSettings();
}
+ /** Returns the object with the settings used for calls to listWorkloads. */
+ public PagedCallSettings
+ listWorkloadsSettings() {
+ return ((EnvironmentsStubSettings) getStubSettings()).listWorkloadsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to createUserWorkloadsSecret. */
+ public UnaryCallSettings
+ createUserWorkloadsSecretSettings() {
+ return ((EnvironmentsStubSettings) getStubSettings()).createUserWorkloadsSecretSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getUserWorkloadsSecret. */
+ public UnaryCallSettings
+ getUserWorkloadsSecretSettings() {
+ return ((EnvironmentsStubSettings) getStubSettings()).getUserWorkloadsSecretSettings();
+ }
+
+ /** Returns the object with the settings used for calls to listUserWorkloadsSecrets. */
+ public PagedCallSettings<
+ ListUserWorkloadsSecretsRequest,
+ ListUserWorkloadsSecretsResponse,
+ ListUserWorkloadsSecretsPagedResponse>
+ listUserWorkloadsSecretsSettings() {
+ return ((EnvironmentsStubSettings) getStubSettings()).listUserWorkloadsSecretsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to updateUserWorkloadsSecret. */
+ public UnaryCallSettings
+ updateUserWorkloadsSecretSettings() {
+ return ((EnvironmentsStubSettings) getStubSettings()).updateUserWorkloadsSecretSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteUserWorkloadsSecret. */
+ public UnaryCallSettings
+ deleteUserWorkloadsSecretSettings() {
+ return ((EnvironmentsStubSettings) getStubSettings()).deleteUserWorkloadsSecretSettings();
+ }
+
+ /** Returns the object with the settings used for calls to createUserWorkloadsConfigMap. */
+ public UnaryCallSettings
+ createUserWorkloadsConfigMapSettings() {
+ return ((EnvironmentsStubSettings) getStubSettings()).createUserWorkloadsConfigMapSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getUserWorkloadsConfigMap. */
+ public UnaryCallSettings
+ getUserWorkloadsConfigMapSettings() {
+ return ((EnvironmentsStubSettings) getStubSettings()).getUserWorkloadsConfigMapSettings();
+ }
+
+ /** Returns the object with the settings used for calls to listUserWorkloadsConfigMaps. */
+ public PagedCallSettings<
+ ListUserWorkloadsConfigMapsRequest,
+ ListUserWorkloadsConfigMapsResponse,
+ ListUserWorkloadsConfigMapsPagedResponse>
+ listUserWorkloadsConfigMapsSettings() {
+ return ((EnvironmentsStubSettings) getStubSettings()).listUserWorkloadsConfigMapsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to updateUserWorkloadsConfigMap. */
+ public UnaryCallSettings
+ updateUserWorkloadsConfigMapSettings() {
+ return ((EnvironmentsStubSettings) getStubSettings()).updateUserWorkloadsConfigMapSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteUserWorkloadsConfigMap. */
+ public UnaryCallSettings
+ deleteUserWorkloadsConfigMapSettings() {
+ return ((EnvironmentsStubSettings) getStubSettings()).deleteUserWorkloadsConfigMapSettings();
+ }
+
/** Returns the object with the settings used for calls to saveSnapshot. */
public UnaryCallSettings saveSnapshotSettings() {
return ((EnvironmentsStubSettings) getStubSettings()).saveSnapshotSettings();
@@ -220,7 +295,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
return EnvironmentsStubSettings.defaultTransportChannelProvider();
}
- @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return EnvironmentsStubSettings.defaultApiClientHeaderProviderBuilder();
}
@@ -360,6 +434,79 @@ public UnaryCallSettings.Builder getEnvironm
return getStubSettingsBuilder().pollAirflowCommandSettings();
}
+ /** Returns the builder for the settings used for calls to listWorkloads. */
+ public PagedCallSettings.Builder<
+ ListWorkloadsRequest, ListWorkloadsResponse, ListWorkloadsPagedResponse>
+ listWorkloadsSettings() {
+ return getStubSettingsBuilder().listWorkloadsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to createUserWorkloadsSecret. */
+ public UnaryCallSettings.Builder
+ createUserWorkloadsSecretSettings() {
+ return getStubSettingsBuilder().createUserWorkloadsSecretSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getUserWorkloadsSecret. */
+ public UnaryCallSettings.Builder
+ getUserWorkloadsSecretSettings() {
+ return getStubSettingsBuilder().getUserWorkloadsSecretSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listUserWorkloadsSecrets. */
+ public PagedCallSettings.Builder<
+ ListUserWorkloadsSecretsRequest,
+ ListUserWorkloadsSecretsResponse,
+ ListUserWorkloadsSecretsPagedResponse>
+ listUserWorkloadsSecretsSettings() {
+ return getStubSettingsBuilder().listUserWorkloadsSecretsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to updateUserWorkloadsSecret. */
+ public UnaryCallSettings.Builder
+ updateUserWorkloadsSecretSettings() {
+ return getStubSettingsBuilder().updateUserWorkloadsSecretSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteUserWorkloadsSecret. */
+ public UnaryCallSettings.Builder
+ deleteUserWorkloadsSecretSettings() {
+ return getStubSettingsBuilder().deleteUserWorkloadsSecretSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to createUserWorkloadsConfigMap. */
+ public UnaryCallSettings.Builder
+ createUserWorkloadsConfigMapSettings() {
+ return getStubSettingsBuilder().createUserWorkloadsConfigMapSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getUserWorkloadsConfigMap. */
+ public UnaryCallSettings.Builder
+ getUserWorkloadsConfigMapSettings() {
+ return getStubSettingsBuilder().getUserWorkloadsConfigMapSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listUserWorkloadsConfigMaps. */
+ public PagedCallSettings.Builder<
+ ListUserWorkloadsConfigMapsRequest,
+ ListUserWorkloadsConfigMapsResponse,
+ ListUserWorkloadsConfigMapsPagedResponse>
+ listUserWorkloadsConfigMapsSettings() {
+ return getStubSettingsBuilder().listUserWorkloadsConfigMapsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to updateUserWorkloadsConfigMap. */
+ public UnaryCallSettings.Builder
+ updateUserWorkloadsConfigMapSettings() {
+ return getStubSettingsBuilder().updateUserWorkloadsConfigMapSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteUserWorkloadsConfigMap. */
+ public UnaryCallSettings.Builder
+ deleteUserWorkloadsConfigMapSettings() {
+ return getStubSettingsBuilder().deleteUserWorkloadsConfigMapSettings();
+ }
+
/** Returns the builder for the settings used for calls to saveSnapshot. */
public UnaryCallSettings.Builder saveSnapshotSettings() {
return getStubSettingsBuilder().saveSnapshotSettings();
diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsClient.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsClient.java
index f42b6d0c69b6..35939b7937e5 100644
--- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsClient.java
+++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsClient.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 Google LLC
+ * Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsSettings.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsSettings.java
index bd5e667d3e97..f1ae763bece8 100644
--- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsSettings.java
+++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsSettings.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 Google LLC
+ * Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -122,7 +122,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
return ImageVersionsStubSettings.defaultTransportChannelProvider();
}
- @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return ImageVersionsStubSettings.defaultApiClientHeaderProviderBuilder();
}
diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/gapic_metadata.json b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/gapic_metadata.json
index 053720a2033e..ef1a95f788a1 100644
--- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/gapic_metadata.json
+++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/gapic_metadata.json
@@ -13,12 +13,24 @@
"CreateEnvironment": {
"methods": ["createEnvironmentAsync", "createEnvironmentAsync", "createEnvironmentOperationCallable", "createEnvironmentCallable"]
},
+ "CreateUserWorkloadsConfigMap": {
+ "methods": ["createUserWorkloadsConfigMap", "createUserWorkloadsConfigMap", "createUserWorkloadsConfigMap", "createUserWorkloadsConfigMapCallable"]
+ },
+ "CreateUserWorkloadsSecret": {
+ "methods": ["createUserWorkloadsSecret", "createUserWorkloadsSecret", "createUserWorkloadsSecret", "createUserWorkloadsSecretCallable"]
+ },
"DatabaseFailover": {
"methods": ["databaseFailoverAsync", "databaseFailoverOperationCallable", "databaseFailoverCallable"]
},
"DeleteEnvironment": {
"methods": ["deleteEnvironmentAsync", "deleteEnvironmentAsync", "deleteEnvironmentOperationCallable", "deleteEnvironmentCallable"]
},
+ "DeleteUserWorkloadsConfigMap": {
+ "methods": ["deleteUserWorkloadsConfigMap", "deleteUserWorkloadsConfigMap", "deleteUserWorkloadsConfigMap", "deleteUserWorkloadsConfigMapCallable"]
+ },
+ "DeleteUserWorkloadsSecret": {
+ "methods": ["deleteUserWorkloadsSecret", "deleteUserWorkloadsSecret", "deleteUserWorkloadsSecret", "deleteUserWorkloadsSecretCallable"]
+ },
"ExecuteAirflowCommand": {
"methods": ["executeAirflowCommand", "executeAirflowCommandCallable"]
},
@@ -28,9 +40,24 @@
"GetEnvironment": {
"methods": ["getEnvironment", "getEnvironment", "getEnvironmentCallable"]
},
+ "GetUserWorkloadsConfigMap": {
+ "methods": ["getUserWorkloadsConfigMap", "getUserWorkloadsConfigMap", "getUserWorkloadsConfigMap", "getUserWorkloadsConfigMapCallable"]
+ },
+ "GetUserWorkloadsSecret": {
+ "methods": ["getUserWorkloadsSecret", "getUserWorkloadsSecret", "getUserWorkloadsSecret", "getUserWorkloadsSecretCallable"]
+ },
"ListEnvironments": {
"methods": ["listEnvironments", "listEnvironments", "listEnvironmentsPagedCallable", "listEnvironmentsCallable"]
},
+ "ListUserWorkloadsConfigMaps": {
+ "methods": ["listUserWorkloadsConfigMaps", "listUserWorkloadsConfigMaps", "listUserWorkloadsConfigMaps", "listUserWorkloadsConfigMapsPagedCallable", "listUserWorkloadsConfigMapsCallable"]
+ },
+ "ListUserWorkloadsSecrets": {
+ "methods": ["listUserWorkloadsSecrets", "listUserWorkloadsSecrets", "listUserWorkloadsSecrets", "listUserWorkloadsSecretsPagedCallable", "listUserWorkloadsSecretsCallable"]
+ },
+ "ListWorkloads": {
+ "methods": ["listWorkloads", "listWorkloads", "listWorkloads", "listWorkloadsPagedCallable", "listWorkloadsCallable"]
+ },
"LoadSnapshot": {
"methods": ["loadSnapshotAsync", "loadSnapshotOperationCallable", "loadSnapshotCallable"]
},
@@ -45,6 +72,12 @@
},
"UpdateEnvironment": {
"methods": ["updateEnvironmentAsync", "updateEnvironmentAsync", "updateEnvironmentOperationCallable", "updateEnvironmentCallable"]
+ },
+ "UpdateUserWorkloadsConfigMap": {
+ "methods": ["updateUserWorkloadsConfigMap", "updateUserWorkloadsConfigMap", "updateUserWorkloadsConfigMapCallable"]
+ },
+ "UpdateUserWorkloadsSecret": {
+ "methods": ["updateUserWorkloadsSecret", "updateUserWorkloadsSecret", "updateUserWorkloadsSecretCallable"]
}
}
}
diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/package-info.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/package-info.java
index 287111705998..3b148e7785ab 100644
--- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/package-info.java
+++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 Google LLC
+ * Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/EnvironmentsStub.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/EnvironmentsStub.java
index 7462516e641d..3e1947e1d152 100644
--- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/EnvironmentsStub.java
+++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/EnvironmentsStub.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 Google LLC
+ * Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,22 +17,37 @@
package com.google.cloud.orchestration.airflow.service.v1.stub;
import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListEnvironmentsPagedResponse;
+import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListUserWorkloadsConfigMapsPagedResponse;
+import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListUserWorkloadsSecretsPagedResponse;
+import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListWorkloadsPagedResponse;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest;
+import com.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest;
+import com.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest;
import com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest;
import com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse;
import com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest;
+import com.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest;
+import com.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest;
import com.google.cloud.orchestration.airflow.service.v1.Environment;
import com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest;
import com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse;
import com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest;
import com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse;
import com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest;
+import com.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest;
+import com.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest;
import com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest;
import com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse;
+import com.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest;
+import com.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse;
+import com.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest;
+import com.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse;
+import com.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest;
+import com.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse;
import com.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest;
import com.google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse;
import com.google.cloud.orchestration.airflow.service.v1.OperationMetadata;
@@ -43,6 +58,10 @@
import com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest;
import com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse;
import com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest;
+import com.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest;
+import com.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest;
+import com.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap;
+import com.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.OperationsStub;
import com.google.protobuf.Empty;
@@ -124,6 +143,81 @@ public UnaryCallable deleteEnvironmentCalla
throw new UnsupportedOperationException("Not implemented: pollAirflowCommandCallable()");
}
+ public UnaryCallable
+ listWorkloadsPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listWorkloadsPagedCallable()");
+ }
+
+ public UnaryCallable listWorkloadsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listWorkloadsCallable()");
+ }
+
+ public UnaryCallable
+ createUserWorkloadsSecretCallable() {
+ throw new UnsupportedOperationException("Not implemented: createUserWorkloadsSecretCallable()");
+ }
+
+ public UnaryCallable
+ getUserWorkloadsSecretCallable() {
+ throw new UnsupportedOperationException("Not implemented: getUserWorkloadsSecretCallable()");
+ }
+
+ public UnaryCallable
+ listUserWorkloadsSecretsPagedCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: listUserWorkloadsSecretsPagedCallable()");
+ }
+
+ public UnaryCallable
+ listUserWorkloadsSecretsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listUserWorkloadsSecretsCallable()");
+ }
+
+ public UnaryCallable
+ updateUserWorkloadsSecretCallable() {
+ throw new UnsupportedOperationException("Not implemented: updateUserWorkloadsSecretCallable()");
+ }
+
+ public UnaryCallable
+ deleteUserWorkloadsSecretCallable() {
+ throw new UnsupportedOperationException("Not implemented: deleteUserWorkloadsSecretCallable()");
+ }
+
+ public UnaryCallable
+ createUserWorkloadsConfigMapCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: createUserWorkloadsConfigMapCallable()");
+ }
+
+ public UnaryCallable
+ getUserWorkloadsConfigMapCallable() {
+ throw new UnsupportedOperationException("Not implemented: getUserWorkloadsConfigMapCallable()");
+ }
+
+ public UnaryCallable
+ listUserWorkloadsConfigMapsPagedCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: listUserWorkloadsConfigMapsPagedCallable()");
+ }
+
+ public UnaryCallable
+ listUserWorkloadsConfigMapsCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: listUserWorkloadsConfigMapsCallable()");
+ }
+
+ public UnaryCallable
+ updateUserWorkloadsConfigMapCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: updateUserWorkloadsConfigMapCallable()");
+ }
+
+ public UnaryCallable
+ deleteUserWorkloadsConfigMapCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: deleteUserWorkloadsConfigMapCallable()");
+ }
+
public OperationCallable
saveSnapshotOperationCallable() {
throw new UnsupportedOperationException("Not implemented: saveSnapshotOperationCallable()");
diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/EnvironmentsStubSettings.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/EnvironmentsStubSettings.java
index 1d94b31054b8..bad20ee77bfa 100644
--- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/EnvironmentsStubSettings.java
+++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/EnvironmentsStubSettings.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 Google LLC
+ * Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,9 @@
package com.google.cloud.orchestration.airflow.service.v1.stub;
import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListEnvironmentsPagedResponse;
+import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListUserWorkloadsConfigMapsPagedResponse;
+import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListUserWorkloadsSecretsPagedResponse;
+import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListWorkloadsPagedResponse;
import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
@@ -48,17 +51,29 @@
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest;
+import com.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest;
+import com.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest;
import com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest;
import com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse;
import com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest;
+import com.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest;
+import com.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest;
import com.google.cloud.orchestration.airflow.service.v1.Environment;
import com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest;
import com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse;
import com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest;
import com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse;
import com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest;
+import com.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest;
+import com.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest;
import com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest;
import com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse;
+import com.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest;
+import com.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse;
+import com.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest;
+import com.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse;
+import com.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest;
+import com.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse;
import com.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest;
import com.google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse;
import com.google.cloud.orchestration.airflow.service.v1.OperationMetadata;
@@ -69,6 +84,10 @@
import com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest;
import com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse;
import com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest;
+import com.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest;
+import com.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest;
+import com.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap;
+import com.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
@@ -142,6 +161,35 @@ public class EnvironmentsStubSettings extends StubSettings
pollAirflowCommandSettings;
+ private final PagedCallSettings<
+ ListWorkloadsRequest, ListWorkloadsResponse, ListWorkloadsPagedResponse>
+ listWorkloadsSettings;
+ private final UnaryCallSettings
+ createUserWorkloadsSecretSettings;
+ private final UnaryCallSettings
+ getUserWorkloadsSecretSettings;
+ private final PagedCallSettings<
+ ListUserWorkloadsSecretsRequest,
+ ListUserWorkloadsSecretsResponse,
+ ListUserWorkloadsSecretsPagedResponse>
+ listUserWorkloadsSecretsSettings;
+ private final UnaryCallSettings
+ updateUserWorkloadsSecretSettings;
+ private final UnaryCallSettings
+ deleteUserWorkloadsSecretSettings;
+ private final UnaryCallSettings
+ createUserWorkloadsConfigMapSettings;
+ private final UnaryCallSettings
+ getUserWorkloadsConfigMapSettings;
+ private final PagedCallSettings<
+ ListUserWorkloadsConfigMapsRequest,
+ ListUserWorkloadsConfigMapsResponse,
+ ListUserWorkloadsConfigMapsPagedResponse>
+ listUserWorkloadsConfigMapsSettings;
+ private final UnaryCallSettings
+ updateUserWorkloadsConfigMapSettings;
+ private final UnaryCallSettings
+ deleteUserWorkloadsConfigMapSettings;
private final UnaryCallSettings saveSnapshotSettings;
private final OperationCallSettings
saveSnapshotOperationSettings;
@@ -195,6 +243,143 @@ public Iterable extractResources(ListEnvironmentsResponse payload)
}
};
+ private static final PagedListDescriptor<
+ ListWorkloadsRequest, ListWorkloadsResponse, ListWorkloadsResponse.ComposerWorkload>
+ LIST_WORKLOADS_PAGE_STR_DESC =
+ new PagedListDescriptor<
+ ListWorkloadsRequest,
+ ListWorkloadsResponse,
+ ListWorkloadsResponse.ComposerWorkload>() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListWorkloadsRequest injectToken(ListWorkloadsRequest payload, String token) {
+ return ListWorkloadsRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListWorkloadsRequest injectPageSize(ListWorkloadsRequest payload, int pageSize) {
+ return ListWorkloadsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListWorkloadsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListWorkloadsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(
+ ListWorkloadsResponse payload) {
+ return payload.getWorkloadsList() == null
+ ? ImmutableList.of()
+ : payload.getWorkloadsList();
+ }
+ };
+
+ private static final PagedListDescriptor<
+ ListUserWorkloadsSecretsRequest, ListUserWorkloadsSecretsResponse, UserWorkloadsSecret>
+ LIST_USER_WORKLOADS_SECRETS_PAGE_STR_DESC =
+ new PagedListDescriptor<
+ ListUserWorkloadsSecretsRequest,
+ ListUserWorkloadsSecretsResponse,
+ UserWorkloadsSecret>() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListUserWorkloadsSecretsRequest injectToken(
+ ListUserWorkloadsSecretsRequest payload, String token) {
+ return ListUserWorkloadsSecretsRequest.newBuilder(payload)
+ .setPageToken(token)
+ .build();
+ }
+
+ @Override
+ public ListUserWorkloadsSecretsRequest injectPageSize(
+ ListUserWorkloadsSecretsRequest payload, int pageSize) {
+ return ListUserWorkloadsSecretsRequest.newBuilder(payload)
+ .setPageSize(pageSize)
+ .build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListUserWorkloadsSecretsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListUserWorkloadsSecretsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(
+ ListUserWorkloadsSecretsResponse payload) {
+ return payload.getUserWorkloadsSecretsList() == null
+ ? ImmutableList.of()
+ : payload.getUserWorkloadsSecretsList();
+ }
+ };
+
+ private static final PagedListDescriptor<
+ ListUserWorkloadsConfigMapsRequest,
+ ListUserWorkloadsConfigMapsResponse,
+ UserWorkloadsConfigMap>
+ LIST_USER_WORKLOADS_CONFIG_MAPS_PAGE_STR_DESC =
+ new PagedListDescriptor<
+ ListUserWorkloadsConfigMapsRequest,
+ ListUserWorkloadsConfigMapsResponse,
+ UserWorkloadsConfigMap>() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListUserWorkloadsConfigMapsRequest injectToken(
+ ListUserWorkloadsConfigMapsRequest payload, String token) {
+ return ListUserWorkloadsConfigMapsRequest.newBuilder(payload)
+ .setPageToken(token)
+ .build();
+ }
+
+ @Override
+ public ListUserWorkloadsConfigMapsRequest injectPageSize(
+ ListUserWorkloadsConfigMapsRequest payload, int pageSize) {
+ return ListUserWorkloadsConfigMapsRequest.newBuilder(payload)
+ .setPageSize(pageSize)
+ .build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListUserWorkloadsConfigMapsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListUserWorkloadsConfigMapsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(
+ ListUserWorkloadsConfigMapsResponse payload) {
+ return payload.getUserWorkloadsConfigMapsList() == null
+ ? ImmutableList.of()
+ : payload.getUserWorkloadsConfigMapsList();
+ }
+ };
+
private static final PagedListResponseFactory<
ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse>
LIST_ENVIRONMENTS_PAGE_STR_FACT =
@@ -214,6 +399,86 @@ public ApiFuture getFuturePagedResponse(
}
};
+ private static final PagedListResponseFactory<
+ ListWorkloadsRequest, ListWorkloadsResponse, ListWorkloadsPagedResponse>
+ LIST_WORKLOADS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListWorkloadsRequest, ListWorkloadsResponse, ListWorkloadsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListWorkloadsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext<
+ ListWorkloadsRequest,
+ ListWorkloadsResponse,
+ ListWorkloadsResponse.ComposerWorkload>
+ pageContext =
+ PageContext.create(callable, LIST_WORKLOADS_PAGE_STR_DESC, request, context);
+ return ListWorkloadsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
+ private static final PagedListResponseFactory<
+ ListUserWorkloadsSecretsRequest,
+ ListUserWorkloadsSecretsResponse,
+ ListUserWorkloadsSecretsPagedResponse>
+ LIST_USER_WORKLOADS_SECRETS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListUserWorkloadsSecretsRequest,
+ ListUserWorkloadsSecretsResponse,
+ ListUserWorkloadsSecretsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable
+ callable,
+ ListUserWorkloadsSecretsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext<
+ ListUserWorkloadsSecretsRequest,
+ ListUserWorkloadsSecretsResponse,
+ UserWorkloadsSecret>
+ pageContext =
+ PageContext.create(
+ callable, LIST_USER_WORKLOADS_SECRETS_PAGE_STR_DESC, request, context);
+ return ListUserWorkloadsSecretsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
+ private static final PagedListResponseFactory<
+ ListUserWorkloadsConfigMapsRequest,
+ ListUserWorkloadsConfigMapsResponse,
+ ListUserWorkloadsConfigMapsPagedResponse>
+ LIST_USER_WORKLOADS_CONFIG_MAPS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListUserWorkloadsConfigMapsRequest,
+ ListUserWorkloadsConfigMapsResponse,
+ ListUserWorkloadsConfigMapsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable<
+ ListUserWorkloadsConfigMapsRequest, ListUserWorkloadsConfigMapsResponse>
+ callable,
+ ListUserWorkloadsConfigMapsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext<
+ ListUserWorkloadsConfigMapsRequest,
+ ListUserWorkloadsConfigMapsResponse,
+ UserWorkloadsConfigMap>
+ pageContext =
+ PageContext.create(
+ callable,
+ LIST_USER_WORKLOADS_CONFIG_MAPS_PAGE_STR_DESC,
+ request,
+ context);
+ return ListUserWorkloadsConfigMapsPagedResponse.createAsync(
+ pageContext, futureResponse);
+ }
+ };
+
/** Returns the object with the settings used for calls to createEnvironment. */
public UnaryCallSettings createEnvironmentSettings() {
return createEnvironmentSettings;
@@ -277,6 +542,78 @@ public UnaryCallSettings deleteEnvironmentS
return pollAirflowCommandSettings;
}
+ /** Returns the object with the settings used for calls to listWorkloads. */
+ public PagedCallSettings
+ listWorkloadsSettings() {
+ return listWorkloadsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to createUserWorkloadsSecret. */
+ public UnaryCallSettings
+ createUserWorkloadsSecretSettings() {
+ return createUserWorkloadsSecretSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getUserWorkloadsSecret. */
+ public UnaryCallSettings
+ getUserWorkloadsSecretSettings() {
+ return getUserWorkloadsSecretSettings;
+ }
+
+ /** Returns the object with the settings used for calls to listUserWorkloadsSecrets. */
+ public PagedCallSettings<
+ ListUserWorkloadsSecretsRequest,
+ ListUserWorkloadsSecretsResponse,
+ ListUserWorkloadsSecretsPagedResponse>
+ listUserWorkloadsSecretsSettings() {
+ return listUserWorkloadsSecretsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to updateUserWorkloadsSecret. */
+ public UnaryCallSettings
+ updateUserWorkloadsSecretSettings() {
+ return updateUserWorkloadsSecretSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deleteUserWorkloadsSecret. */
+ public UnaryCallSettings
+ deleteUserWorkloadsSecretSettings() {
+ return deleteUserWorkloadsSecretSettings;
+ }
+
+ /** Returns the object with the settings used for calls to createUserWorkloadsConfigMap. */
+ public UnaryCallSettings
+ createUserWorkloadsConfigMapSettings() {
+ return createUserWorkloadsConfigMapSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getUserWorkloadsConfigMap. */
+ public UnaryCallSettings
+ getUserWorkloadsConfigMapSettings() {
+ return getUserWorkloadsConfigMapSettings;
+ }
+
+ /** Returns the object with the settings used for calls to listUserWorkloadsConfigMaps. */
+ public PagedCallSettings<
+ ListUserWorkloadsConfigMapsRequest,
+ ListUserWorkloadsConfigMapsResponse,
+ ListUserWorkloadsConfigMapsPagedResponse>
+ listUserWorkloadsConfigMapsSettings() {
+ return listUserWorkloadsConfigMapsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to updateUserWorkloadsConfigMap. */
+ public UnaryCallSettings
+ updateUserWorkloadsConfigMapSettings() {
+ return updateUserWorkloadsConfigMapSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deleteUserWorkloadsConfigMap. */
+ public UnaryCallSettings
+ deleteUserWorkloadsConfigMapSettings() {
+ return deleteUserWorkloadsConfigMapSettings;
+ }
+
/** Returns the object with the settings used for calls to saveSnapshot. */
public UnaryCallSettings saveSnapshotSettings() {
return saveSnapshotSettings;
@@ -391,7 +728,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
return defaultGrpcTransportProviderBuilder().build();
}
- @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
@@ -400,7 +736,6 @@ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProvider
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}
- @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
@@ -451,6 +786,21 @@ protected EnvironmentsStubSettings(Builder settingsBuilder) throws IOException {
executeAirflowCommandSettings = settingsBuilder.executeAirflowCommandSettings().build();
stopAirflowCommandSettings = settingsBuilder.stopAirflowCommandSettings().build();
pollAirflowCommandSettings = settingsBuilder.pollAirflowCommandSettings().build();
+ listWorkloadsSettings = settingsBuilder.listWorkloadsSettings().build();
+ createUserWorkloadsSecretSettings = settingsBuilder.createUserWorkloadsSecretSettings().build();
+ getUserWorkloadsSecretSettings = settingsBuilder.getUserWorkloadsSecretSettings().build();
+ listUserWorkloadsSecretsSettings = settingsBuilder.listUserWorkloadsSecretsSettings().build();
+ updateUserWorkloadsSecretSettings = settingsBuilder.updateUserWorkloadsSecretSettings().build();
+ deleteUserWorkloadsSecretSettings = settingsBuilder.deleteUserWorkloadsSecretSettings().build();
+ createUserWorkloadsConfigMapSettings =
+ settingsBuilder.createUserWorkloadsConfigMapSettings().build();
+ getUserWorkloadsConfigMapSettings = settingsBuilder.getUserWorkloadsConfigMapSettings().build();
+ listUserWorkloadsConfigMapsSettings =
+ settingsBuilder.listUserWorkloadsConfigMapsSettings().build();
+ updateUserWorkloadsConfigMapSettings =
+ settingsBuilder.updateUserWorkloadsConfigMapSettings().build();
+ deleteUserWorkloadsConfigMapSettings =
+ settingsBuilder.deleteUserWorkloadsConfigMapSettings().build();
saveSnapshotSettings = settingsBuilder.saveSnapshotSettings().build();
saveSnapshotOperationSettings = settingsBuilder.saveSnapshotOperationSettings().build();
loadSnapshotSettings = settingsBuilder.loadSnapshotSettings().build();
@@ -489,6 +839,38 @@ public static class Builder extends StubSettings.Builder
pollAirflowCommandSettings;
+ private final PagedCallSettings.Builder<
+ ListWorkloadsRequest, ListWorkloadsResponse, ListWorkloadsPagedResponse>
+ listWorkloadsSettings;
+ private final UnaryCallSettings.Builder
+ createUserWorkloadsSecretSettings;
+ private final UnaryCallSettings.Builder
+ getUserWorkloadsSecretSettings;
+ private final PagedCallSettings.Builder<
+ ListUserWorkloadsSecretsRequest,
+ ListUserWorkloadsSecretsResponse,
+ ListUserWorkloadsSecretsPagedResponse>
+ listUserWorkloadsSecretsSettings;
+ private final UnaryCallSettings.Builder
+ updateUserWorkloadsSecretSettings;
+ private final UnaryCallSettings.Builder
+ deleteUserWorkloadsSecretSettings;
+ private final UnaryCallSettings.Builder<
+ CreateUserWorkloadsConfigMapRequest, UserWorkloadsConfigMap>
+ createUserWorkloadsConfigMapSettings;
+ private final UnaryCallSettings.Builder<
+ GetUserWorkloadsConfigMapRequest, UserWorkloadsConfigMap>
+ getUserWorkloadsConfigMapSettings;
+ private final PagedCallSettings.Builder<
+ ListUserWorkloadsConfigMapsRequest,
+ ListUserWorkloadsConfigMapsResponse,
+ ListUserWorkloadsConfigMapsPagedResponse>
+ listUserWorkloadsConfigMapsSettings;
+ private final UnaryCallSettings.Builder<
+ UpdateUserWorkloadsConfigMapRequest, UserWorkloadsConfigMap>
+ updateUserWorkloadsConfigMapSettings;
+ private final UnaryCallSettings.Builder
+ deleteUserWorkloadsConfigMapSettings;
private final UnaryCallSettings.Builder saveSnapshotSettings;
private final OperationCallSettings.Builder<
SaveSnapshotRequest, SaveSnapshotResponse, OperationMetadata>
@@ -543,6 +925,19 @@ protected Builder(ClientContext clientContext) {
executeAirflowCommandSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
stopAirflowCommandSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
pollAirflowCommandSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ listWorkloadsSettings = PagedCallSettings.newBuilder(LIST_WORKLOADS_PAGE_STR_FACT);
+ createUserWorkloadsSecretSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ getUserWorkloadsSecretSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ listUserWorkloadsSecretsSettings =
+ PagedCallSettings.newBuilder(LIST_USER_WORKLOADS_SECRETS_PAGE_STR_FACT);
+ updateUserWorkloadsSecretSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ deleteUserWorkloadsSecretSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ createUserWorkloadsConfigMapSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ getUserWorkloadsConfigMapSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ listUserWorkloadsConfigMapsSettings =
+ PagedCallSettings.newBuilder(LIST_USER_WORKLOADS_CONFIG_MAPS_PAGE_STR_FACT);
+ updateUserWorkloadsConfigMapSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ deleteUserWorkloadsConfigMapSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
saveSnapshotSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
saveSnapshotOperationSettings = OperationCallSettings.newBuilder();
loadSnapshotSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
@@ -561,6 +956,17 @@ protected Builder(ClientContext clientContext) {
executeAirflowCommandSettings,
stopAirflowCommandSettings,
pollAirflowCommandSettings,
+ listWorkloadsSettings,
+ createUserWorkloadsSecretSettings,
+ getUserWorkloadsSecretSettings,
+ listUserWorkloadsSecretsSettings,
+ updateUserWorkloadsSecretSettings,
+ deleteUserWorkloadsSecretSettings,
+ createUserWorkloadsConfigMapSettings,
+ getUserWorkloadsConfigMapSettings,
+ listUserWorkloadsConfigMapsSettings,
+ updateUserWorkloadsConfigMapSettings,
+ deleteUserWorkloadsConfigMapSettings,
saveSnapshotSettings,
loadSnapshotSettings,
databaseFailoverSettings,
@@ -582,6 +988,21 @@ protected Builder(EnvironmentsStubSettings settings) {
executeAirflowCommandSettings = settings.executeAirflowCommandSettings.toBuilder();
stopAirflowCommandSettings = settings.stopAirflowCommandSettings.toBuilder();
pollAirflowCommandSettings = settings.pollAirflowCommandSettings.toBuilder();
+ listWorkloadsSettings = settings.listWorkloadsSettings.toBuilder();
+ createUserWorkloadsSecretSettings = settings.createUserWorkloadsSecretSettings.toBuilder();
+ getUserWorkloadsSecretSettings = settings.getUserWorkloadsSecretSettings.toBuilder();
+ listUserWorkloadsSecretsSettings = settings.listUserWorkloadsSecretsSettings.toBuilder();
+ updateUserWorkloadsSecretSettings = settings.updateUserWorkloadsSecretSettings.toBuilder();
+ deleteUserWorkloadsSecretSettings = settings.deleteUserWorkloadsSecretSettings.toBuilder();
+ createUserWorkloadsConfigMapSettings =
+ settings.createUserWorkloadsConfigMapSettings.toBuilder();
+ getUserWorkloadsConfigMapSettings = settings.getUserWorkloadsConfigMapSettings.toBuilder();
+ listUserWorkloadsConfigMapsSettings =
+ settings.listUserWorkloadsConfigMapsSettings.toBuilder();
+ updateUserWorkloadsConfigMapSettings =
+ settings.updateUserWorkloadsConfigMapSettings.toBuilder();
+ deleteUserWorkloadsConfigMapSettings =
+ settings.deleteUserWorkloadsConfigMapSettings.toBuilder();
saveSnapshotSettings = settings.saveSnapshotSettings.toBuilder();
saveSnapshotOperationSettings = settings.saveSnapshotOperationSettings.toBuilder();
loadSnapshotSettings = settings.loadSnapshotSettings.toBuilder();
@@ -600,6 +1021,17 @@ protected Builder(EnvironmentsStubSettings settings) {
executeAirflowCommandSettings,
stopAirflowCommandSettings,
pollAirflowCommandSettings,
+ listWorkloadsSettings,
+ createUserWorkloadsSecretSettings,
+ getUserWorkloadsSecretSettings,
+ listUserWorkloadsSecretsSettings,
+ updateUserWorkloadsSecretSettings,
+ deleteUserWorkloadsSecretSettings,
+ createUserWorkloadsConfigMapSettings,
+ getUserWorkloadsConfigMapSettings,
+ listUserWorkloadsConfigMapsSettings,
+ updateUserWorkloadsConfigMapSettings,
+ deleteUserWorkloadsConfigMapSettings,
saveSnapshotSettings,
loadSnapshotSettings,
databaseFailoverSettings,
@@ -671,6 +1103,61 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+ builder
+ .listWorkloadsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .createUserWorkloadsSecretSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .getUserWorkloadsSecretSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .listUserWorkloadsSecretsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .updateUserWorkloadsSecretSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .deleteUserWorkloadsSecretSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .createUserWorkloadsConfigMapSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .getUserWorkloadsConfigMapSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .listUserWorkloadsConfigMapsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .updateUserWorkloadsConfigMapSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .deleteUserWorkloadsConfigMapSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
builder
.saveSnapshotSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
@@ -925,6 +1412,79 @@ public UnaryCallSettings.Builder getEnvironm
return pollAirflowCommandSettings;
}
+ /** Returns the builder for the settings used for calls to listWorkloads. */
+ public PagedCallSettings.Builder<
+ ListWorkloadsRequest, ListWorkloadsResponse, ListWorkloadsPagedResponse>
+ listWorkloadsSettings() {
+ return listWorkloadsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to createUserWorkloadsSecret. */
+ public UnaryCallSettings.Builder
+ createUserWorkloadsSecretSettings() {
+ return createUserWorkloadsSecretSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getUserWorkloadsSecret. */
+ public UnaryCallSettings.Builder
+ getUserWorkloadsSecretSettings() {
+ return getUserWorkloadsSecretSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to listUserWorkloadsSecrets. */
+ public PagedCallSettings.Builder<
+ ListUserWorkloadsSecretsRequest,
+ ListUserWorkloadsSecretsResponse,
+ ListUserWorkloadsSecretsPagedResponse>
+ listUserWorkloadsSecretsSettings() {
+ return listUserWorkloadsSecretsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to updateUserWorkloadsSecret. */
+ public UnaryCallSettings.Builder
+ updateUserWorkloadsSecretSettings() {
+ return updateUserWorkloadsSecretSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to deleteUserWorkloadsSecret. */
+ public UnaryCallSettings.Builder
+ deleteUserWorkloadsSecretSettings() {
+ return deleteUserWorkloadsSecretSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to createUserWorkloadsConfigMap. */
+ public UnaryCallSettings.Builder
+ createUserWorkloadsConfigMapSettings() {
+ return createUserWorkloadsConfigMapSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getUserWorkloadsConfigMap. */
+ public UnaryCallSettings.Builder
+ getUserWorkloadsConfigMapSettings() {
+ return getUserWorkloadsConfigMapSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to listUserWorkloadsConfigMaps. */
+ public PagedCallSettings.Builder<
+ ListUserWorkloadsConfigMapsRequest,
+ ListUserWorkloadsConfigMapsResponse,
+ ListUserWorkloadsConfigMapsPagedResponse>
+ listUserWorkloadsConfigMapsSettings() {
+ return listUserWorkloadsConfigMapsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to updateUserWorkloadsConfigMap. */
+ public UnaryCallSettings.Builder
+ updateUserWorkloadsConfigMapSettings() {
+ return updateUserWorkloadsConfigMapSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to deleteUserWorkloadsConfigMap. */
+ public UnaryCallSettings.Builder
+ deleteUserWorkloadsConfigMapSettings() {
+ return deleteUserWorkloadsConfigMapSettings;
+ }
+
/** Returns the builder for the settings used for calls to saveSnapshot. */
public UnaryCallSettings.Builder saveSnapshotSettings() {
return saveSnapshotSettings;
diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcEnvironmentsCallableFactory.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcEnvironmentsCallableFactory.java
index a5fee8210189..8f076b5874cf 100644
--- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcEnvironmentsCallableFactory.java
+++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcEnvironmentsCallableFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 Google LLC
+ * Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcEnvironmentsStub.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcEnvironmentsStub.java
index a9ebf64cc170..7eadce1e12b8 100644
--- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcEnvironmentsStub.java
+++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcEnvironmentsStub.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 Google LLC
+ * Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,9 @@
package com.google.cloud.orchestration.airflow.service.v1.stub;
import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListEnvironmentsPagedResponse;
+import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListUserWorkloadsConfigMapsPagedResponse;
+import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListUserWorkloadsSecretsPagedResponse;
+import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListWorkloadsPagedResponse;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
@@ -27,17 +30,29 @@
import com.google.api.gax.rpc.RequestParamsBuilder;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest;
+import com.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest;
+import com.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest;
import com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest;
import com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse;
import com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest;
+import com.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest;
+import com.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest;
import com.google.cloud.orchestration.airflow.service.v1.Environment;
import com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest;
import com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse;
import com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest;
import com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse;
import com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest;
+import com.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest;
+import com.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest;
import com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest;
import com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse;
+import com.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest;
+import com.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse;
+import com.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest;
+import com.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse;
+import com.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest;
+import com.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse;
import com.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest;
import com.google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse;
import com.google.cloud.orchestration.airflow.service.v1.OperationMetadata;
@@ -48,6 +63,10 @@
import com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest;
import com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse;
import com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest;
+import com.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest;
+import com.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest;
+import com.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap;
+import com.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.GrpcOperationsStub;
import com.google.protobuf.Empty;
@@ -157,6 +176,140 @@ public class GrpcEnvironmentsStub extends EnvironmentsStub {
ProtoUtils.marshaller(PollAirflowCommandResponse.getDefaultInstance()))
.build();
+ private static final MethodDescriptor
+ listWorkloadsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.orchestration.airflow.service.v1.Environments/ListWorkloads")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListWorkloadsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListWorkloadsResponse.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ createUserWorkloadsSecretMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.orchestration.airflow.service.v1.Environments/CreateUserWorkloadsSecret")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(CreateUserWorkloadsSecretRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(UserWorkloadsSecret.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ getUserWorkloadsSecretMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.orchestration.airflow.service.v1.Environments/GetUserWorkloadsSecret")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(GetUserWorkloadsSecretRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(UserWorkloadsSecret.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor<
+ ListUserWorkloadsSecretsRequest, ListUserWorkloadsSecretsResponse>
+ listUserWorkloadsSecretsMethodDescriptor =
+ MethodDescriptor
+ .newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.orchestration.airflow.service.v1.Environments/ListUserWorkloadsSecrets")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListUserWorkloadsSecretsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListUserWorkloadsSecretsResponse.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ updateUserWorkloadsSecretMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.orchestration.airflow.service.v1.Environments/UpdateUserWorkloadsSecret")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(UpdateUserWorkloadsSecretRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(UserWorkloadsSecret.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ deleteUserWorkloadsSecretMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.orchestration.airflow.service.v1.Environments/DeleteUserWorkloadsSecret")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(DeleteUserWorkloadsSecretRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ createUserWorkloadsConfigMapMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.orchestration.airflow.service.v1.Environments/CreateUserWorkloadsConfigMap")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(CreateUserWorkloadsConfigMapRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(UserWorkloadsConfigMap.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ getUserWorkloadsConfigMapMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.orchestration.airflow.service.v1.Environments/GetUserWorkloadsConfigMap")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(GetUserWorkloadsConfigMapRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(UserWorkloadsConfigMap.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor<
+ ListUserWorkloadsConfigMapsRequest, ListUserWorkloadsConfigMapsResponse>
+ listUserWorkloadsConfigMapsMethodDescriptor =
+ MethodDescriptor
+ .newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.orchestration.airflow.service.v1.Environments/ListUserWorkloadsConfigMaps")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListUserWorkloadsConfigMapsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListUserWorkloadsConfigMapsResponse.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ updateUserWorkloadsConfigMapMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.orchestration.airflow.service.v1.Environments/UpdateUserWorkloadsConfigMap")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(UpdateUserWorkloadsConfigMapRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(UserWorkloadsConfigMap.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ deleteUserWorkloadsConfigMapMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.cloud.orchestration.airflow.service.v1.Environments/DeleteUserWorkloadsConfigMap")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(DeleteUserWorkloadsConfigMapRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+ .build();
+
private static final MethodDescriptor
saveSnapshotMethodDescriptor =
MethodDescriptor.newBuilder()
@@ -222,6 +375,36 @@ public class GrpcEnvironmentsStub extends EnvironmentsStub {
stopAirflowCommandCallable;
private final UnaryCallable
pollAirflowCommandCallable;
+ private final UnaryCallable listWorkloadsCallable;
+ private final UnaryCallable
+ listWorkloadsPagedCallable;
+ private final UnaryCallable
+ createUserWorkloadsSecretCallable;
+ private final UnaryCallable
+ getUserWorkloadsSecretCallable;
+ private final UnaryCallable
+ listUserWorkloadsSecretsCallable;
+ private final UnaryCallable<
+ ListUserWorkloadsSecretsRequest, ListUserWorkloadsSecretsPagedResponse>
+ listUserWorkloadsSecretsPagedCallable;
+ private final UnaryCallable
+ updateUserWorkloadsSecretCallable;
+ private final UnaryCallable
+ deleteUserWorkloadsSecretCallable;
+ private final UnaryCallable
+ createUserWorkloadsConfigMapCallable;
+ private final UnaryCallable
+ getUserWorkloadsConfigMapCallable;
+ private final UnaryCallable<
+ ListUserWorkloadsConfigMapsRequest, ListUserWorkloadsConfigMapsResponse>
+ listUserWorkloadsConfigMapsCallable;
+ private final UnaryCallable<
+ ListUserWorkloadsConfigMapsRequest, ListUserWorkloadsConfigMapsPagedResponse>
+ listUserWorkloadsConfigMapsPagedCallable;
+ private final UnaryCallable
+ updateUserWorkloadsConfigMapCallable;
+ private final UnaryCallable
+ deleteUserWorkloadsConfigMapCallable;
private final UnaryCallable saveSnapshotCallable;
private final OperationCallable
saveSnapshotOperationCallable;
@@ -362,6 +545,135 @@ protected GrpcEnvironmentsStub(
return builder.build();
})
.build();
+ GrpcCallSettings listWorkloadsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(listWorkloadsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings
+ createUserWorkloadsSecretTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(createUserWorkloadsSecretMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings
+ getUserWorkloadsSecretTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getUserWorkloadsSecretMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings
+ listUserWorkloadsSecretsTransportSettings =
+ GrpcCallSettings
+ .newBuilder()
+ .setMethodDescriptor(listUserWorkloadsSecretsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings
+ updateUserWorkloadsSecretTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(updateUserWorkloadsSecretMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add(
+ "user_workloads_secret.name",
+ String.valueOf(request.getUserWorkloadsSecret().getName()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings
+ deleteUserWorkloadsSecretTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(deleteUserWorkloadsSecretMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings
+ createUserWorkloadsConfigMapTransportSettings =
+ GrpcCallSettings
+ .newBuilder()
+ .setMethodDescriptor(createUserWorkloadsConfigMapMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings
+ getUserWorkloadsConfigMapTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getUserWorkloadsConfigMapMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings
+ listUserWorkloadsConfigMapsTransportSettings =
+ GrpcCallSettings
+ .
+ newBuilder()
+ .setMethodDescriptor(listUserWorkloadsConfigMapsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings
+ updateUserWorkloadsConfigMapTransportSettings =
+ GrpcCallSettings
+ .newBuilder()
+ .setMethodDescriptor(updateUserWorkloadsConfigMapMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add(
+ "user_workloads_config_map.name",
+ String.valueOf(request.getUserWorkloadsConfigMap().getName()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings
+ deleteUserWorkloadsConfigMapTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(deleteUserWorkloadsConfigMapMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
GrpcCallSettings saveSnapshotTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(saveSnapshotMethodDescriptor)
@@ -462,6 +774,72 @@ protected GrpcEnvironmentsStub(
pollAirflowCommandTransportSettings,
settings.pollAirflowCommandSettings(),
clientContext);
+ this.listWorkloadsCallable =
+ callableFactory.createUnaryCallable(
+ listWorkloadsTransportSettings, settings.listWorkloadsSettings(), clientContext);
+ this.listWorkloadsPagedCallable =
+ callableFactory.createPagedCallable(
+ listWorkloadsTransportSettings, settings.listWorkloadsSettings(), clientContext);
+ this.createUserWorkloadsSecretCallable =
+ callableFactory.createUnaryCallable(
+ createUserWorkloadsSecretTransportSettings,
+ settings.createUserWorkloadsSecretSettings(),
+ clientContext);
+ this.getUserWorkloadsSecretCallable =
+ callableFactory.createUnaryCallable(
+ getUserWorkloadsSecretTransportSettings,
+ settings.getUserWorkloadsSecretSettings(),
+ clientContext);
+ this.listUserWorkloadsSecretsCallable =
+ callableFactory.createUnaryCallable(
+ listUserWorkloadsSecretsTransportSettings,
+ settings.listUserWorkloadsSecretsSettings(),
+ clientContext);
+ this.listUserWorkloadsSecretsPagedCallable =
+ callableFactory.createPagedCallable(
+ listUserWorkloadsSecretsTransportSettings,
+ settings.listUserWorkloadsSecretsSettings(),
+ clientContext);
+ this.updateUserWorkloadsSecretCallable =
+ callableFactory.createUnaryCallable(
+ updateUserWorkloadsSecretTransportSettings,
+ settings.updateUserWorkloadsSecretSettings(),
+ clientContext);
+ this.deleteUserWorkloadsSecretCallable =
+ callableFactory.createUnaryCallable(
+ deleteUserWorkloadsSecretTransportSettings,
+ settings.deleteUserWorkloadsSecretSettings(),
+ clientContext);
+ this.createUserWorkloadsConfigMapCallable =
+ callableFactory.createUnaryCallable(
+ createUserWorkloadsConfigMapTransportSettings,
+ settings.createUserWorkloadsConfigMapSettings(),
+ clientContext);
+ this.getUserWorkloadsConfigMapCallable =
+ callableFactory.createUnaryCallable(
+ getUserWorkloadsConfigMapTransportSettings,
+ settings.getUserWorkloadsConfigMapSettings(),
+ clientContext);
+ this.listUserWorkloadsConfigMapsCallable =
+ callableFactory.createUnaryCallable(
+ listUserWorkloadsConfigMapsTransportSettings,
+ settings.listUserWorkloadsConfigMapsSettings(),
+ clientContext);
+ this.listUserWorkloadsConfigMapsPagedCallable =
+ callableFactory.createPagedCallable(
+ listUserWorkloadsConfigMapsTransportSettings,
+ settings.listUserWorkloadsConfigMapsSettings(),
+ clientContext);
+ this.updateUserWorkloadsConfigMapCallable =
+ callableFactory.createUnaryCallable(
+ updateUserWorkloadsConfigMapTransportSettings,
+ settings.updateUserWorkloadsConfigMapSettings(),
+ clientContext);
+ this.deleteUserWorkloadsConfigMapCallable =
+ callableFactory.createUnaryCallable(
+ deleteUserWorkloadsConfigMapTransportSettings,
+ settings.deleteUserWorkloadsConfigMapSettings(),
+ clientContext);
this.saveSnapshotCallable =
callableFactory.createUnaryCallable(
saveSnapshotTransportSettings, settings.saveSnapshotSettings(), clientContext);
@@ -571,6 +949,89 @@ public UnaryCallable deleteEnvironmentCalla
return pollAirflowCommandCallable;
}
+ @Override
+ public UnaryCallable listWorkloadsCallable() {
+ return listWorkloadsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listWorkloadsPagedCallable() {
+ return listWorkloadsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ createUserWorkloadsSecretCallable() {
+ return createUserWorkloadsSecretCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ getUserWorkloadsSecretCallable() {
+ return getUserWorkloadsSecretCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listUserWorkloadsSecretsCallable() {
+ return listUserWorkloadsSecretsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listUserWorkloadsSecretsPagedCallable() {
+ return listUserWorkloadsSecretsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ updateUserWorkloadsSecretCallable() {
+ return updateUserWorkloadsSecretCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ deleteUserWorkloadsSecretCallable() {
+ return deleteUserWorkloadsSecretCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ createUserWorkloadsConfigMapCallable() {
+ return createUserWorkloadsConfigMapCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ getUserWorkloadsConfigMapCallable() {
+ return getUserWorkloadsConfigMapCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listUserWorkloadsConfigMapsCallable() {
+ return listUserWorkloadsConfigMapsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listUserWorkloadsConfigMapsPagedCallable() {
+ return listUserWorkloadsConfigMapsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ updateUserWorkloadsConfigMapCallable() {
+ return updateUserWorkloadsConfigMapCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ deleteUserWorkloadsConfigMapCallable() {
+ return deleteUserWorkloadsConfigMapCallable;
+ }
+
@Override
public UnaryCallable saveSnapshotCallable() {
return saveSnapshotCallable;
diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcImageVersionsCallableFactory.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcImageVersionsCallableFactory.java
index 43487ad5acf6..1c6da3379ea0 100644
--- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcImageVersionsCallableFactory.java
+++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcImageVersionsCallableFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 Google LLC
+ * Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcImageVersionsStub.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcImageVersionsStub.java
index b3ba36c3ccc6..64e92a82841c 100644
--- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcImageVersionsStub.java
+++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcImageVersionsStub.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 Google LLC
+ * Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/HttpJsonEnvironmentsCallableFactory.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/HttpJsonEnvironmentsCallableFactory.java
index 030d62d7107b..a3333b8b36e9 100644
--- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/HttpJsonEnvironmentsCallableFactory.java
+++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/HttpJsonEnvironmentsCallableFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 Google LLC
+ * Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/HttpJsonEnvironmentsStub.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/HttpJsonEnvironmentsStub.java
index 125086b06c30..d72443467270 100644
--- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/HttpJsonEnvironmentsStub.java
+++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/HttpJsonEnvironmentsStub.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 Google LLC
+ * Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,6 +17,9 @@
package com.google.cloud.orchestration.airflow.service.v1.stub;
import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListEnvironmentsPagedResponse;
+import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListUserWorkloadsConfigMapsPagedResponse;
+import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListUserWorkloadsSecretsPagedResponse;
+import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListWorkloadsPagedResponse;
import com.google.api.HttpRule;
import com.google.api.core.BetaApi;
@@ -36,17 +39,29 @@
import com.google.api.gax.rpc.RequestParamsBuilder;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest;
+import com.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest;
+import com.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest;
import com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest;
import com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse;
import com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest;
+import com.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest;
+import com.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest;
import com.google.cloud.orchestration.airflow.service.v1.Environment;
import com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest;
import com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse;
import com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest;
import com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse;
import com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest;
+import com.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest;
+import com.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest;
import com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest;
import com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse;
+import com.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest;
+import com.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse;
+import com.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest;
+import com.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse;
+import com.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest;
+import com.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse;
import com.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest;
import com.google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse;
import com.google.cloud.orchestration.airflow.service.v1.OperationMetadata;
@@ -57,6 +72,10 @@
import com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest;
import com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse;
import com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest;
+import com.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest;
+import com.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest;
+import com.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap;
+import com.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret;
import com.google.common.collect.ImmutableMap;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
@@ -403,6 +422,436 @@ public class HttpJsonEnvironmentsStub extends EnvironmentsStub {
.build())
.build();
+ private static final ApiMethodDescriptor
+ listWorkloadsMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.cloud.orchestration.airflow.service.v1.Environments/ListWorkloads")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*/environments/*}/workloads",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "filter", request.getFilter());
+ serializer.putQueryParam(fields, "pageSize", request.getPageSize());
+ serializer.putQueryParam(fields, "pageToken", request.getPageToken());
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(ListWorkloadsResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ createUserWorkloadsSecretMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.cloud.orchestration.airflow.service.v1.Environments/CreateUserWorkloadsSecret")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody(
+ "userWorkloadsSecret",
+ request.getUserWorkloadsSecret(),
+ true))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(UserWorkloadsSecret.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ getUserWorkloadsSecretMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.cloud.orchestration.airflow.service.v1.Environments/GetUserWorkloadsSecret")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(UserWorkloadsSecret.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor<
+ ListUserWorkloadsSecretsRequest, ListUserWorkloadsSecretsResponse>
+ listUserWorkloadsSecretsMethodDescriptor =
+ ApiMethodDescriptor
+ .newBuilder()
+ .setFullMethodName(
+ "google.cloud.orchestration.airflow.service.v1.Environments/ListUserWorkloadsSecrets")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.