From 1a2fab1495e09d03276c7bf5dac44a429915048e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 23 Jun 2023 13:02:16 +0000 Subject: [PATCH] feat: [orchestration-airflow] added RPCs StopAirflowCommand, ExecuteAirflowCommand, PollAirflowCommand, DatabaseFailover, FetchDatabaseProperties (#9543) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 540052133 Source-Link: https://togithub.com/googleapis/googleapis/commit/386f722b6251585d42b1698ce433b1b55010eb11 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/b8b5220bb0ca29e108194248def0dbb38b068769 Copy-Tag: eyJwIjoiamF2YS1vcmNoZXN0cmF0aW9uLWFpcmZsb3cvLk93bEJvdC55YW1sIiwiaCI6ImI4YjUyMjBiYjBjYTI5ZTEwODE5NDI0OGRlZjBkYmIzOGIwNjg3NjkifQ== feat: added RPCs StopAirflowCommand, ExecuteAirflowCommand, PollAirflowCommand, DatabaseFailover, FetchDatabaseProperties PiperOrigin-RevId: 540051332 Source-Link: https://togithub.com/googleapis/googleapis/commit/b84c697241488e5dd521b09b7eaf75b081648585 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/02564778c80b7b5dc2ddff413be253ef24b69165 Copy-Tag: eyJwIjoiamF2YS1vcmNoZXN0cmF0aW9uLWFpcmZsb3cvLk93bEJvdC55YW1sIiwiaCI6IjAyNTY0Nzc4YzgwYjdiNWRjMmRkZmY0MTNiZTI1M2VmMjRiNjkxNjUifQ== --- java-orchestration-airflow/README.md | 2 +- .../service/v1/EnvironmentsClient.java | 336 ++ .../service/v1/EnvironmentsSettings.java | 73 + .../airflow/service/v1/gapic_metadata.json | 15 + .../service/v1/stub/EnvironmentsStub.java | 39 + .../v1/stub/EnvironmentsStubSettings.java | 193 +- .../service/v1/stub/GrpcEnvironmentsStub.java | 203 ++ .../v1/stub/HttpJsonEnvironmentsStub.java | 356 ++ .../service/v1beta1/EnvironmentsClient.java | 336 ++ .../service/v1beta1/EnvironmentsSettings.java | 73 + .../service/v1beta1/gapic_metadata.json | 15 + .../v1beta1/stub/EnvironmentsStub.java | 39 + .../stub/EnvironmentsStubSettings.java | 193 +- .../v1beta1/stub/GrpcEnvironmentsStub.java | 203 ++ .../stub/HttpJsonEnvironmentsStub.java | 356 ++ .../v1/EnvironmentsClientHttpJsonTest.java | 299 +- .../service/v1/EnvironmentsClientTest.java | 273 +- .../service/v1/MockEnvironmentsImpl.java | 109 + .../EnvironmentsClientHttpJsonTest.java | 301 +- .../v1beta1/EnvironmentsClientTest.java | 275 +- .../service/v1beta1/MockEnvironmentsImpl.java | 109 + .../airflow/service/v1/EnvironmentsGrpc.java | 654 +++- .../service/v1beta1/EnvironmentsGrpc.java | 681 +++- .../pom.xml | 4 + .../service/v1/DatabaseFailoverRequest.java | 652 ++++ .../v1/DatabaseFailoverRequestOrBuilder.java | 52 + .../service/v1/DatabaseFailoverResponse.java | 454 +++ .../v1/DatabaseFailoverResponseOrBuilder.java | 24 + .../airflow/service/v1/EnvironmentConfig.java | 338 ++ .../v1/EnvironmentConfigOrBuilder.java | 36 + .../airflow/service/v1/EnvironmentName.java | 227 ++ .../service/v1/EnvironmentsOuterClass.java | 709 ++-- .../v1/ExecuteAirflowCommandRequest.java | 1339 +++++++ ...ExecuteAirflowCommandRequestOrBuilder.java | 165 + .../v1/ExecuteAirflowCommandResponse.java | 1199 +++++++ ...xecuteAirflowCommandResponseOrBuilder.java | 125 + .../v1/FetchDatabasePropertiesRequest.java | 679 ++++ ...tchDatabasePropertiesRequestOrBuilder.java | 56 + .../v1/FetchDatabasePropertiesResponse.java | 948 +++++ ...chDatabasePropertiesResponseOrBuilder.java | 92 + .../airflow/service/v1/OperationMetadata.java | 24 + .../airflow/service/v1/OperationsProto.java | 19 +- .../service/v1/PollAirflowCommandRequest.java | 1294 +++++++ .../PollAirflowCommandRequestOrBuilder.java | 140 + .../v1/PollAirflowCommandResponse.java | 3078 +++++++++++++++++ .../PollAirflowCommandResponseOrBuilder.java | 154 + .../service/v1/StopAirflowCommandRequest.java | 1298 +++++++ .../StopAirflowCommandRequestOrBuilder.java | 141 + .../v1/StopAirflowCommandResponse.java | 836 +++++ .../StopAirflowCommandResponseOrBuilder.java | 89 + .../airflow/service/v1/environments.proto | 214 ++ .../airflow/service/v1/operations.proto | 4 + .../pom.xml | 4 + .../v1beta1/DatabaseFailoverRequest.java | 661 ++++ .../DatabaseFailoverRequestOrBuilder.java | 52 + .../v1beta1/DatabaseFailoverResponse.java | 459 +++ .../DatabaseFailoverResponseOrBuilder.java | 24 + .../service/v1beta1/EnvironmentConfig.java | 341 ++ .../v1beta1/EnvironmentConfigOrBuilder.java | 36 + .../service/v1beta1/EnvironmentName.java | 227 ++ .../v1beta1/EnvironmentsOuterClass.java | 750 ++-- .../v1beta1/ExecuteAirflowCommandRequest.java | 1347 ++++++++ ...ExecuteAirflowCommandRequestOrBuilder.java | 165 + .../FetchDatabasePropertiesRequest.java | 697 ++++ ...tchDatabasePropertiesRequestOrBuilder.java | 56 + .../FetchDatabasePropertiesResponse.java | 969 ++++++ ...chDatabasePropertiesResponseOrBuilder.java | 92 + .../service/v1beta1/OperationMetadata.java | 24 + .../service/v1beta1/OperationsProto.java | 19 +- .../v1beta1/PollAirflowCommandRequest.java | 1303 +++++++ .../PollAirflowCommandRequestOrBuilder.java | 140 + .../v1beta1/StopAirflowCommandRequest.java | 1307 +++++++ .../StopAirflowCommandRequestOrBuilder.java | 141 + .../v1beta1/StopAirflowCommandResponse.java | 845 +++++ .../StopAirflowCommandResponseOrBuilder.java | 89 + .../service/v1beta1/environments.proto | 168 + .../airflow/service/v1beta1/operations.proto | 4 + .../AsyncDatabaseFailover.java | 47 + .../AsyncDatabaseFailoverLRO.java | 48 + .../SyncDatabaseFailover.java | 43 + .../AsyncExecuteAirflowCommand.java | 53 + .../SyncExecuteAirflowCommand.java | 49 + .../AsyncFetchDatabaseProperties.java | 51 + .../SyncFetchDatabaseProperties.java | 48 + .../AsyncPollAirflowCommand.java | 53 + .../SyncPollAirflowCommand.java | 49 + .../AsyncStopAirflowCommand.java | 53 + .../SyncStopAirflowCommand.java | 49 + .../AsyncDatabaseFailover.java | 47 + .../AsyncDatabaseFailoverLRO.java | 48 + .../SyncDatabaseFailover.java | 43 + .../AsyncExecuteAirflowCommand.java | 53 + .../SyncExecuteAirflowCommand.java | 49 + .../AsyncFetchDatabaseProperties.java | 51 + .../SyncFetchDatabaseProperties.java | 48 + .../AsyncPollAirflowCommand.java | 53 + .../SyncPollAirflowCommand.java | 49 + .../AsyncStopAirflowCommand.java | 53 + .../SyncStopAirflowCommand.java | 49 + 99 files changed, 29945 insertions(+), 584 deletions(-) create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseFailoverRequest.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseFailoverRequestOrBuilder.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseFailoverResponse.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseFailoverResponseOrBuilder.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentName.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ExecuteAirflowCommandRequest.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ExecuteAirflowCommandRequestOrBuilder.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ExecuteAirflowCommandResponse.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ExecuteAirflowCommandResponseOrBuilder.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/FetchDatabasePropertiesRequest.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/FetchDatabasePropertiesRequestOrBuilder.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/FetchDatabasePropertiesResponse.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/FetchDatabasePropertiesResponseOrBuilder.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PollAirflowCommandRequest.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PollAirflowCommandRequestOrBuilder.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PollAirflowCommandResponse.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PollAirflowCommandResponseOrBuilder.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/StopAirflowCommandRequest.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/StopAirflowCommandRequestOrBuilder.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/StopAirflowCommandResponse.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/StopAirflowCommandResponseOrBuilder.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseFailoverRequest.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseFailoverRequestOrBuilder.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseFailoverResponse.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseFailoverResponseOrBuilder.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentName.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ExecuteAirflowCommandRequest.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ExecuteAirflowCommandRequestOrBuilder.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/FetchDatabasePropertiesRequest.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/FetchDatabasePropertiesRequestOrBuilder.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/FetchDatabasePropertiesResponse.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/FetchDatabasePropertiesResponseOrBuilder.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PollAirflowCommandRequest.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PollAirflowCommandRequestOrBuilder.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/StopAirflowCommandRequest.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/StopAirflowCommandRequestOrBuilder.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/StopAirflowCommandResponse.java create mode 100644 java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/StopAirflowCommandResponseOrBuilder.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/databasefailover/AsyncDatabaseFailover.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/databasefailover/AsyncDatabaseFailoverLRO.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/databasefailover/SyncDatabaseFailover.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/executeairflowcommand/AsyncExecuteAirflowCommand.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/executeairflowcommand/SyncExecuteAirflowCommand.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/fetchdatabaseproperties/AsyncFetchDatabaseProperties.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/fetchdatabaseproperties/SyncFetchDatabaseProperties.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/pollairflowcommand/AsyncPollAirflowCommand.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/pollairflowcommand/SyncPollAirflowCommand.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/stopairflowcommand/AsyncStopAirflowCommand.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/stopairflowcommand/SyncStopAirflowCommand.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/databasefailover/AsyncDatabaseFailover.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/databasefailover/AsyncDatabaseFailoverLRO.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/databasefailover/SyncDatabaseFailover.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/executeairflowcommand/AsyncExecuteAirflowCommand.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/executeairflowcommand/SyncExecuteAirflowCommand.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/fetchdatabaseproperties/AsyncFetchDatabaseProperties.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/fetchdatabaseproperties/SyncFetchDatabaseProperties.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/pollairflowcommand/AsyncPollAirflowCommand.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/pollairflowcommand/SyncPollAirflowCommand.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/stopairflowcommand/AsyncStopAirflowCommand.java create mode 100644 java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/stopairflowcommand/SyncStopAirflowCommand.java diff --git a/java-orchestration-airflow/README.md b/java-orchestration-airflow/README.md index 1604f35c372b..88e954423e87 100644 --- a/java-orchestration-airflow/README.md +++ b/java-orchestration-airflow/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.16.0 + 26.17.0 pom import 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 78efc4a4aa15..f1b4d3c502dc 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 @@ -847,6 +847,200 @@ public final UnaryCallable deleteEnvironmen return stub.deleteEnvironmentCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Executes Airflow CLI command. + * + *

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()) {
+   *   ExecuteAirflowCommandRequest request =
+   *       ExecuteAirflowCommandRequest.newBuilder()
+   *           .setEnvironment("environment-85904877")
+   *           .setCommand("command950394699")
+   *           .setSubcommand("subcommand2099091723")
+   *           .addAllParameters(new ArrayList())
+   *           .build();
+   *   ExecuteAirflowCommandResponse response = environmentsClient.executeAirflowCommand(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 ExecuteAirflowCommandResponse executeAirflowCommand( + ExecuteAirflowCommandRequest request) { + return executeAirflowCommandCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Executes Airflow CLI command. + * + *

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()) {
+   *   ExecuteAirflowCommandRequest request =
+   *       ExecuteAirflowCommandRequest.newBuilder()
+   *           .setEnvironment("environment-85904877")
+   *           .setCommand("command950394699")
+   *           .setSubcommand("subcommand2099091723")
+   *           .addAllParameters(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.executeAirflowCommandCallable().futureCall(request);
+   *   // Do something.
+   *   ExecuteAirflowCommandResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + executeAirflowCommandCallable() { + return stub.executeAirflowCommandCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops Airflow CLI command execution. + * + *

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()) {
+   *   StopAirflowCommandRequest request =
+   *       StopAirflowCommandRequest.newBuilder()
+   *           .setEnvironment("environment-85904877")
+   *           .setExecutionId("executionId-454906285")
+   *           .setPod("pod111173")
+   *           .setPodNamespace("podNamespace463962262")
+   *           .setForce(true)
+   *           .build();
+   *   StopAirflowCommandResponse response = environmentsClient.stopAirflowCommand(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 StopAirflowCommandResponse stopAirflowCommand(StopAirflowCommandRequest request) { + return stopAirflowCommandCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops Airflow CLI command execution. + * + *

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()) {
+   *   StopAirflowCommandRequest request =
+   *       StopAirflowCommandRequest.newBuilder()
+   *           .setEnvironment("environment-85904877")
+   *           .setExecutionId("executionId-454906285")
+   *           .setPod("pod111173")
+   *           .setPodNamespace("podNamespace463962262")
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.stopAirflowCommandCallable().futureCall(request);
+   *   // Do something.
+   *   StopAirflowCommandResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + stopAirflowCommandCallable() { + return stub.stopAirflowCommandCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Polls Airflow CLI command execution and fetches logs. + * + *

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()) {
+   *   PollAirflowCommandRequest request =
+   *       PollAirflowCommandRequest.newBuilder()
+   *           .setEnvironment("environment-85904877")
+   *           .setExecutionId("executionId-454906285")
+   *           .setPod("pod111173")
+   *           .setPodNamespace("podNamespace463962262")
+   *           .setNextLineNumber(1176642216)
+   *           .build();
+   *   PollAirflowCommandResponse response = environmentsClient.pollAirflowCommand(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 PollAirflowCommandResponse pollAirflowCommand(PollAirflowCommandRequest request) { + return pollAirflowCommandCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Polls Airflow CLI command execution and fetches logs. + * + *

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()) {
+   *   PollAirflowCommandRequest request =
+   *       PollAirflowCommandRequest.newBuilder()
+   *           .setEnvironment("environment-85904877")
+   *           .setExecutionId("executionId-454906285")
+   *           .setPod("pod111173")
+   *           .setPodNamespace("podNamespace463962262")
+   *           .setNextLineNumber(1176642216)
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.pollAirflowCommandCallable().futureCall(request);
+   *   // Do something.
+   *   PollAirflowCommandResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + pollAirflowCommandCallable() { + return stub.pollAirflowCommandCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a snapshots of a Cloud Composer environment. @@ -1053,6 +1247,148 @@ public final UnaryCallable loadSnapshotCallable( return stub.loadSnapshotCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Triggers database failover (only for highly resilient environments). + * + *

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()) {
+   *   DatabaseFailoverRequest request =
+   *       DatabaseFailoverRequest.newBuilder().setEnvironment("environment-85904877").build();
+   *   DatabaseFailoverResponse response = environmentsClient.databaseFailoverAsync(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 databaseFailoverAsync( + DatabaseFailoverRequest request) { + return databaseFailoverOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Triggers database failover (only for highly resilient environments). + * + *

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()) {
+   *   DatabaseFailoverRequest request =
+   *       DatabaseFailoverRequest.newBuilder().setEnvironment("environment-85904877").build();
+   *   OperationFuture future =
+   *       environmentsClient.databaseFailoverOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DatabaseFailoverResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + DatabaseFailoverRequest, DatabaseFailoverResponse, OperationMetadata> + databaseFailoverOperationCallable() { + return stub.databaseFailoverOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Triggers database failover (only for highly resilient environments). + * + *

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()) {
+   *   DatabaseFailoverRequest request =
+   *       DatabaseFailoverRequest.newBuilder().setEnvironment("environment-85904877").build();
+   *   ApiFuture future =
+   *       environmentsClient.databaseFailoverCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable databaseFailoverCallable() { + return stub.databaseFailoverCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches database properties. + * + *

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()) {
+   *   FetchDatabasePropertiesRequest request =
+   *       FetchDatabasePropertiesRequest.newBuilder()
+   *           .setEnvironment(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString())
+   *           .build();
+   *   FetchDatabasePropertiesResponse response =
+   *       environmentsClient.fetchDatabaseProperties(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 FetchDatabasePropertiesResponse fetchDatabaseProperties( + FetchDatabasePropertiesRequest request) { + return fetchDatabasePropertiesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches database properties. + * + *

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()) {
+   *   FetchDatabasePropertiesRequest request =
+   *       FetchDatabasePropertiesRequest.newBuilder()
+   *           .setEnvironment(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.fetchDatabasePropertiesCallable().futureCall(request);
+   *   // Do something.
+   *   FetchDatabasePropertiesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + fetchDatabasePropertiesCallable() { + return stub.fetchDatabasePropertiesCallable(); + } + @Override public final void close() { stub.close(); 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 d5d48b1b58ad..ef1c6dbab570 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 @@ -122,6 +122,24 @@ public UnaryCallSettings deleteEnvironmentS return ((EnvironmentsStubSettings) getStubSettings()).deleteEnvironmentOperationSettings(); } + /** Returns the object with the settings used for calls to executeAirflowCommand. */ + public UnaryCallSettings + executeAirflowCommandSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).executeAirflowCommandSettings(); + } + + /** Returns the object with the settings used for calls to stopAirflowCommand. */ + public UnaryCallSettings + stopAirflowCommandSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).stopAirflowCommandSettings(); + } + + /** Returns the object with the settings used for calls to pollAirflowCommand. */ + public UnaryCallSettings + pollAirflowCommandSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).pollAirflowCommandSettings(); + } + /** Returns the object with the settings used for calls to saveSnapshot. */ public UnaryCallSettings saveSnapshotSettings() { return ((EnvironmentsStubSettings) getStubSettings()).saveSnapshotSettings(); @@ -144,6 +162,23 @@ public UnaryCallSettings loadSnapshotSettings() return ((EnvironmentsStubSettings) getStubSettings()).loadSnapshotOperationSettings(); } + /** Returns the object with the settings used for calls to databaseFailover. */ + public UnaryCallSettings databaseFailoverSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).databaseFailoverSettings(); + } + + /** Returns the object with the settings used for calls to databaseFailover. */ + public OperationCallSettings + databaseFailoverOperationSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).databaseFailoverOperationSettings(); + } + + /** Returns the object with the settings used for calls to fetchDatabaseProperties. */ + public UnaryCallSettings + fetchDatabasePropertiesSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).fetchDatabasePropertiesSettings(); + } + public static final EnvironmentsSettings create(EnvironmentsStubSettings stub) throws IOException { return new EnvironmentsSettings.Builder(stub.toBuilder()).build(); @@ -307,6 +342,24 @@ public UnaryCallSettings.Builder getEnvironm return getStubSettingsBuilder().deleteEnvironmentOperationSettings(); } + /** Returns the builder for the settings used for calls to executeAirflowCommand. */ + public UnaryCallSettings.Builder + executeAirflowCommandSettings() { + return getStubSettingsBuilder().executeAirflowCommandSettings(); + } + + /** Returns the builder for the settings used for calls to stopAirflowCommand. */ + public UnaryCallSettings.Builder + stopAirflowCommandSettings() { + return getStubSettingsBuilder().stopAirflowCommandSettings(); + } + + /** Returns the builder for the settings used for calls to pollAirflowCommand. */ + public UnaryCallSettings.Builder + pollAirflowCommandSettings() { + return getStubSettingsBuilder().pollAirflowCommandSettings(); + } + /** Returns the builder for the settings used for calls to saveSnapshot. */ public UnaryCallSettings.Builder saveSnapshotSettings() { return getStubSettingsBuilder().saveSnapshotSettings(); @@ -331,6 +384,26 @@ public UnaryCallSettings.Builder loadSnapshotSet return getStubSettingsBuilder().loadSnapshotOperationSettings(); } + /** Returns the builder for the settings used for calls to databaseFailover. */ + public UnaryCallSettings.Builder + databaseFailoverSettings() { + return getStubSettingsBuilder().databaseFailoverSettings(); + } + + /** Returns the builder for the settings used for calls to databaseFailover. */ + public OperationCallSettings.Builder< + DatabaseFailoverRequest, DatabaseFailoverResponse, OperationMetadata> + databaseFailoverOperationSettings() { + return getStubSettingsBuilder().databaseFailoverOperationSettings(); + } + + /** Returns the builder for the settings used for calls to fetchDatabaseProperties. */ + public UnaryCallSettings.Builder< + FetchDatabasePropertiesRequest, FetchDatabasePropertiesResponse> + fetchDatabasePropertiesSettings() { + return getStubSettingsBuilder().fetchDatabasePropertiesSettings(); + } + @Override public EnvironmentsSettings build() throws IOException { return new EnvironmentsSettings(this); 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 a1322e3981e6..053720a2033e 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,9 +13,18 @@ "CreateEnvironment": { "methods": ["createEnvironmentAsync", "createEnvironmentAsync", "createEnvironmentOperationCallable", "createEnvironmentCallable"] }, + "DatabaseFailover": { + "methods": ["databaseFailoverAsync", "databaseFailoverOperationCallable", "databaseFailoverCallable"] + }, "DeleteEnvironment": { "methods": ["deleteEnvironmentAsync", "deleteEnvironmentAsync", "deleteEnvironmentOperationCallable", "deleteEnvironmentCallable"] }, + "ExecuteAirflowCommand": { + "methods": ["executeAirflowCommand", "executeAirflowCommandCallable"] + }, + "FetchDatabaseProperties": { + "methods": ["fetchDatabaseProperties", "fetchDatabasePropertiesCallable"] + }, "GetEnvironment": { "methods": ["getEnvironment", "getEnvironment", "getEnvironmentCallable"] }, @@ -25,9 +34,15 @@ "LoadSnapshot": { "methods": ["loadSnapshotAsync", "loadSnapshotOperationCallable", "loadSnapshotCallable"] }, + "PollAirflowCommand": { + "methods": ["pollAirflowCommand", "pollAirflowCommandCallable"] + }, "SaveSnapshot": { "methods": ["saveSnapshotAsync", "saveSnapshotOperationCallable", "saveSnapshotCallable"] }, + "StopAirflowCommand": { + "methods": ["stopAirflowCommand", "stopAirflowCommandCallable"] + }, "UpdateEnvironment": { "methods": ["updateEnvironmentAsync", "updateEnvironmentAsync", "updateEnvironmentOperationCallable", "updateEnvironmentCallable"] } 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 ba53e14cb7f2..7462516e641d 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 @@ -22,16 +22,26 @@ 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.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.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.ListEnvironmentsRequest; import com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse; 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; +import com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse; import com.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest; import com.google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse; +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.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; @@ -99,6 +109,21 @@ public UnaryCallable deleteEnvironmentCalla throw new UnsupportedOperationException("Not implemented: deleteEnvironmentCallable()"); } + public UnaryCallable + executeAirflowCommandCallable() { + throw new UnsupportedOperationException("Not implemented: executeAirflowCommandCallable()"); + } + + public UnaryCallable + stopAirflowCommandCallable() { + throw new UnsupportedOperationException("Not implemented: stopAirflowCommandCallable()"); + } + + public UnaryCallable + pollAirflowCommandCallable() { + throw new UnsupportedOperationException("Not implemented: pollAirflowCommandCallable()"); + } + public OperationCallable saveSnapshotOperationCallable() { throw new UnsupportedOperationException("Not implemented: saveSnapshotOperationCallable()"); @@ -117,6 +142,20 @@ public UnaryCallable loadSnapshotCallable() { throw new UnsupportedOperationException("Not implemented: loadSnapshotCallable()"); } + public OperationCallable + databaseFailoverOperationCallable() { + throw new UnsupportedOperationException("Not implemented: databaseFailoverOperationCallable()"); + } + + public UnaryCallable databaseFailoverCallable() { + throw new UnsupportedOperationException("Not implemented: databaseFailoverCallable()"); + } + + public UnaryCallable + fetchDatabasePropertiesCallable() { + throw new UnsupportedOperationException("Not implemented: fetchDatabasePropertiesCallable()"); + } + @Override public abstract void close(); } 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 ccc8e7a6aa22..75a0652089c3 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 @@ -48,16 +48,26 @@ 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.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.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.ListEnvironmentsRequest; import com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse; 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; +import com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse; import com.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest; import com.google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse; +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.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -126,12 +136,24 @@ public class EnvironmentsStubSettings extends StubSettings deleteEnvironmentSettings; private final OperationCallSettings deleteEnvironmentOperationSettings; + private final UnaryCallSettings + executeAirflowCommandSettings; + private final UnaryCallSettings + stopAirflowCommandSettings; + private final UnaryCallSettings + pollAirflowCommandSettings; private final UnaryCallSettings saveSnapshotSettings; private final OperationCallSettings saveSnapshotOperationSettings; private final UnaryCallSettings loadSnapshotSettings; private final OperationCallSettings loadSnapshotOperationSettings; + private final UnaryCallSettings databaseFailoverSettings; + private final OperationCallSettings< + DatabaseFailoverRequest, DatabaseFailoverResponse, OperationMetadata> + databaseFailoverOperationSettings; + private final UnaryCallSettings + fetchDatabasePropertiesSettings; private static final PagedListDescriptor< ListEnvironmentsRequest, ListEnvironmentsResponse, Environment> @@ -237,6 +259,24 @@ public UnaryCallSettings deleteEnvironmentS return deleteEnvironmentOperationSettings; } + /** Returns the object with the settings used for calls to executeAirflowCommand. */ + public UnaryCallSettings + executeAirflowCommandSettings() { + return executeAirflowCommandSettings; + } + + /** Returns the object with the settings used for calls to stopAirflowCommand. */ + public UnaryCallSettings + stopAirflowCommandSettings() { + return stopAirflowCommandSettings; + } + + /** Returns the object with the settings used for calls to pollAirflowCommand. */ + public UnaryCallSettings + pollAirflowCommandSettings() { + return pollAirflowCommandSettings; + } + /** Returns the object with the settings used for calls to saveSnapshot. */ public UnaryCallSettings saveSnapshotSettings() { return saveSnapshotSettings; @@ -259,6 +299,23 @@ public UnaryCallSettings loadSnapshotSettings() return loadSnapshotOperationSettings; } + /** Returns the object with the settings used for calls to databaseFailover. */ + public UnaryCallSettings databaseFailoverSettings() { + return databaseFailoverSettings; + } + + /** Returns the object with the settings used for calls to databaseFailover. */ + public OperationCallSettings + databaseFailoverOperationSettings() { + return databaseFailoverOperationSettings; + } + + /** Returns the object with the settings used for calls to fetchDatabaseProperties. */ + public UnaryCallSettings + fetchDatabasePropertiesSettings() { + return fetchDatabasePropertiesSettings; + } + public EnvironmentsStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -376,10 +433,16 @@ protected EnvironmentsStubSettings(Builder settingsBuilder) throws IOException { deleteEnvironmentSettings = settingsBuilder.deleteEnvironmentSettings().build(); deleteEnvironmentOperationSettings = settingsBuilder.deleteEnvironmentOperationSettings().build(); + executeAirflowCommandSettings = settingsBuilder.executeAirflowCommandSettings().build(); + stopAirflowCommandSettings = settingsBuilder.stopAirflowCommandSettings().build(); + pollAirflowCommandSettings = settingsBuilder.pollAirflowCommandSettings().build(); saveSnapshotSettings = settingsBuilder.saveSnapshotSettings().build(); saveSnapshotOperationSettings = settingsBuilder.saveSnapshotOperationSettings().build(); loadSnapshotSettings = settingsBuilder.loadSnapshotSettings().build(); loadSnapshotOperationSettings = settingsBuilder.loadSnapshotOperationSettings().build(); + databaseFailoverSettings = settingsBuilder.databaseFailoverSettings().build(); + databaseFailoverOperationSettings = settingsBuilder.databaseFailoverOperationSettings().build(); + fetchDatabasePropertiesSettings = settingsBuilder.fetchDatabasePropertiesSettings().build(); } /** Builder for EnvironmentsStubSettings. */ @@ -404,6 +467,13 @@ public static class Builder extends StubSettings.Builder deleteEnvironmentOperationSettings; + private final UnaryCallSettings.Builder< + ExecuteAirflowCommandRequest, ExecuteAirflowCommandResponse> + executeAirflowCommandSettings; + private final UnaryCallSettings.Builder + stopAirflowCommandSettings; + private final UnaryCallSettings.Builder + pollAirflowCommandSettings; private final UnaryCallSettings.Builder saveSnapshotSettings; private final OperationCallSettings.Builder< SaveSnapshotRequest, SaveSnapshotResponse, OperationMetadata> @@ -412,6 +482,14 @@ public static class Builder extends StubSettings.Builder loadSnapshotOperationSettings; + private final UnaryCallSettings.Builder + databaseFailoverSettings; + private final OperationCallSettings.Builder< + DatabaseFailoverRequest, DatabaseFailoverResponse, OperationMetadata> + databaseFailoverOperationSettings; + private final UnaryCallSettings.Builder< + FetchDatabasePropertiesRequest, FetchDatabasePropertiesResponse> + fetchDatabasePropertiesSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -447,10 +525,16 @@ protected Builder(ClientContext clientContext) { updateEnvironmentOperationSettings = OperationCallSettings.newBuilder(); deleteEnvironmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteEnvironmentOperationSettings = OperationCallSettings.newBuilder(); + executeAirflowCommandSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + stopAirflowCommandSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + pollAirflowCommandSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); saveSnapshotSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); saveSnapshotOperationSettings = OperationCallSettings.newBuilder(); loadSnapshotSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); loadSnapshotOperationSettings = OperationCallSettings.newBuilder(); + databaseFailoverSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + databaseFailoverOperationSettings = OperationCallSettings.newBuilder(); + fetchDatabasePropertiesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -459,8 +543,13 @@ protected Builder(ClientContext clientContext) { listEnvironmentsSettings, updateEnvironmentSettings, deleteEnvironmentSettings, + executeAirflowCommandSettings, + stopAirflowCommandSettings, + pollAirflowCommandSettings, saveSnapshotSettings, - loadSnapshotSettings); + loadSnapshotSettings, + databaseFailoverSettings, + fetchDatabasePropertiesSettings); initDefaults(this); } @@ -475,10 +564,16 @@ protected Builder(EnvironmentsStubSettings settings) { updateEnvironmentOperationSettings = settings.updateEnvironmentOperationSettings.toBuilder(); deleteEnvironmentSettings = settings.deleteEnvironmentSettings.toBuilder(); deleteEnvironmentOperationSettings = settings.deleteEnvironmentOperationSettings.toBuilder(); + executeAirflowCommandSettings = settings.executeAirflowCommandSettings.toBuilder(); + stopAirflowCommandSettings = settings.stopAirflowCommandSettings.toBuilder(); + pollAirflowCommandSettings = settings.pollAirflowCommandSettings.toBuilder(); saveSnapshotSettings = settings.saveSnapshotSettings.toBuilder(); saveSnapshotOperationSettings = settings.saveSnapshotOperationSettings.toBuilder(); loadSnapshotSettings = settings.loadSnapshotSettings.toBuilder(); loadSnapshotOperationSettings = settings.loadSnapshotOperationSettings.toBuilder(); + databaseFailoverSettings = settings.databaseFailoverSettings.toBuilder(); + databaseFailoverOperationSettings = settings.databaseFailoverOperationSettings.toBuilder(); + fetchDatabasePropertiesSettings = settings.fetchDatabasePropertiesSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -487,8 +582,13 @@ protected Builder(EnvironmentsStubSettings settings) { listEnvironmentsSettings, updateEnvironmentSettings, deleteEnvironmentSettings, + executeAirflowCommandSettings, + stopAirflowCommandSettings, + pollAirflowCommandSettings, saveSnapshotSettings, - loadSnapshotSettings); + loadSnapshotSettings, + databaseFailoverSettings, + fetchDatabasePropertiesSettings); } private static Builder createDefault() { @@ -543,6 +643,21 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .executeAirflowCommandSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .stopAirflowCommandSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .pollAirflowCommandSettings() + .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")) @@ -553,6 +668,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .databaseFailoverSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .fetchDatabasePropertiesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .createEnvironmentOperationSettings() .setInitialCallSettings( @@ -673,6 +798,30 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .databaseFailoverOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(DatabaseFailoverResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + return builder; } @@ -745,6 +894,24 @@ public UnaryCallSettings.Builder getEnvironm return deleteEnvironmentOperationSettings; } + /** Returns the builder for the settings used for calls to executeAirflowCommand. */ + public UnaryCallSettings.Builder + executeAirflowCommandSettings() { + return executeAirflowCommandSettings; + } + + /** Returns the builder for the settings used for calls to stopAirflowCommand. */ + public UnaryCallSettings.Builder + stopAirflowCommandSettings() { + return stopAirflowCommandSettings; + } + + /** Returns the builder for the settings used for calls to pollAirflowCommand. */ + public UnaryCallSettings.Builder + pollAirflowCommandSettings() { + return pollAirflowCommandSettings; + } + /** Returns the builder for the settings used for calls to saveSnapshot. */ public UnaryCallSettings.Builder saveSnapshotSettings() { return saveSnapshotSettings; @@ -773,6 +940,28 @@ public UnaryCallSettings.Builder loadSnapshotSet return loadSnapshotOperationSettings; } + /** Returns the builder for the settings used for calls to databaseFailover. */ + public UnaryCallSettings.Builder + databaseFailoverSettings() { + return databaseFailoverSettings; + } + + /** Returns the builder for the settings used for calls to databaseFailover. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + DatabaseFailoverRequest, DatabaseFailoverResponse, OperationMetadata> + databaseFailoverOperationSettings() { + return databaseFailoverOperationSettings; + } + + /** Returns the builder for the settings used for calls to fetchDatabaseProperties. */ + public UnaryCallSettings.Builder< + FetchDatabasePropertiesRequest, FetchDatabasePropertiesResponse> + fetchDatabasePropertiesSettings() { + return fetchDatabasePropertiesSettings; + } + @Override public EnvironmentsStubSettings build() throws IOException { return new EnvironmentsStubSettings(this); 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 5d44a4190e54..a9ebf64cc170 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 @@ -27,16 +27,26 @@ 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.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.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.ListEnvironmentsRequest; import com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse; 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; +import com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse; import com.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest; import com.google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse; +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.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; @@ -111,6 +121,42 @@ public class GrpcEnvironmentsStub extends EnvironmentsStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + executeAirflowCommandMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1.Environments/ExecuteAirflowCommand") + .setRequestMarshaller( + ProtoUtils.marshaller(ExecuteAirflowCommandRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ExecuteAirflowCommandResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + stopAirflowCommandMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1.Environments/StopAirflowCommand") + .setRequestMarshaller( + ProtoUtils.marshaller(StopAirflowCommandRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(StopAirflowCommandResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + pollAirflowCommandMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1.Environments/PollAirflowCommand") + .setRequestMarshaller( + ProtoUtils.marshaller(PollAirflowCommandRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(PollAirflowCommandResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor saveSnapshotMethodDescriptor = MethodDescriptor.newBuilder() @@ -131,6 +177,31 @@ public class GrpcEnvironmentsStub extends EnvironmentsStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + databaseFailoverMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1.Environments/DatabaseFailover") + .setRequestMarshaller( + ProtoUtils.marshaller(DatabaseFailoverRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + FetchDatabasePropertiesRequest, FetchDatabasePropertiesResponse> + fetchDatabasePropertiesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1.Environments/FetchDatabaseProperties") + .setRequestMarshaller( + ProtoUtils.marshaller(FetchDatabasePropertiesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(FetchDatabasePropertiesResponse.getDefaultInstance())) + .build(); + private final UnaryCallable createEnvironmentCallable; private final OperationCallable createEnvironmentOperationCallable; @@ -145,12 +216,24 @@ public class GrpcEnvironmentsStub extends EnvironmentsStub { private final UnaryCallable deleteEnvironmentCallable; private final OperationCallable deleteEnvironmentOperationCallable; + private final UnaryCallable + executeAirflowCommandCallable; + private final UnaryCallable + stopAirflowCommandCallable; + private final UnaryCallable + pollAirflowCommandCallable; private final UnaryCallable saveSnapshotCallable; private final OperationCallable saveSnapshotOperationCallable; private final UnaryCallable loadSnapshotCallable; private final OperationCallable loadSnapshotOperationCallable; + private final UnaryCallable databaseFailoverCallable; + private final OperationCallable< + DatabaseFailoverRequest, DatabaseFailoverResponse, OperationMetadata> + databaseFailoverOperationCallable; + private final UnaryCallable + fetchDatabasePropertiesCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -245,6 +328,40 @@ protected GrpcEnvironmentsStub( return builder.build(); }) .build(); + GrpcCallSettings + executeAirflowCommandTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(executeAirflowCommandMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); + GrpcCallSettings + stopAirflowCommandTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(stopAirflowCommandMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); + GrpcCallSettings + pollAirflowCommandTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(pollAirflowCommandMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); GrpcCallSettings saveSnapshotTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(saveSnapshotMethodDescriptor) @@ -265,6 +382,28 @@ protected GrpcEnvironmentsStub( return builder.build(); }) .build(); + GrpcCallSettings databaseFailoverTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(databaseFailoverMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); + GrpcCallSettings + fetchDatabasePropertiesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(fetchDatabasePropertiesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); this.createEnvironmentCallable = callableFactory.createUnaryCallable( @@ -308,6 +447,21 @@ protected GrpcEnvironmentsStub( settings.deleteEnvironmentOperationSettings(), clientContext, operationsStub); + this.executeAirflowCommandCallable = + callableFactory.createUnaryCallable( + executeAirflowCommandTransportSettings, + settings.executeAirflowCommandSettings(), + clientContext); + this.stopAirflowCommandCallable = + callableFactory.createUnaryCallable( + stopAirflowCommandTransportSettings, + settings.stopAirflowCommandSettings(), + clientContext); + this.pollAirflowCommandCallable = + callableFactory.createUnaryCallable( + pollAirflowCommandTransportSettings, + settings.pollAirflowCommandSettings(), + clientContext); this.saveSnapshotCallable = callableFactory.createUnaryCallable( saveSnapshotTransportSettings, settings.saveSnapshotSettings(), clientContext); @@ -326,6 +480,20 @@ protected GrpcEnvironmentsStub( settings.loadSnapshotOperationSettings(), clientContext, operationsStub); + this.databaseFailoverCallable = + callableFactory.createUnaryCallable( + databaseFailoverTransportSettings, settings.databaseFailoverSettings(), clientContext); + this.databaseFailoverOperationCallable = + callableFactory.createOperationCallable( + databaseFailoverTransportSettings, + settings.databaseFailoverOperationSettings(), + clientContext, + operationsStub); + this.fetchDatabasePropertiesCallable = + callableFactory.createUnaryCallable( + fetchDatabasePropertiesTransportSettings, + settings.fetchDatabasePropertiesSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -385,6 +553,24 @@ public UnaryCallable deleteEnvironmentCalla return deleteEnvironmentOperationCallable; } + @Override + public UnaryCallable + executeAirflowCommandCallable() { + return executeAirflowCommandCallable; + } + + @Override + public UnaryCallable + stopAirflowCommandCallable() { + return stopAirflowCommandCallable; + } + + @Override + public UnaryCallable + pollAirflowCommandCallable() { + return pollAirflowCommandCallable; + } + @Override public UnaryCallable saveSnapshotCallable() { return saveSnapshotCallable; @@ -407,6 +593,23 @@ public UnaryCallable loadSnapshotCallable() { return loadSnapshotOperationCallable; } + @Override + public UnaryCallable databaseFailoverCallable() { + return databaseFailoverCallable; + } + + @Override + public OperationCallable + databaseFailoverOperationCallable() { + return databaseFailoverOperationCallable; + } + + @Override + public UnaryCallable + fetchDatabasePropertiesCallable() { + return fetchDatabasePropertiesCallable; + } + @Override public final void close() { try { 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 28d252159b8c..125086b06c30 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 @@ -36,16 +36,26 @@ 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.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.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.ListEnvironmentsRequest; import com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse; 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; +import com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse; import com.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest; import com.google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse; +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.common.collect.ImmutableMap; import com.google.longrunning.Operation; @@ -70,6 +80,7 @@ public class HttpJsonEnvironmentsStub extends EnvironmentsStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder() + .add(DatabaseFailoverResponse.getDescriptor()) .add(Environment.getDescriptor()) .add(Empty.getDescriptor()) .add(OperationMetadata.getDescriptor()) @@ -270,6 +281,128 @@ public class HttpJsonEnvironmentsStub extends EnvironmentsStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor< + ExecuteAirflowCommandRequest, ExecuteAirflowCommandResponse> + executeAirflowCommandMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1.Environments/ExecuteAirflowCommand") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{environment=projects/*/locations/*/environments/*}:executeAirflowCommand", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "environment", request.getEnvironment()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", request.toBuilder().clearEnvironment().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ExecuteAirflowCommandResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + stopAirflowCommandMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1.Environments/StopAirflowCommand") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{environment=projects/*/locations/*/environments/*}:stopAirflowCommand", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "environment", request.getEnvironment()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", request.toBuilder().clearEnvironment().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(StopAirflowCommandResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + pollAirflowCommandMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1.Environments/PollAirflowCommand") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{environment=projects/*/locations/*/environments/*}:pollAirflowCommand", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "environment", request.getEnvironment()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", request.toBuilder().clearEnvironment().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(PollAirflowCommandResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor saveSnapshotMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -356,6 +489,87 @@ public class HttpJsonEnvironmentsStub extends EnvironmentsStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor + databaseFailoverMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1.Environments/DatabaseFailover") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{environment=projects/*/locations/*/environments/*}:databaseFailover", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "environment", request.getEnvironment()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", request.toBuilder().clearEnvironment().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DatabaseFailoverRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + FetchDatabasePropertiesRequest, FetchDatabasePropertiesResponse> + fetchDatabasePropertiesMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1.Environments/FetchDatabaseProperties") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{environment=projects/*/locations/*/environments/*}:fetchDatabaseProperties", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "environment", request.getEnvironment()); + 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(FetchDatabasePropertiesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private final UnaryCallable createEnvironmentCallable; private final OperationCallable createEnvironmentOperationCallable; @@ -370,12 +584,24 @@ public class HttpJsonEnvironmentsStub extends EnvironmentsStub { private final UnaryCallable deleteEnvironmentCallable; private final OperationCallable deleteEnvironmentOperationCallable; + private final UnaryCallable + executeAirflowCommandCallable; + private final UnaryCallable + stopAirflowCommandCallable; + private final UnaryCallable + pollAirflowCommandCallable; private final UnaryCallable saveSnapshotCallable; private final OperationCallable saveSnapshotOperationCallable; private final UnaryCallable loadSnapshotCallable; private final OperationCallable loadSnapshotOperationCallable; + private final UnaryCallable databaseFailoverCallable; + private final OperationCallable< + DatabaseFailoverRequest, DatabaseFailoverResponse, OperationMetadata> + databaseFailoverOperationCallable; + private final UnaryCallable + fetchDatabasePropertiesCallable; private final BackgroundResource backgroundResources; private final HttpJsonOperationsStub httpJsonOperationsStub; @@ -498,6 +724,43 @@ protected HttpJsonEnvironmentsStub( return builder.build(); }) .build(); + HttpJsonCallSettings + executeAirflowCommandTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(executeAirflowCommandMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + stopAirflowCommandTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(stopAirflowCommandMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + pollAirflowCommandTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(pollAirflowCommandMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); HttpJsonCallSettings saveSnapshotTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(saveSnapshotMethodDescriptor) @@ -520,6 +783,30 @@ protected HttpJsonEnvironmentsStub( return builder.build(); }) .build(); + HttpJsonCallSettings databaseFailoverTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(databaseFailoverMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + fetchDatabasePropertiesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(fetchDatabasePropertiesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); this.createEnvironmentCallable = callableFactory.createUnaryCallable( @@ -563,6 +850,21 @@ protected HttpJsonEnvironmentsStub( settings.deleteEnvironmentOperationSettings(), clientContext, httpJsonOperationsStub); + this.executeAirflowCommandCallable = + callableFactory.createUnaryCallable( + executeAirflowCommandTransportSettings, + settings.executeAirflowCommandSettings(), + clientContext); + this.stopAirflowCommandCallable = + callableFactory.createUnaryCallable( + stopAirflowCommandTransportSettings, + settings.stopAirflowCommandSettings(), + clientContext); + this.pollAirflowCommandCallable = + callableFactory.createUnaryCallable( + pollAirflowCommandTransportSettings, + settings.pollAirflowCommandSettings(), + clientContext); this.saveSnapshotCallable = callableFactory.createUnaryCallable( saveSnapshotTransportSettings, settings.saveSnapshotSettings(), clientContext); @@ -581,6 +883,20 @@ protected HttpJsonEnvironmentsStub( settings.loadSnapshotOperationSettings(), clientContext, httpJsonOperationsStub); + this.databaseFailoverCallable = + callableFactory.createUnaryCallable( + databaseFailoverTransportSettings, settings.databaseFailoverSettings(), clientContext); + this.databaseFailoverOperationCallable = + callableFactory.createOperationCallable( + databaseFailoverTransportSettings, + settings.databaseFailoverOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.fetchDatabasePropertiesCallable = + callableFactory.createUnaryCallable( + fetchDatabasePropertiesTransportSettings, + settings.fetchDatabasePropertiesSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -594,8 +910,13 @@ public static List getMethodDescriptors() { methodDescriptors.add(listEnvironmentsMethodDescriptor); methodDescriptors.add(updateEnvironmentMethodDescriptor); methodDescriptors.add(deleteEnvironmentMethodDescriptor); + methodDescriptors.add(executeAirflowCommandMethodDescriptor); + methodDescriptors.add(stopAirflowCommandMethodDescriptor); + methodDescriptors.add(pollAirflowCommandMethodDescriptor); methodDescriptors.add(saveSnapshotMethodDescriptor); methodDescriptors.add(loadSnapshotMethodDescriptor); + methodDescriptors.add(databaseFailoverMethodDescriptor); + methodDescriptors.add(fetchDatabasePropertiesMethodDescriptor); return methodDescriptors; } @@ -653,6 +974,24 @@ public UnaryCallable deleteEnvironmentCalla return deleteEnvironmentOperationCallable; } + @Override + public UnaryCallable + executeAirflowCommandCallable() { + return executeAirflowCommandCallable; + } + + @Override + public UnaryCallable + stopAirflowCommandCallable() { + return stopAirflowCommandCallable; + } + + @Override + public UnaryCallable + pollAirflowCommandCallable() { + return pollAirflowCommandCallable; + } + @Override public UnaryCallable saveSnapshotCallable() { return saveSnapshotCallable; @@ -675,6 +1014,23 @@ public UnaryCallable loadSnapshotCallable() { return loadSnapshotOperationCallable; } + @Override + public UnaryCallable databaseFailoverCallable() { + return databaseFailoverCallable; + } + + @Override + public OperationCallable + databaseFailoverOperationCallable() { + return databaseFailoverOperationCallable; + } + + @Override + public UnaryCallable + fetchDatabasePropertiesCallable() { + return fetchDatabasePropertiesCallable; + } + @Override public final void close() { try { diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsClient.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsClient.java index 39d8e13064cb..6c9162cd95ee 100644 --- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsClient.java +++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsClient.java @@ -1038,6 +1038,200 @@ public final UnaryCallable checkUpgradeCallable( return stub.checkUpgradeCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Executes Airflow CLI command. + * + *

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()) {
+   *   ExecuteAirflowCommandRequest request =
+   *       ExecuteAirflowCommandRequest.newBuilder()
+   *           .setEnvironment("environment-85904877")
+   *           .setCommand("command950394699")
+   *           .setSubcommand("subcommand2099091723")
+   *           .addAllParameters(new ArrayList())
+   *           .build();
+   *   ExecuteAirflowCommandResponse response = environmentsClient.executeAirflowCommand(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 ExecuteAirflowCommandResponse executeAirflowCommand( + ExecuteAirflowCommandRequest request) { + return executeAirflowCommandCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Executes Airflow CLI command. + * + *

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()) {
+   *   ExecuteAirflowCommandRequest request =
+   *       ExecuteAirflowCommandRequest.newBuilder()
+   *           .setEnvironment("environment-85904877")
+   *           .setCommand("command950394699")
+   *           .setSubcommand("subcommand2099091723")
+   *           .addAllParameters(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.executeAirflowCommandCallable().futureCall(request);
+   *   // Do something.
+   *   ExecuteAirflowCommandResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + executeAirflowCommandCallable() { + return stub.executeAirflowCommandCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops Airflow CLI command execution. + * + *

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()) {
+   *   StopAirflowCommandRequest request =
+   *       StopAirflowCommandRequest.newBuilder()
+   *           .setEnvironment("environment-85904877")
+   *           .setExecutionId("executionId-454906285")
+   *           .setPod("pod111173")
+   *           .setPodNamespace("podNamespace463962262")
+   *           .setForce(true)
+   *           .build();
+   *   StopAirflowCommandResponse response = environmentsClient.stopAirflowCommand(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 StopAirflowCommandResponse stopAirflowCommand(StopAirflowCommandRequest request) { + return stopAirflowCommandCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Stops Airflow CLI command execution. + * + *

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()) {
+   *   StopAirflowCommandRequest request =
+   *       StopAirflowCommandRequest.newBuilder()
+   *           .setEnvironment("environment-85904877")
+   *           .setExecutionId("executionId-454906285")
+   *           .setPod("pod111173")
+   *           .setPodNamespace("podNamespace463962262")
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.stopAirflowCommandCallable().futureCall(request);
+   *   // Do something.
+   *   StopAirflowCommandResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + stopAirflowCommandCallable() { + return stub.stopAirflowCommandCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Polls Airflow CLI command execution and fetches logs. + * + *

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()) {
+   *   PollAirflowCommandRequest request =
+   *       PollAirflowCommandRequest.newBuilder()
+   *           .setEnvironment("environment-85904877")
+   *           .setExecutionId("executionId-454906285")
+   *           .setPod("pod111173")
+   *           .setPodNamespace("podNamespace463962262")
+   *           .setNextLineNumber(1176642216)
+   *           .build();
+   *   PollAirflowCommandResponse response = environmentsClient.pollAirflowCommand(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 PollAirflowCommandResponse pollAirflowCommand(PollAirflowCommandRequest request) { + return pollAirflowCommandCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Polls Airflow CLI command execution and fetches logs. + * + *

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()) {
+   *   PollAirflowCommandRequest request =
+   *       PollAirflowCommandRequest.newBuilder()
+   *           .setEnvironment("environment-85904877")
+   *           .setExecutionId("executionId-454906285")
+   *           .setPod("pod111173")
+   *           .setPodNamespace("podNamespace463962262")
+   *           .setNextLineNumber(1176642216)
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.pollAirflowCommandCallable().futureCall(request);
+   *   // Do something.
+   *   PollAirflowCommandResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + pollAirflowCommandCallable() { + return stub.pollAirflowCommandCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a snapshots of a Cloud Composer environment. @@ -1244,6 +1438,148 @@ public final UnaryCallable loadSnapshotCallable( return stub.loadSnapshotCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Triggers database failover (only for highly resilient environments). + * + *

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()) {
+   *   DatabaseFailoverRequest request =
+   *       DatabaseFailoverRequest.newBuilder().setEnvironment("environment-85904877").build();
+   *   DatabaseFailoverResponse response = environmentsClient.databaseFailoverAsync(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 databaseFailoverAsync( + DatabaseFailoverRequest request) { + return databaseFailoverOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Triggers database failover (only for highly resilient environments). + * + *

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()) {
+   *   DatabaseFailoverRequest request =
+   *       DatabaseFailoverRequest.newBuilder().setEnvironment("environment-85904877").build();
+   *   OperationFuture future =
+   *       environmentsClient.databaseFailoverOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DatabaseFailoverResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + DatabaseFailoverRequest, DatabaseFailoverResponse, OperationMetadata> + databaseFailoverOperationCallable() { + return stub.databaseFailoverOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Triggers database failover (only for highly resilient environments). + * + *

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()) {
+   *   DatabaseFailoverRequest request =
+   *       DatabaseFailoverRequest.newBuilder().setEnvironment("environment-85904877").build();
+   *   ApiFuture future =
+   *       environmentsClient.databaseFailoverCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable databaseFailoverCallable() { + return stub.databaseFailoverCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches database properties. + * + *

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()) {
+   *   FetchDatabasePropertiesRequest request =
+   *       FetchDatabasePropertiesRequest.newBuilder()
+   *           .setEnvironment(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString())
+   *           .build();
+   *   FetchDatabasePropertiesResponse response =
+   *       environmentsClient.fetchDatabaseProperties(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 FetchDatabasePropertiesResponse fetchDatabaseProperties( + FetchDatabasePropertiesRequest request) { + return fetchDatabasePropertiesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Fetches database properties. + * + *

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()) {
+   *   FetchDatabasePropertiesRequest request =
+   *       FetchDatabasePropertiesRequest.newBuilder()
+   *           .setEnvironment(
+   *               EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.fetchDatabasePropertiesCallable().futureCall(request);
+   *   // Do something.
+   *   FetchDatabasePropertiesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + fetchDatabasePropertiesCallable() { + return stub.fetchDatabasePropertiesCallable(); + } + @Override public final void close() { stub.close(); diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsSettings.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsSettings.java index 54627d184b90..16e8d07d0be4 100644 --- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsSettings.java +++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsSettings.java @@ -145,6 +145,24 @@ public UnaryCallSettings checkUpgradeSettings() return ((EnvironmentsStubSettings) getStubSettings()).checkUpgradeOperationSettings(); } + /** Returns the object with the settings used for calls to executeAirflowCommand. */ + public UnaryCallSettings + executeAirflowCommandSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).executeAirflowCommandSettings(); + } + + /** Returns the object with the settings used for calls to stopAirflowCommand. */ + public UnaryCallSettings + stopAirflowCommandSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).stopAirflowCommandSettings(); + } + + /** Returns the object with the settings used for calls to pollAirflowCommand. */ + public UnaryCallSettings + pollAirflowCommandSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).pollAirflowCommandSettings(); + } + /** Returns the object with the settings used for calls to saveSnapshot. */ public UnaryCallSettings saveSnapshotSettings() { return ((EnvironmentsStubSettings) getStubSettings()).saveSnapshotSettings(); @@ -167,6 +185,23 @@ public UnaryCallSettings loadSnapshotSettings() return ((EnvironmentsStubSettings) getStubSettings()).loadSnapshotOperationSettings(); } + /** Returns the object with the settings used for calls to databaseFailover. */ + public UnaryCallSettings databaseFailoverSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).databaseFailoverSettings(); + } + + /** Returns the object with the settings used for calls to databaseFailover. */ + public OperationCallSettings + databaseFailoverOperationSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).databaseFailoverOperationSettings(); + } + + /** Returns the object with the settings used for calls to fetchDatabaseProperties. */ + public UnaryCallSettings + fetchDatabasePropertiesSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).fetchDatabasePropertiesSettings(); + } + public static final EnvironmentsSettings create(EnvironmentsStubSettings stub) throws IOException { return new EnvironmentsSettings.Builder(stub.toBuilder()).build(); @@ -354,6 +389,24 @@ public UnaryCallSettings.Builder checkUpgradeSet return getStubSettingsBuilder().checkUpgradeOperationSettings(); } + /** Returns the builder for the settings used for calls to executeAirflowCommand. */ + public UnaryCallSettings.Builder + executeAirflowCommandSettings() { + return getStubSettingsBuilder().executeAirflowCommandSettings(); + } + + /** Returns the builder for the settings used for calls to stopAirflowCommand. */ + public UnaryCallSettings.Builder + stopAirflowCommandSettings() { + return getStubSettingsBuilder().stopAirflowCommandSettings(); + } + + /** Returns the builder for the settings used for calls to pollAirflowCommand. */ + public UnaryCallSettings.Builder + pollAirflowCommandSettings() { + return getStubSettingsBuilder().pollAirflowCommandSettings(); + } + /** Returns the builder for the settings used for calls to saveSnapshot. */ public UnaryCallSettings.Builder saveSnapshotSettings() { return getStubSettingsBuilder().saveSnapshotSettings(); @@ -378,6 +431,26 @@ public UnaryCallSettings.Builder loadSnapshotSet return getStubSettingsBuilder().loadSnapshotOperationSettings(); } + /** Returns the builder for the settings used for calls to databaseFailover. */ + public UnaryCallSettings.Builder + databaseFailoverSettings() { + return getStubSettingsBuilder().databaseFailoverSettings(); + } + + /** Returns the builder for the settings used for calls to databaseFailover. */ + public OperationCallSettings.Builder< + DatabaseFailoverRequest, DatabaseFailoverResponse, OperationMetadata> + databaseFailoverOperationSettings() { + return getStubSettingsBuilder().databaseFailoverOperationSettings(); + } + + /** Returns the builder for the settings used for calls to fetchDatabaseProperties. */ + public UnaryCallSettings.Builder< + FetchDatabasePropertiesRequest, FetchDatabasePropertiesResponse> + fetchDatabasePropertiesSettings() { + return getStubSettingsBuilder().fetchDatabasePropertiesSettings(); + } + @Override public EnvironmentsSettings build() throws IOException { return new EnvironmentsSettings(this); diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/gapic_metadata.json b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/gapic_metadata.json index 7dc984174935..a622da8ed259 100644 --- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/gapic_metadata.json +++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/gapic_metadata.json @@ -16,9 +16,18 @@ "CreateEnvironment": { "methods": ["createEnvironmentAsync", "createEnvironmentAsync", "createEnvironmentOperationCallable", "createEnvironmentCallable"] }, + "DatabaseFailover": { + "methods": ["databaseFailoverAsync", "databaseFailoverOperationCallable", "databaseFailoverCallable"] + }, "DeleteEnvironment": { "methods": ["deleteEnvironmentAsync", "deleteEnvironmentAsync", "deleteEnvironmentOperationCallable", "deleteEnvironmentCallable"] }, + "ExecuteAirflowCommand": { + "methods": ["executeAirflowCommand", "executeAirflowCommandCallable"] + }, + "FetchDatabaseProperties": { + "methods": ["fetchDatabaseProperties", "fetchDatabasePropertiesCallable"] + }, "GetEnvironment": { "methods": ["getEnvironment", "getEnvironment", "getEnvironmentCallable"] }, @@ -28,12 +37,18 @@ "LoadSnapshot": { "methods": ["loadSnapshotAsync", "loadSnapshotOperationCallable", "loadSnapshotCallable"] }, + "PollAirflowCommand": { + "methods": ["pollAirflowCommand", "pollAirflowCommandCallable"] + }, "RestartWebServer": { "methods": ["restartWebServerAsync", "restartWebServerOperationCallable", "restartWebServerCallable"] }, "SaveSnapshot": { "methods": ["saveSnapshotAsync", "saveSnapshotOperationCallable", "saveSnapshotCallable"] }, + "StopAirflowCommand": { + "methods": ["stopAirflowCommand", "stopAirflowCommandCallable"] + }, "UpdateEnvironment": { "methods": ["updateEnvironmentAsync", "updateEnvironmentAsync", "updateEnvironmentOperationCallable", "updateEnvironmentCallable"] } diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/EnvironmentsStub.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/EnvironmentsStub.java index 3f54f7cca523..9aa91c367bb6 100644 --- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/EnvironmentsStub.java +++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/EnvironmentsStub.java @@ -25,17 +25,27 @@ import com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.Environment; +import com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse; +import com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata; +import com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse; +import com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest; import com.google.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; @@ -122,6 +132,21 @@ public UnaryCallable checkUpgradeCallable() { throw new UnsupportedOperationException("Not implemented: checkUpgradeCallable()"); } + public UnaryCallable + executeAirflowCommandCallable() { + throw new UnsupportedOperationException("Not implemented: executeAirflowCommandCallable()"); + } + + public UnaryCallable + stopAirflowCommandCallable() { + throw new UnsupportedOperationException("Not implemented: stopAirflowCommandCallable()"); + } + + public UnaryCallable + pollAirflowCommandCallable() { + throw new UnsupportedOperationException("Not implemented: pollAirflowCommandCallable()"); + } + public OperationCallable saveSnapshotOperationCallable() { throw new UnsupportedOperationException("Not implemented: saveSnapshotOperationCallable()"); @@ -140,6 +165,20 @@ public UnaryCallable loadSnapshotCallable() { throw new UnsupportedOperationException("Not implemented: loadSnapshotCallable()"); } + public OperationCallable + databaseFailoverOperationCallable() { + throw new UnsupportedOperationException("Not implemented: databaseFailoverOperationCallable()"); + } + + public UnaryCallable databaseFailoverCallable() { + throw new UnsupportedOperationException("Not implemented: databaseFailoverCallable()"); + } + + public UnaryCallable + fetchDatabasePropertiesCallable() { + throw new UnsupportedOperationException("Not implemented: fetchDatabasePropertiesCallable()"); + } + @Override public abstract void close(); } diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/EnvironmentsStubSettings.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/EnvironmentsStubSettings.java index 8f494a5ea217..5c7ad30cd3f3 100644 --- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/EnvironmentsStubSettings.java +++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/EnvironmentsStubSettings.java @@ -50,17 +50,27 @@ import com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.Environment; +import com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse; +import com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata; +import com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse; +import com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -136,12 +146,24 @@ public class EnvironmentsStubSettings extends StubSettings checkUpgradeSettings; private final OperationCallSettings checkUpgradeOperationSettings; + private final UnaryCallSettings + executeAirflowCommandSettings; + private final UnaryCallSettings + stopAirflowCommandSettings; + private final UnaryCallSettings + pollAirflowCommandSettings; private final UnaryCallSettings saveSnapshotSettings; private final OperationCallSettings saveSnapshotOperationSettings; private final UnaryCallSettings loadSnapshotSettings; private final OperationCallSettings loadSnapshotOperationSettings; + private final UnaryCallSettings databaseFailoverSettings; + private final OperationCallSettings< + DatabaseFailoverRequest, DatabaseFailoverResponse, OperationMetadata> + databaseFailoverOperationSettings; + private final UnaryCallSettings + fetchDatabasePropertiesSettings; private static final PagedListDescriptor< ListEnvironmentsRequest, ListEnvironmentsResponse, Environment> @@ -269,6 +291,24 @@ public UnaryCallSettings checkUpgradeSettings() return checkUpgradeOperationSettings; } + /** Returns the object with the settings used for calls to executeAirflowCommand. */ + public UnaryCallSettings + executeAirflowCommandSettings() { + return executeAirflowCommandSettings; + } + + /** Returns the object with the settings used for calls to stopAirflowCommand. */ + public UnaryCallSettings + stopAirflowCommandSettings() { + return stopAirflowCommandSettings; + } + + /** Returns the object with the settings used for calls to pollAirflowCommand. */ + public UnaryCallSettings + pollAirflowCommandSettings() { + return pollAirflowCommandSettings; + } + /** Returns the object with the settings used for calls to saveSnapshot. */ public UnaryCallSettings saveSnapshotSettings() { return saveSnapshotSettings; @@ -291,6 +331,23 @@ public UnaryCallSettings loadSnapshotSettings() return loadSnapshotOperationSettings; } + /** Returns the object with the settings used for calls to databaseFailover. */ + public UnaryCallSettings databaseFailoverSettings() { + return databaseFailoverSettings; + } + + /** Returns the object with the settings used for calls to databaseFailover. */ + public OperationCallSettings + databaseFailoverOperationSettings() { + return databaseFailoverOperationSettings; + } + + /** Returns the object with the settings used for calls to fetchDatabaseProperties. */ + public UnaryCallSettings + fetchDatabasePropertiesSettings() { + return fetchDatabasePropertiesSettings; + } + public EnvironmentsStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -412,10 +469,16 @@ protected EnvironmentsStubSettings(Builder settingsBuilder) throws IOException { restartWebServerOperationSettings = settingsBuilder.restartWebServerOperationSettings().build(); checkUpgradeSettings = settingsBuilder.checkUpgradeSettings().build(); checkUpgradeOperationSettings = settingsBuilder.checkUpgradeOperationSettings().build(); + executeAirflowCommandSettings = settingsBuilder.executeAirflowCommandSettings().build(); + stopAirflowCommandSettings = settingsBuilder.stopAirflowCommandSettings().build(); + pollAirflowCommandSettings = settingsBuilder.pollAirflowCommandSettings().build(); saveSnapshotSettings = settingsBuilder.saveSnapshotSettings().build(); saveSnapshotOperationSettings = settingsBuilder.saveSnapshotOperationSettings().build(); loadSnapshotSettings = settingsBuilder.loadSnapshotSettings().build(); loadSnapshotOperationSettings = settingsBuilder.loadSnapshotOperationSettings().build(); + databaseFailoverSettings = settingsBuilder.databaseFailoverSettings().build(); + databaseFailoverOperationSettings = settingsBuilder.databaseFailoverOperationSettings().build(); + fetchDatabasePropertiesSettings = settingsBuilder.fetchDatabasePropertiesSettings().build(); } /** Builder for EnvironmentsStubSettings. */ @@ -449,6 +512,13 @@ public static class Builder extends StubSettings.Builder checkUpgradeOperationSettings; + private final UnaryCallSettings.Builder< + ExecuteAirflowCommandRequest, ExecuteAirflowCommandResponse> + executeAirflowCommandSettings; + private final UnaryCallSettings.Builder + stopAirflowCommandSettings; + private final UnaryCallSettings.Builder + pollAirflowCommandSettings; private final UnaryCallSettings.Builder saveSnapshotSettings; private final OperationCallSettings.Builder< SaveSnapshotRequest, SaveSnapshotResponse, OperationMetadata> @@ -457,6 +527,14 @@ public static class Builder extends StubSettings.Builder loadSnapshotOperationSettings; + private final UnaryCallSettings.Builder + databaseFailoverSettings; + private final OperationCallSettings.Builder< + DatabaseFailoverRequest, DatabaseFailoverResponse, OperationMetadata> + databaseFailoverOperationSettings; + private final UnaryCallSettings.Builder< + FetchDatabasePropertiesRequest, FetchDatabasePropertiesResponse> + fetchDatabasePropertiesSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -496,10 +574,16 @@ protected Builder(ClientContext clientContext) { restartWebServerOperationSettings = OperationCallSettings.newBuilder(); checkUpgradeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); checkUpgradeOperationSettings = OperationCallSettings.newBuilder(); + executeAirflowCommandSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + stopAirflowCommandSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + pollAirflowCommandSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); saveSnapshotSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); saveSnapshotOperationSettings = OperationCallSettings.newBuilder(); loadSnapshotSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); loadSnapshotOperationSettings = OperationCallSettings.newBuilder(); + databaseFailoverSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + databaseFailoverOperationSettings = OperationCallSettings.newBuilder(); + fetchDatabasePropertiesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -510,8 +594,13 @@ protected Builder(ClientContext clientContext) { deleteEnvironmentSettings, restartWebServerSettings, checkUpgradeSettings, + executeAirflowCommandSettings, + stopAirflowCommandSettings, + pollAirflowCommandSettings, saveSnapshotSettings, - loadSnapshotSettings); + loadSnapshotSettings, + databaseFailoverSettings, + fetchDatabasePropertiesSettings); initDefaults(this); } @@ -530,10 +619,16 @@ protected Builder(EnvironmentsStubSettings settings) { restartWebServerOperationSettings = settings.restartWebServerOperationSettings.toBuilder(); checkUpgradeSettings = settings.checkUpgradeSettings.toBuilder(); checkUpgradeOperationSettings = settings.checkUpgradeOperationSettings.toBuilder(); + executeAirflowCommandSettings = settings.executeAirflowCommandSettings.toBuilder(); + stopAirflowCommandSettings = settings.stopAirflowCommandSettings.toBuilder(); + pollAirflowCommandSettings = settings.pollAirflowCommandSettings.toBuilder(); saveSnapshotSettings = settings.saveSnapshotSettings.toBuilder(); saveSnapshotOperationSettings = settings.saveSnapshotOperationSettings.toBuilder(); loadSnapshotSettings = settings.loadSnapshotSettings.toBuilder(); loadSnapshotOperationSettings = settings.loadSnapshotOperationSettings.toBuilder(); + databaseFailoverSettings = settings.databaseFailoverSettings.toBuilder(); + databaseFailoverOperationSettings = settings.databaseFailoverOperationSettings.toBuilder(); + fetchDatabasePropertiesSettings = settings.fetchDatabasePropertiesSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -544,8 +639,13 @@ protected Builder(EnvironmentsStubSettings settings) { deleteEnvironmentSettings, restartWebServerSettings, checkUpgradeSettings, + executeAirflowCommandSettings, + stopAirflowCommandSettings, + pollAirflowCommandSettings, saveSnapshotSettings, - loadSnapshotSettings); + loadSnapshotSettings, + databaseFailoverSettings, + fetchDatabasePropertiesSettings); } private static Builder createDefault() { @@ -610,6 +710,21 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .executeAirflowCommandSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .stopAirflowCommandSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .pollAirflowCommandSettings() + .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")) @@ -620,6 +735,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .databaseFailoverSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .fetchDatabasePropertiesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .createEnvironmentOperationSettings() .setInitialCallSettings( @@ -788,6 +913,30 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .databaseFailoverOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(DatabaseFailoverResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + return builder; } @@ -888,6 +1037,24 @@ public UnaryCallSettings.Builder checkUpgradeSet return checkUpgradeOperationSettings; } + /** Returns the builder for the settings used for calls to executeAirflowCommand. */ + public UnaryCallSettings.Builder + executeAirflowCommandSettings() { + return executeAirflowCommandSettings; + } + + /** Returns the builder for the settings used for calls to stopAirflowCommand. */ + public UnaryCallSettings.Builder + stopAirflowCommandSettings() { + return stopAirflowCommandSettings; + } + + /** Returns the builder for the settings used for calls to pollAirflowCommand. */ + public UnaryCallSettings.Builder + pollAirflowCommandSettings() { + return pollAirflowCommandSettings; + } + /** Returns the builder for the settings used for calls to saveSnapshot. */ public UnaryCallSettings.Builder saveSnapshotSettings() { return saveSnapshotSettings; @@ -916,6 +1083,28 @@ public UnaryCallSettings.Builder loadSnapshotSet return loadSnapshotOperationSettings; } + /** Returns the builder for the settings used for calls to databaseFailover. */ + public UnaryCallSettings.Builder + databaseFailoverSettings() { + return databaseFailoverSettings; + } + + /** Returns the builder for the settings used for calls to databaseFailover. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + DatabaseFailoverRequest, DatabaseFailoverResponse, OperationMetadata> + databaseFailoverOperationSettings() { + return databaseFailoverOperationSettings; + } + + /** Returns the builder for the settings used for calls to fetchDatabaseProperties. */ + public UnaryCallSettings.Builder< + FetchDatabasePropertiesRequest, FetchDatabasePropertiesResponse> + fetchDatabasePropertiesSettings() { + return fetchDatabasePropertiesSettings; + } + @Override public EnvironmentsStubSettings build() throws IOException { return new EnvironmentsStubSettings(this); diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/GrpcEnvironmentsStub.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/GrpcEnvironmentsStub.java index c964a17cae43..00d8b8041220 100644 --- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/GrpcEnvironmentsStub.java +++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/GrpcEnvironmentsStub.java @@ -30,17 +30,27 @@ import com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.Environment; +import com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse; +import com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata; +import com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse; +import com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; @@ -137,6 +147,42 @@ public class GrpcEnvironmentsStub extends EnvironmentsStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + executeAirflowCommandMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1beta1.Environments/ExecuteAirflowCommand") + .setRequestMarshaller( + ProtoUtils.marshaller(ExecuteAirflowCommandRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ExecuteAirflowCommandResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + stopAirflowCommandMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1beta1.Environments/StopAirflowCommand") + .setRequestMarshaller( + ProtoUtils.marshaller(StopAirflowCommandRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(StopAirflowCommandResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + pollAirflowCommandMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1beta1.Environments/PollAirflowCommand") + .setRequestMarshaller( + ProtoUtils.marshaller(PollAirflowCommandRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(PollAirflowCommandResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor saveSnapshotMethodDescriptor = MethodDescriptor.newBuilder() @@ -157,6 +203,31 @@ public class GrpcEnvironmentsStub extends EnvironmentsStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + databaseFailoverMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1beta1.Environments/DatabaseFailover") + .setRequestMarshaller( + ProtoUtils.marshaller(DatabaseFailoverRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + FetchDatabasePropertiesRequest, FetchDatabasePropertiesResponse> + fetchDatabasePropertiesMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1beta1.Environments/FetchDatabaseProperties") + .setRequestMarshaller( + ProtoUtils.marshaller(FetchDatabasePropertiesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(FetchDatabasePropertiesResponse.getDefaultInstance())) + .build(); + private final UnaryCallable createEnvironmentCallable; private final OperationCallable createEnvironmentOperationCallable; @@ -177,12 +248,24 @@ public class GrpcEnvironmentsStub extends EnvironmentsStub { private final UnaryCallable checkUpgradeCallable; private final OperationCallable checkUpgradeOperationCallable; + private final UnaryCallable + executeAirflowCommandCallable; + private final UnaryCallable + stopAirflowCommandCallable; + private final UnaryCallable + pollAirflowCommandCallable; private final UnaryCallable saveSnapshotCallable; private final OperationCallable saveSnapshotOperationCallable; private final UnaryCallable loadSnapshotCallable; private final OperationCallable loadSnapshotOperationCallable; + private final UnaryCallable databaseFailoverCallable; + private final OperationCallable< + DatabaseFailoverRequest, DatabaseFailoverResponse, OperationMetadata> + databaseFailoverOperationCallable; + private final UnaryCallable + fetchDatabasePropertiesCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -297,6 +380,40 @@ protected GrpcEnvironmentsStub( return builder.build(); }) .build(); + GrpcCallSettings + executeAirflowCommandTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(executeAirflowCommandMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); + GrpcCallSettings + stopAirflowCommandTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(stopAirflowCommandMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); + GrpcCallSettings + pollAirflowCommandTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(pollAirflowCommandMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); GrpcCallSettings saveSnapshotTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(saveSnapshotMethodDescriptor) @@ -317,6 +434,28 @@ protected GrpcEnvironmentsStub( return builder.build(); }) .build(); + GrpcCallSettings databaseFailoverTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(databaseFailoverMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); + GrpcCallSettings + fetchDatabasePropertiesTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(fetchDatabasePropertiesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); this.createEnvironmentCallable = callableFactory.createUnaryCallable( @@ -378,6 +517,21 @@ protected GrpcEnvironmentsStub( settings.checkUpgradeOperationSettings(), clientContext, operationsStub); + this.executeAirflowCommandCallable = + callableFactory.createUnaryCallable( + executeAirflowCommandTransportSettings, + settings.executeAirflowCommandSettings(), + clientContext); + this.stopAirflowCommandCallable = + callableFactory.createUnaryCallable( + stopAirflowCommandTransportSettings, + settings.stopAirflowCommandSettings(), + clientContext); + this.pollAirflowCommandCallable = + callableFactory.createUnaryCallable( + pollAirflowCommandTransportSettings, + settings.pollAirflowCommandSettings(), + clientContext); this.saveSnapshotCallable = callableFactory.createUnaryCallable( saveSnapshotTransportSettings, settings.saveSnapshotSettings(), clientContext); @@ -396,6 +550,20 @@ protected GrpcEnvironmentsStub( settings.loadSnapshotOperationSettings(), clientContext, operationsStub); + this.databaseFailoverCallable = + callableFactory.createUnaryCallable( + databaseFailoverTransportSettings, settings.databaseFailoverSettings(), clientContext); + this.databaseFailoverOperationCallable = + callableFactory.createOperationCallable( + databaseFailoverTransportSettings, + settings.databaseFailoverOperationSettings(), + clientContext, + operationsStub); + this.fetchDatabasePropertiesCallable = + callableFactory.createUnaryCallable( + fetchDatabasePropertiesTransportSettings, + settings.fetchDatabasePropertiesSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -477,6 +645,24 @@ public UnaryCallable checkUpgradeCallable() { return checkUpgradeOperationCallable; } + @Override + public UnaryCallable + executeAirflowCommandCallable() { + return executeAirflowCommandCallable; + } + + @Override + public UnaryCallable + stopAirflowCommandCallable() { + return stopAirflowCommandCallable; + } + + @Override + public UnaryCallable + pollAirflowCommandCallable() { + return pollAirflowCommandCallable; + } + @Override public UnaryCallable saveSnapshotCallable() { return saveSnapshotCallable; @@ -499,6 +685,23 @@ public UnaryCallable loadSnapshotCallable() { return loadSnapshotOperationCallable; } + @Override + public UnaryCallable databaseFailoverCallable() { + return databaseFailoverCallable; + } + + @Override + public OperationCallable + databaseFailoverOperationCallable() { + return databaseFailoverOperationCallable; + } + + @Override + public UnaryCallable + fetchDatabasePropertiesCallable() { + return fetchDatabasePropertiesCallable; + } + @Override public final void close() { try { diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/HttpJsonEnvironmentsStub.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/HttpJsonEnvironmentsStub.java index 8437c9738763..36bde5832bd5 100644 --- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/HttpJsonEnvironmentsStub.java +++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/HttpJsonEnvironmentsStub.java @@ -38,17 +38,27 @@ import com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.Environment; +import com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse; +import com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata; +import com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest; import com.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse; +import com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse; import com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest; import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; @@ -75,6 +85,7 @@ public class HttpJsonEnvironmentsStub extends EnvironmentsStub { TypeRegistry.newBuilder() .add(Empty.getDescriptor()) .add(OperationMetadata.getDescriptor()) + .add(DatabaseFailoverResponse.getDescriptor()) .add(LoadSnapshotResponse.getDescriptor()) .add(Environment.getDescriptor()) .add(CheckUpgradeResponse.getDescriptor()) @@ -358,6 +369,128 @@ public class HttpJsonEnvironmentsStub extends EnvironmentsStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor< + ExecuteAirflowCommandRequest, ExecuteAirflowCommandResponse> + executeAirflowCommandMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1beta1.Environments/ExecuteAirflowCommand") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{environment=projects/*/locations/*/environments/*}:executeAirflowCommand", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "environment", request.getEnvironment()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", request.toBuilder().clearEnvironment().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ExecuteAirflowCommandResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + stopAirflowCommandMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1beta1.Environments/StopAirflowCommand") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{environment=projects/*/locations/*/environments/*}:stopAirflowCommand", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "environment", request.getEnvironment()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", request.toBuilder().clearEnvironment().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(StopAirflowCommandResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + pollAirflowCommandMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1beta1.Environments/PollAirflowCommand") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{environment=projects/*/locations/*/environments/*}:pollAirflowCommand", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "environment", request.getEnvironment()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", request.toBuilder().clearEnvironment().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(PollAirflowCommandResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor saveSnapshotMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -444,6 +577,87 @@ public class HttpJsonEnvironmentsStub extends EnvironmentsStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor + databaseFailoverMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1beta1.Environments/DatabaseFailover") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{environment=projects/*/locations/*/environments/*}:databaseFailover", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "environment", request.getEnvironment()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", request.toBuilder().clearEnvironment().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DatabaseFailoverRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + FetchDatabasePropertiesRequest, FetchDatabasePropertiesResponse> + fetchDatabasePropertiesMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1beta1.Environments/FetchDatabaseProperties") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{environment=projects/*/locations/*/environments/*}:fetchDatabaseProperties", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "environment", request.getEnvironment()); + 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(FetchDatabasePropertiesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private final UnaryCallable createEnvironmentCallable; private final OperationCallable createEnvironmentOperationCallable; @@ -464,12 +678,24 @@ public class HttpJsonEnvironmentsStub extends EnvironmentsStub { private final UnaryCallable checkUpgradeCallable; private final OperationCallable checkUpgradeOperationCallable; + private final UnaryCallable + executeAirflowCommandCallable; + private final UnaryCallable + stopAirflowCommandCallable; + private final UnaryCallable + pollAirflowCommandCallable; private final UnaryCallable saveSnapshotCallable; private final OperationCallable saveSnapshotOperationCallable; private final UnaryCallable loadSnapshotCallable; private final OperationCallable loadSnapshotOperationCallable; + private final UnaryCallable databaseFailoverCallable; + private final OperationCallable< + DatabaseFailoverRequest, DatabaseFailoverResponse, OperationMetadata> + databaseFailoverOperationCallable; + private final UnaryCallable + fetchDatabasePropertiesCallable; private final BackgroundResource backgroundResources; private final HttpJsonOperationsStub httpJsonOperationsStub; @@ -614,6 +840,43 @@ protected HttpJsonEnvironmentsStub( return builder.build(); }) .build(); + HttpJsonCallSettings + executeAirflowCommandTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(executeAirflowCommandMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + stopAirflowCommandTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(stopAirflowCommandMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + pollAirflowCommandTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(pollAirflowCommandMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); HttpJsonCallSettings saveSnapshotTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(saveSnapshotMethodDescriptor) @@ -636,6 +899,30 @@ protected HttpJsonEnvironmentsStub( return builder.build(); }) .build(); + HttpJsonCallSettings databaseFailoverTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(databaseFailoverMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + fetchDatabasePropertiesTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(fetchDatabasePropertiesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("environment", String.valueOf(request.getEnvironment())); + return builder.build(); + }) + .build(); this.createEnvironmentCallable = callableFactory.createUnaryCallable( @@ -697,6 +984,21 @@ protected HttpJsonEnvironmentsStub( settings.checkUpgradeOperationSettings(), clientContext, httpJsonOperationsStub); + this.executeAirflowCommandCallable = + callableFactory.createUnaryCallable( + executeAirflowCommandTransportSettings, + settings.executeAirflowCommandSettings(), + clientContext); + this.stopAirflowCommandCallable = + callableFactory.createUnaryCallable( + stopAirflowCommandTransportSettings, + settings.stopAirflowCommandSettings(), + clientContext); + this.pollAirflowCommandCallable = + callableFactory.createUnaryCallable( + pollAirflowCommandTransportSettings, + settings.pollAirflowCommandSettings(), + clientContext); this.saveSnapshotCallable = callableFactory.createUnaryCallable( saveSnapshotTransportSettings, settings.saveSnapshotSettings(), clientContext); @@ -715,6 +1017,20 @@ protected HttpJsonEnvironmentsStub( settings.loadSnapshotOperationSettings(), clientContext, httpJsonOperationsStub); + this.databaseFailoverCallable = + callableFactory.createUnaryCallable( + databaseFailoverTransportSettings, settings.databaseFailoverSettings(), clientContext); + this.databaseFailoverOperationCallable = + callableFactory.createOperationCallable( + databaseFailoverTransportSettings, + settings.databaseFailoverOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.fetchDatabasePropertiesCallable = + callableFactory.createUnaryCallable( + fetchDatabasePropertiesTransportSettings, + settings.fetchDatabasePropertiesSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -730,8 +1046,13 @@ public static List getMethodDescriptors() { methodDescriptors.add(deleteEnvironmentMethodDescriptor); methodDescriptors.add(restartWebServerMethodDescriptor); methodDescriptors.add(checkUpgradeMethodDescriptor); + methodDescriptors.add(executeAirflowCommandMethodDescriptor); + methodDescriptors.add(stopAirflowCommandMethodDescriptor); + methodDescriptors.add(pollAirflowCommandMethodDescriptor); methodDescriptors.add(saveSnapshotMethodDescriptor); methodDescriptors.add(loadSnapshotMethodDescriptor); + methodDescriptors.add(databaseFailoverMethodDescriptor); + methodDescriptors.add(fetchDatabasePropertiesMethodDescriptor); return methodDescriptors; } @@ -811,6 +1132,24 @@ public UnaryCallable checkUpgradeCallable() { return checkUpgradeOperationCallable; } + @Override + public UnaryCallable + executeAirflowCommandCallable() { + return executeAirflowCommandCallable; + } + + @Override + public UnaryCallable + stopAirflowCommandCallable() { + return stopAirflowCommandCallable; + } + + @Override + public UnaryCallable + pollAirflowCommandCallable() { + return pollAirflowCommandCallable; + } + @Override public UnaryCallable saveSnapshotCallable() { return saveSnapshotCallable; @@ -833,6 +1172,23 @@ public UnaryCallable loadSnapshotCallable() { return loadSnapshotOperationCallable; } + @Override + public UnaryCallable databaseFailoverCallable() { + return databaseFailoverCallable; + } + + @Override + public OperationCallable + databaseFailoverOperationCallable() { + return databaseFailoverOperationCallable; + } + + @Override + public UnaryCallable + fetchDatabasePropertiesCallable() { + return fetchDatabasePropertiesCallable; + } + @Override public final void close() { try { diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsClientHttpJsonTest.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsClientHttpJsonTest.java index 5d513df01ec0..344839b6f6e8 100644 --- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsClientHttpJsonTest.java +++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsClientHttpJsonTest.java @@ -35,6 +35,7 @@ import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; @@ -86,7 +87,7 @@ public void tearDown() throws Exception { public void createEnvironmentTest() throws Exception { Environment expectedResponse = Environment.newBuilder() - .setName("name3373707") + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) .setConfig(EnvironmentConfig.newBuilder().build()) .setUuid("uuid3601339") .setCreateTime(Timestamp.newBuilder().build()) @@ -142,7 +143,7 @@ public void createEnvironmentExceptionTest() throws Exception { public void getEnvironmentTest() throws Exception { Environment expectedResponse = Environment.newBuilder() - .setName("name3373707") + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) .setConfig(EnvironmentConfig.newBuilder().build()) .setUuid("uuid3601339") .setCreateTime(Timestamp.newBuilder().build()) @@ -241,7 +242,7 @@ public void listEnvironmentsExceptionTest() throws Exception { public void updateEnvironmentTest() throws Exception { Environment expectedResponse = Environment.newBuilder() - .setName("name3373707") + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) .setConfig(EnvironmentConfig.newBuilder().build()) .setUuid("uuid3601339") .setCreateTime(Timestamp.newBuilder().build()) @@ -340,6 +341,190 @@ public void deleteEnvironmentExceptionTest() throws Exception { } } + @Test + public void executeAirflowCommandTest() throws Exception { + ExecuteAirflowCommandResponse expectedResponse = + ExecuteAirflowCommandResponse.newBuilder() + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setError("error96784904") + .build(); + mockService.addResponse(expectedResponse); + + ExecuteAirflowCommandRequest request = + ExecuteAirflowCommandRequest.newBuilder() + .setEnvironment( + "projects/project-4088/locations/location-4088/environments/environment-4088") + .setCommand("command950394699") + .setSubcommand("subcommand2099091723") + .addAllParameters(new ArrayList()) + .build(); + + ExecuteAirflowCommandResponse actualResponse = client.executeAirflowCommand(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void executeAirflowCommandExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ExecuteAirflowCommandRequest request = + ExecuteAirflowCommandRequest.newBuilder() + .setEnvironment( + "projects/project-4088/locations/location-4088/environments/environment-4088") + .setCommand("command950394699") + .setSubcommand("subcommand2099091723") + .addAllParameters(new ArrayList()) + .build(); + client.executeAirflowCommand(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void stopAirflowCommandTest() throws Exception { + StopAirflowCommandResponse expectedResponse = + StopAirflowCommandResponse.newBuilder() + .setIsDone(true) + .addAllOutput(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + StopAirflowCommandRequest request = + StopAirflowCommandRequest.newBuilder() + .setEnvironment( + "projects/project-4088/locations/location-4088/environments/environment-4088") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setForce(true) + .build(); + + StopAirflowCommandResponse actualResponse = client.stopAirflowCommand(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void stopAirflowCommandExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + StopAirflowCommandRequest request = + StopAirflowCommandRequest.newBuilder() + .setEnvironment( + "projects/project-4088/locations/location-4088/environments/environment-4088") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setForce(true) + .build(); + client.stopAirflowCommand(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void pollAirflowCommandTest() throws Exception { + PollAirflowCommandResponse expectedResponse = + PollAirflowCommandResponse.newBuilder() + .addAllOutput(new ArrayList()) + .setOutputEnd(true) + .setExitInfo(PollAirflowCommandResponse.ExitInfo.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PollAirflowCommandRequest request = + PollAirflowCommandRequest.newBuilder() + .setEnvironment( + "projects/project-4088/locations/location-4088/environments/environment-4088") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setNextLineNumber(1176642216) + .build(); + + PollAirflowCommandResponse actualResponse = client.pollAirflowCommand(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void pollAirflowCommandExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PollAirflowCommandRequest request = + PollAirflowCommandRequest.newBuilder() + .setEnvironment( + "projects/project-4088/locations/location-4088/environments/environment-4088") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setNextLineNumber(1176642216) + .build(); + client.pollAirflowCommand(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void saveSnapshotTest() throws Exception { SaveSnapshotResponse expectedResponse = @@ -460,4 +645,112 @@ public void loadSnapshotExceptionTest() throws Exception { } catch (ExecutionException e) { } } + + @Test + public void databaseFailoverTest() throws Exception { + DatabaseFailoverResponse expectedResponse = DatabaseFailoverResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("databaseFailoverTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DatabaseFailoverRequest request = + DatabaseFailoverRequest.newBuilder() + .setEnvironment( + "projects/project-4088/locations/location-4088/environments/environment-4088") + .build(); + + DatabaseFailoverResponse actualResponse = client.databaseFailoverAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void databaseFailoverExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DatabaseFailoverRequest request = + DatabaseFailoverRequest.newBuilder() + .setEnvironment( + "projects/project-4088/locations/location-4088/environments/environment-4088") + .build(); + client.databaseFailoverAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void fetchDatabasePropertiesTest() throws Exception { + FetchDatabasePropertiesResponse expectedResponse = + FetchDatabasePropertiesResponse.newBuilder() + .setPrimaryGceZone("primaryGceZone-1629643277") + .setSecondaryGceZone("secondaryGceZone227989057") + .setIsFailoverReplicaAvailable(true) + .build(); + mockService.addResponse(expectedResponse); + + FetchDatabasePropertiesRequest request = + FetchDatabasePropertiesRequest.newBuilder() + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) + .build(); + + FetchDatabasePropertiesResponse actualResponse = client.fetchDatabaseProperties(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void fetchDatabasePropertiesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FetchDatabasePropertiesRequest request = + FetchDatabasePropertiesRequest.newBuilder() + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) + .build(); + client.fetchDatabaseProperties(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsClientTest.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsClientTest.java index b06dd70cc6a1..bd2f48dd7e58 100644 --- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsClientTest.java +++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsClientTest.java @@ -35,6 +35,7 @@ import com.google.protobuf.Timestamp; import io.grpc.StatusRuntimeException; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; @@ -90,7 +91,7 @@ public void tearDown() throws Exception { public void createEnvironmentTest() throws Exception { Environment expectedResponse = Environment.newBuilder() - .setName("name3373707") + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) .setConfig(EnvironmentConfig.newBuilder().build()) .setUuid("uuid3601339") .setCreateTime(Timestamp.newBuilder().build()) @@ -144,7 +145,7 @@ public void createEnvironmentExceptionTest() throws Exception { public void getEnvironmentTest() throws Exception { Environment expectedResponse = Environment.newBuilder() - .setName("name3373707") + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) .setConfig(EnvironmentConfig.newBuilder().build()) .setUuid("uuid3601339") .setCreateTime(Timestamp.newBuilder().build()) @@ -231,7 +232,7 @@ public void listEnvironmentsExceptionTest() throws Exception { public void updateEnvironmentTest() throws Exception { Environment expectedResponse = Environment.newBuilder() - .setName("name3373707") + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) .setConfig(EnvironmentConfig.newBuilder().build()) .setUuid("uuid3601339") .setCreateTime(Timestamp.newBuilder().build()) @@ -326,6 +327,178 @@ public void deleteEnvironmentExceptionTest() throws Exception { } } + @Test + public void executeAirflowCommandTest() throws Exception { + ExecuteAirflowCommandResponse expectedResponse = + ExecuteAirflowCommandResponse.newBuilder() + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setError("error96784904") + .build(); + mockEnvironments.addResponse(expectedResponse); + + ExecuteAirflowCommandRequest request = + ExecuteAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setCommand("command950394699") + .setSubcommand("subcommand2099091723") + .addAllParameters(new ArrayList()) + .build(); + + ExecuteAirflowCommandResponse actualResponse = client.executeAirflowCommand(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExecuteAirflowCommandRequest actualRequest = + ((ExecuteAirflowCommandRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getEnvironment(), actualRequest.getEnvironment()); + Assert.assertEquals(request.getCommand(), actualRequest.getCommand()); + Assert.assertEquals(request.getSubcommand(), actualRequest.getSubcommand()); + Assert.assertEquals(request.getParametersList(), actualRequest.getParametersList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void executeAirflowCommandExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + ExecuteAirflowCommandRequest request = + ExecuteAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setCommand("command950394699") + .setSubcommand("subcommand2099091723") + .addAllParameters(new ArrayList()) + .build(); + client.executeAirflowCommand(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void stopAirflowCommandTest() throws Exception { + StopAirflowCommandResponse expectedResponse = + StopAirflowCommandResponse.newBuilder() + .setIsDone(true) + .addAllOutput(new ArrayList()) + .build(); + mockEnvironments.addResponse(expectedResponse); + + StopAirflowCommandRequest request = + StopAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setForce(true) + .build(); + + StopAirflowCommandResponse actualResponse = client.stopAirflowCommand(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StopAirflowCommandRequest actualRequest = ((StopAirflowCommandRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getEnvironment(), actualRequest.getEnvironment()); + Assert.assertEquals(request.getExecutionId(), actualRequest.getExecutionId()); + Assert.assertEquals(request.getPod(), actualRequest.getPod()); + Assert.assertEquals(request.getPodNamespace(), actualRequest.getPodNamespace()); + Assert.assertEquals(request.getForce(), actualRequest.getForce()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void stopAirflowCommandExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + StopAirflowCommandRequest request = + StopAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setForce(true) + .build(); + client.stopAirflowCommand(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void pollAirflowCommandTest() throws Exception { + PollAirflowCommandResponse expectedResponse = + PollAirflowCommandResponse.newBuilder() + .addAllOutput(new ArrayList()) + .setOutputEnd(true) + .setExitInfo(PollAirflowCommandResponse.ExitInfo.newBuilder().build()) + .build(); + mockEnvironments.addResponse(expectedResponse); + + PollAirflowCommandRequest request = + PollAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setNextLineNumber(1176642216) + .build(); + + PollAirflowCommandResponse actualResponse = client.pollAirflowCommand(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PollAirflowCommandRequest actualRequest = ((PollAirflowCommandRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getEnvironment(), actualRequest.getEnvironment()); + Assert.assertEquals(request.getExecutionId(), actualRequest.getExecutionId()); + Assert.assertEquals(request.getPod(), actualRequest.getPod()); + Assert.assertEquals(request.getPodNamespace(), actualRequest.getPodNamespace()); + Assert.assertEquals(request.getNextLineNumber(), actualRequest.getNextLineNumber()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void pollAirflowCommandExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + PollAirflowCommandRequest request = + PollAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setNextLineNumber(1176642216) + .build(); + client.pollAirflowCommand(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void saveSnapshotTest() throws Exception { SaveSnapshotResponse expectedResponse = @@ -446,4 +619,98 @@ public void loadSnapshotExceptionTest() throws Exception { Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } + + @Test + public void databaseFailoverTest() throws Exception { + DatabaseFailoverResponse expectedResponse = DatabaseFailoverResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("databaseFailoverTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEnvironments.addResponse(resultOperation); + + DatabaseFailoverRequest request = + DatabaseFailoverRequest.newBuilder().setEnvironment("environment-85904877").build(); + + DatabaseFailoverResponse actualResponse = client.databaseFailoverAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DatabaseFailoverRequest actualRequest = ((DatabaseFailoverRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getEnvironment(), actualRequest.getEnvironment()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void databaseFailoverExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + DatabaseFailoverRequest request = + DatabaseFailoverRequest.newBuilder().setEnvironment("environment-85904877").build(); + client.databaseFailoverAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void fetchDatabasePropertiesTest() throws Exception { + FetchDatabasePropertiesResponse expectedResponse = + FetchDatabasePropertiesResponse.newBuilder() + .setPrimaryGceZone("primaryGceZone-1629643277") + .setSecondaryGceZone("secondaryGceZone227989057") + .setIsFailoverReplicaAvailable(true) + .build(); + mockEnvironments.addResponse(expectedResponse); + + FetchDatabasePropertiesRequest request = + FetchDatabasePropertiesRequest.newBuilder() + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) + .build(); + + FetchDatabasePropertiesResponse actualResponse = client.fetchDatabaseProperties(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FetchDatabasePropertiesRequest actualRequest = + ((FetchDatabasePropertiesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getEnvironment(), actualRequest.getEnvironment()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void fetchDatabasePropertiesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + FetchDatabasePropertiesRequest request = + FetchDatabasePropertiesRequest.newBuilder() + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) + .build(); + client.fetchDatabaseProperties(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/MockEnvironmentsImpl.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/MockEnvironmentsImpl.java index 33049cecede1..d1d5fa6a21a8 100644 --- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/MockEnvironmentsImpl.java +++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/MockEnvironmentsImpl.java @@ -164,6 +164,72 @@ public void deleteEnvironment( } } + @Override + public void executeAirflowCommand( + ExecuteAirflowCommandRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ExecuteAirflowCommandResponse) { + requests.add(request); + responseObserver.onNext(((ExecuteAirflowCommandResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExecuteAirflowCommand, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ExecuteAirflowCommandResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void stopAirflowCommand( + StopAirflowCommandRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof StopAirflowCommandResponse) { + requests.add(request); + responseObserver.onNext(((StopAirflowCommandResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StopAirflowCommand, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + StopAirflowCommandResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void pollAirflowCommand( + PollAirflowCommandRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PollAirflowCommandResponse) { + requests.add(request); + responseObserver.onNext(((PollAirflowCommandResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method PollAirflowCommand, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PollAirflowCommandResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void saveSnapshot( SaveSnapshotRequest request, StreamObserver responseObserver) { @@ -205,4 +271,47 @@ public void loadSnapshot( Exception.class.getName()))); } } + + @Override + public void databaseFailover( + DatabaseFailoverRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DatabaseFailover, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void fetchDatabaseProperties( + FetchDatabasePropertiesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FetchDatabasePropertiesResponse) { + requests.add(request); + responseObserver.onNext(((FetchDatabasePropertiesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method FetchDatabaseProperties, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + FetchDatabasePropertiesResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsClientHttpJsonTest.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsClientHttpJsonTest.java index 7e06e23afaba..2c8d08820a0f 100644 --- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsClientHttpJsonTest.java +++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsClientHttpJsonTest.java @@ -35,6 +35,7 @@ import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; @@ -86,7 +87,7 @@ public void tearDown() throws Exception { public void createEnvironmentTest() throws Exception { Environment expectedResponse = Environment.newBuilder() - .setName("name3373707") + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) .setConfig(EnvironmentConfig.newBuilder().build()) .setUuid("uuid3601339") .setCreateTime(Timestamp.newBuilder().build()) @@ -142,7 +143,7 @@ public void createEnvironmentExceptionTest() throws Exception { public void getEnvironmentTest() throws Exception { Environment expectedResponse = Environment.newBuilder() - .setName("name3373707") + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) .setConfig(EnvironmentConfig.newBuilder().build()) .setUuid("uuid3601339") .setCreateTime(Timestamp.newBuilder().build()) @@ -241,7 +242,7 @@ public void listEnvironmentsExceptionTest() throws Exception { public void updateEnvironmentTest() throws Exception { Environment expectedResponse = Environment.newBuilder() - .setName("name3373707") + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) .setConfig(EnvironmentConfig.newBuilder().build()) .setUuid("uuid3601339") .setCreateTime(Timestamp.newBuilder().build()) @@ -344,7 +345,7 @@ public void deleteEnvironmentExceptionTest() throws Exception { public void restartWebServerTest() throws Exception { Environment expectedResponse = Environment.newBuilder() - .setName("name3373707") + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) .setConfig(EnvironmentConfig.newBuilder().build()) .setUuid("uuid3601339") .setCreateTime(Timestamp.newBuilder().build()) @@ -463,6 +464,190 @@ public void checkUpgradeExceptionTest() throws Exception { } } + @Test + public void executeAirflowCommandTest() throws Exception { + ExecuteAirflowCommandResponse expectedResponse = + ExecuteAirflowCommandResponse.newBuilder() + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setError("error96784904") + .build(); + mockService.addResponse(expectedResponse); + + ExecuteAirflowCommandRequest request = + ExecuteAirflowCommandRequest.newBuilder() + .setEnvironment( + "projects/project-4088/locations/location-4088/environments/environment-4088") + .setCommand("command950394699") + .setSubcommand("subcommand2099091723") + .addAllParameters(new ArrayList()) + .build(); + + ExecuteAirflowCommandResponse actualResponse = client.executeAirflowCommand(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void executeAirflowCommandExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ExecuteAirflowCommandRequest request = + ExecuteAirflowCommandRequest.newBuilder() + .setEnvironment( + "projects/project-4088/locations/location-4088/environments/environment-4088") + .setCommand("command950394699") + .setSubcommand("subcommand2099091723") + .addAllParameters(new ArrayList()) + .build(); + client.executeAirflowCommand(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void stopAirflowCommandTest() throws Exception { + StopAirflowCommandResponse expectedResponse = + StopAirflowCommandResponse.newBuilder() + .setIsDone(true) + .addAllOutput(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + StopAirflowCommandRequest request = + StopAirflowCommandRequest.newBuilder() + .setEnvironment( + "projects/project-4088/locations/location-4088/environments/environment-4088") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setForce(true) + .build(); + + StopAirflowCommandResponse actualResponse = client.stopAirflowCommand(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void stopAirflowCommandExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + StopAirflowCommandRequest request = + StopAirflowCommandRequest.newBuilder() + .setEnvironment( + "projects/project-4088/locations/location-4088/environments/environment-4088") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setForce(true) + .build(); + client.stopAirflowCommand(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void pollAirflowCommandTest() throws Exception { + PollAirflowCommandResponse expectedResponse = + PollAirflowCommandResponse.newBuilder() + .addAllOutput(new ArrayList()) + .setOutputEnd(true) + .setExitInfo(PollAirflowCommandResponse.ExitInfo.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PollAirflowCommandRequest request = + PollAirflowCommandRequest.newBuilder() + .setEnvironment( + "projects/project-4088/locations/location-4088/environments/environment-4088") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setNextLineNumber(1176642216) + .build(); + + PollAirflowCommandResponse actualResponse = client.pollAirflowCommand(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void pollAirflowCommandExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PollAirflowCommandRequest request = + PollAirflowCommandRequest.newBuilder() + .setEnvironment( + "projects/project-4088/locations/location-4088/environments/environment-4088") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setNextLineNumber(1176642216) + .build(); + client.pollAirflowCommand(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void saveSnapshotTest() throws Exception { SaveSnapshotResponse expectedResponse = @@ -583,4 +768,112 @@ public void loadSnapshotExceptionTest() throws Exception { } catch (ExecutionException e) { } } + + @Test + public void databaseFailoverTest() throws Exception { + DatabaseFailoverResponse expectedResponse = DatabaseFailoverResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("databaseFailoverTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DatabaseFailoverRequest request = + DatabaseFailoverRequest.newBuilder() + .setEnvironment( + "projects/project-4088/locations/location-4088/environments/environment-4088") + .build(); + + DatabaseFailoverResponse actualResponse = client.databaseFailoverAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void databaseFailoverExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DatabaseFailoverRequest request = + DatabaseFailoverRequest.newBuilder() + .setEnvironment( + "projects/project-4088/locations/location-4088/environments/environment-4088") + .build(); + client.databaseFailoverAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void fetchDatabasePropertiesTest() throws Exception { + FetchDatabasePropertiesResponse expectedResponse = + FetchDatabasePropertiesResponse.newBuilder() + .setPrimaryGceZone("primaryGceZone-1629643277") + .setSecondaryGceZone("secondaryGceZone227989057") + .setIsFailoverReplicaAvailable(true) + .build(); + mockService.addResponse(expectedResponse); + + FetchDatabasePropertiesRequest request = + FetchDatabasePropertiesRequest.newBuilder() + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) + .build(); + + FetchDatabasePropertiesResponse actualResponse = client.fetchDatabaseProperties(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void fetchDatabasePropertiesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + FetchDatabasePropertiesRequest request = + FetchDatabasePropertiesRequest.newBuilder() + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) + .build(); + client.fetchDatabaseProperties(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsClientTest.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsClientTest.java index 65a1755d0106..160f00bb13c2 100644 --- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsClientTest.java +++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsClientTest.java @@ -35,6 +35,7 @@ import com.google.protobuf.Timestamp; import io.grpc.StatusRuntimeException; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; @@ -90,7 +91,7 @@ public void tearDown() throws Exception { public void createEnvironmentTest() throws Exception { Environment expectedResponse = Environment.newBuilder() - .setName("name3373707") + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) .setConfig(EnvironmentConfig.newBuilder().build()) .setUuid("uuid3601339") .setCreateTime(Timestamp.newBuilder().build()) @@ -144,7 +145,7 @@ public void createEnvironmentExceptionTest() throws Exception { public void getEnvironmentTest() throws Exception { Environment expectedResponse = Environment.newBuilder() - .setName("name3373707") + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) .setConfig(EnvironmentConfig.newBuilder().build()) .setUuid("uuid3601339") .setCreateTime(Timestamp.newBuilder().build()) @@ -231,7 +232,7 @@ public void listEnvironmentsExceptionTest() throws Exception { public void updateEnvironmentTest() throws Exception { Environment expectedResponse = Environment.newBuilder() - .setName("name3373707") + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) .setConfig(EnvironmentConfig.newBuilder().build()) .setUuid("uuid3601339") .setCreateTime(Timestamp.newBuilder().build()) @@ -330,7 +331,7 @@ public void deleteEnvironmentExceptionTest() throws Exception { public void restartWebServerTest() throws Exception { Environment expectedResponse = Environment.newBuilder() - .setName("name3373707") + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) .setConfig(EnvironmentConfig.newBuilder().build()) .setUuid("uuid3601339") .setCreateTime(Timestamp.newBuilder().build()) @@ -437,6 +438,178 @@ public void checkUpgradeExceptionTest() throws Exception { } } + @Test + public void executeAirflowCommandTest() throws Exception { + ExecuteAirflowCommandResponse expectedResponse = + ExecuteAirflowCommandResponse.newBuilder() + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setError("error96784904") + .build(); + mockEnvironments.addResponse(expectedResponse); + + ExecuteAirflowCommandRequest request = + ExecuteAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setCommand("command950394699") + .setSubcommand("subcommand2099091723") + .addAllParameters(new ArrayList()) + .build(); + + ExecuteAirflowCommandResponse actualResponse = client.executeAirflowCommand(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExecuteAirflowCommandRequest actualRequest = + ((ExecuteAirflowCommandRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getEnvironment(), actualRequest.getEnvironment()); + Assert.assertEquals(request.getCommand(), actualRequest.getCommand()); + Assert.assertEquals(request.getSubcommand(), actualRequest.getSubcommand()); + Assert.assertEquals(request.getParametersList(), actualRequest.getParametersList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void executeAirflowCommandExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + ExecuteAirflowCommandRequest request = + ExecuteAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setCommand("command950394699") + .setSubcommand("subcommand2099091723") + .addAllParameters(new ArrayList()) + .build(); + client.executeAirflowCommand(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void stopAirflowCommandTest() throws Exception { + StopAirflowCommandResponse expectedResponse = + StopAirflowCommandResponse.newBuilder() + .setIsDone(true) + .addAllOutput(new ArrayList()) + .build(); + mockEnvironments.addResponse(expectedResponse); + + StopAirflowCommandRequest request = + StopAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setForce(true) + .build(); + + StopAirflowCommandResponse actualResponse = client.stopAirflowCommand(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StopAirflowCommandRequest actualRequest = ((StopAirflowCommandRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getEnvironment(), actualRequest.getEnvironment()); + Assert.assertEquals(request.getExecutionId(), actualRequest.getExecutionId()); + Assert.assertEquals(request.getPod(), actualRequest.getPod()); + Assert.assertEquals(request.getPodNamespace(), actualRequest.getPodNamespace()); + Assert.assertEquals(request.getForce(), actualRequest.getForce()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void stopAirflowCommandExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + StopAirflowCommandRequest request = + StopAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setForce(true) + .build(); + client.stopAirflowCommand(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void pollAirflowCommandTest() throws Exception { + PollAirflowCommandResponse expectedResponse = + PollAirflowCommandResponse.newBuilder() + .addAllOutput(new ArrayList()) + .setOutputEnd(true) + .setExitInfo(PollAirflowCommandResponse.ExitInfo.newBuilder().build()) + .build(); + mockEnvironments.addResponse(expectedResponse); + + PollAirflowCommandRequest request = + PollAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setNextLineNumber(1176642216) + .build(); + + PollAirflowCommandResponse actualResponse = client.pollAirflowCommand(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PollAirflowCommandRequest actualRequest = ((PollAirflowCommandRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getEnvironment(), actualRequest.getEnvironment()); + Assert.assertEquals(request.getExecutionId(), actualRequest.getExecutionId()); + Assert.assertEquals(request.getPod(), actualRequest.getPod()); + Assert.assertEquals(request.getPodNamespace(), actualRequest.getPodNamespace()); + Assert.assertEquals(request.getNextLineNumber(), actualRequest.getNextLineNumber()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void pollAirflowCommandExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + PollAirflowCommandRequest request = + PollAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setNextLineNumber(1176642216) + .build(); + client.pollAirflowCommand(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void saveSnapshotTest() throws Exception { SaveSnapshotResponse expectedResponse = @@ -557,4 +730,98 @@ public void loadSnapshotExceptionTest() throws Exception { Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } + + @Test + public void databaseFailoverTest() throws Exception { + DatabaseFailoverResponse expectedResponse = DatabaseFailoverResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("databaseFailoverTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEnvironments.addResponse(resultOperation); + + DatabaseFailoverRequest request = + DatabaseFailoverRequest.newBuilder().setEnvironment("environment-85904877").build(); + + DatabaseFailoverResponse actualResponse = client.databaseFailoverAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DatabaseFailoverRequest actualRequest = ((DatabaseFailoverRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getEnvironment(), actualRequest.getEnvironment()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void databaseFailoverExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + DatabaseFailoverRequest request = + DatabaseFailoverRequest.newBuilder().setEnvironment("environment-85904877").build(); + client.databaseFailoverAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void fetchDatabasePropertiesTest() throws Exception { + FetchDatabasePropertiesResponse expectedResponse = + FetchDatabasePropertiesResponse.newBuilder() + .setPrimaryGceZone("primaryGceZone-1629643277") + .setSecondaryGceZone("secondaryGceZone227989057") + .setIsFailoverReplicaAvailable(true) + .build(); + mockEnvironments.addResponse(expectedResponse); + + FetchDatabasePropertiesRequest request = + FetchDatabasePropertiesRequest.newBuilder() + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) + .build(); + + FetchDatabasePropertiesResponse actualResponse = client.fetchDatabaseProperties(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + FetchDatabasePropertiesRequest actualRequest = + ((FetchDatabasePropertiesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getEnvironment(), actualRequest.getEnvironment()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void fetchDatabasePropertiesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + FetchDatabasePropertiesRequest request = + FetchDatabasePropertiesRequest.newBuilder() + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) + .build(); + client.fetchDatabaseProperties(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/MockEnvironmentsImpl.java b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/MockEnvironmentsImpl.java index d1280e373677..80a1eba92ce9 100644 --- a/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/MockEnvironmentsImpl.java +++ b/java-orchestration-airflow/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/MockEnvironmentsImpl.java @@ -206,6 +206,72 @@ public void checkUpgrade( } } + @Override + public void executeAirflowCommand( + ExecuteAirflowCommandRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ExecuteAirflowCommandResponse) { + requests.add(request); + responseObserver.onNext(((ExecuteAirflowCommandResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExecuteAirflowCommand, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ExecuteAirflowCommandResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void stopAirflowCommand( + StopAirflowCommandRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof StopAirflowCommandResponse) { + requests.add(request); + responseObserver.onNext(((StopAirflowCommandResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StopAirflowCommand, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + StopAirflowCommandResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void pollAirflowCommand( + PollAirflowCommandRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PollAirflowCommandResponse) { + requests.add(request); + responseObserver.onNext(((PollAirflowCommandResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method PollAirflowCommand, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PollAirflowCommandResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void saveSnapshot( SaveSnapshotRequest request, StreamObserver responseObserver) { @@ -247,4 +313,47 @@ public void loadSnapshot( Exception.class.getName()))); } } + + @Override + public void databaseFailover( + DatabaseFailoverRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DatabaseFailover, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void fetchDatabaseProperties( + FetchDatabasePropertiesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof FetchDatabasePropertiesResponse) { + requests.add(request); + responseObserver.onNext(((FetchDatabasePropertiesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method FetchDatabaseProperties, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + FetchDatabasePropertiesResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-orchestration-airflow/grpc-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsGrpc.java b/java-orchestration-airflow/grpc-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsGrpc.java index 74e5b0178b6e..368261667bbe 100644 --- a/java-orchestration-airflow/grpc-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsGrpc.java +++ b/java-orchestration-airflow/grpc-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsGrpc.java @@ -273,6 +273,160 @@ private EnvironmentsGrpc() {} return getDeleteEnvironmentMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse> + getExecuteAirflowCommandMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExecuteAirflowCommand", + requestType = + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest.class, + responseType = + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse> + getExecuteAirflowCommandMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse> + getExecuteAirflowCommandMethod; + if ((getExecuteAirflowCommandMethod = EnvironmentsGrpc.getExecuteAirflowCommandMethod) + == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getExecuteAirflowCommandMethod = EnvironmentsGrpc.getExecuteAirflowCommandMethod) + == null) { + EnvironmentsGrpc.getExecuteAirflowCommandMethod = + getExecuteAirflowCommandMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ExecuteAirflowCommand")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1 + .ExecuteAirflowCommandRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1 + .ExecuteAirflowCommandResponse.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("ExecuteAirflowCommand")) + .build(); + } + } + } + return getExecuteAirflowCommandMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse> + getStopAirflowCommandMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StopAirflowCommand", + requestType = + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest.class, + responseType = + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse> + getStopAirflowCommandMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse> + getStopAirflowCommandMethod; + if ((getStopAirflowCommandMethod = EnvironmentsGrpc.getStopAirflowCommandMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getStopAirflowCommandMethod = EnvironmentsGrpc.getStopAirflowCommandMethod) == null) { + EnvironmentsGrpc.getStopAirflowCommandMethod = + getStopAirflowCommandMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StopAirflowCommand")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1 + .StopAirflowCommandRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1 + .StopAirflowCommandResponse.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("StopAirflowCommand")) + .build(); + } + } + } + return getStopAirflowCommandMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse> + getPollAirflowCommandMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PollAirflowCommand", + requestType = + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest.class, + responseType = + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse> + getPollAirflowCommandMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse> + getPollAirflowCommandMethod; + if ((getPollAirflowCommandMethod = EnvironmentsGrpc.getPollAirflowCommandMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getPollAirflowCommandMethod = EnvironmentsGrpc.getPollAirflowCommandMethod) == null) { + EnvironmentsGrpc.getPollAirflowCommandMethod = + getPollAirflowCommandMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PollAirflowCommand")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1 + .PollAirflowCommandRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1 + .PollAirflowCommandResponse.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("PollAirflowCommand")) + .build(); + } + } + } + return getPollAirflowCommandMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest, com.google.longrunning.Operation> @@ -363,6 +517,106 @@ private EnvironmentsGrpc() {} return getLoadSnapshotMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest, + com.google.longrunning.Operation> + getDatabaseFailoverMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DatabaseFailover", + requestType = com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest, + com.google.longrunning.Operation> + getDatabaseFailoverMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest, + com.google.longrunning.Operation> + getDatabaseFailoverMethod; + if ((getDatabaseFailoverMethod = EnvironmentsGrpc.getDatabaseFailoverMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getDatabaseFailoverMethod = EnvironmentsGrpc.getDatabaseFailoverMethod) == null) { + EnvironmentsGrpc.getDatabaseFailoverMethod = + getDatabaseFailoverMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DatabaseFailover")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1 + .DatabaseFailoverRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("DatabaseFailover")) + .build(); + } + } + } + return getDatabaseFailoverMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest, + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse> + getFetchDatabasePropertiesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "FetchDatabaseProperties", + requestType = + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest.class, + responseType = + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest, + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse> + getFetchDatabasePropertiesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest, + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse> + getFetchDatabasePropertiesMethod; + if ((getFetchDatabasePropertiesMethod = EnvironmentsGrpc.getFetchDatabasePropertiesMethod) + == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getFetchDatabasePropertiesMethod = EnvironmentsGrpc.getFetchDatabasePropertiesMethod) + == null) { + EnvironmentsGrpc.getFetchDatabasePropertiesMethod = + getFetchDatabasePropertiesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "FetchDatabaseProperties")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1 + .FetchDatabasePropertiesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1 + .FetchDatabasePropertiesResponse.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("FetchDatabaseProperties")) + .build(); + } + } + } + return getFetchDatabasePropertiesMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static EnvironmentsStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -486,6 +740,54 @@ default void deleteEnvironment( getDeleteEnvironmentMethod(), responseObserver); } + /** + * + * + *
+     * Executes Airflow CLI command.
+     * 
+ */ + default void executeAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getExecuteAirflowCommandMethod(), responseObserver); + } + + /** + * + * + *
+     * Stops Airflow CLI command execution.
+     * 
+ */ + default void stopAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getStopAirflowCommandMethod(), responseObserver); + } + + /** + * + * + *
+     * Polls Airflow CLI command execution and fetches logs.
+     * 
+ */ + default void pollAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getPollAirflowCommandMethod(), responseObserver); + } + /** * * @@ -517,6 +819,36 @@ default void loadSnapshot( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getLoadSnapshotMethod(), responseObserver); } + + /** + * + * + *
+     * Triggers database failover (only for highly resilient environments).
+     * 
+ */ + default void databaseFailover( + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDatabaseFailoverMethod(), responseObserver); + } + + /** + * + * + *
+     * Fetches database properties.
+     * 
+ */ + default void fetchDatabaseProperties( + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getFetchDatabasePropertiesMethod(), responseObserver); + } } /** @@ -636,6 +968,60 @@ public void deleteEnvironment( responseObserver); } + /** + * + * + *
+     * Executes Airflow CLI command.
+     * 
+ */ + public void executeAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExecuteAirflowCommandMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Stops Airflow CLI command execution.
+     * 
+ */ + public void stopAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getStopAirflowCommandMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Polls Airflow CLI command execution and fetches logs.
+     * 
+ */ + public void pollAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPollAirflowCommandMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -671,6 +1057,40 @@ public void loadSnapshot( request, responseObserver); } + + /** + * + * + *
+     * Triggers database failover (only for highly resilient environments).
+     * 
+ */ + public void databaseFailover( + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDatabaseFailoverMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Fetches database properties.
+     * 
+ */ + public void fetchDatabaseProperties( + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getFetchDatabasePropertiesMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -758,6 +1178,49 @@ public com.google.longrunning.Operation deleteEnvironment( getChannel(), getDeleteEnvironmentMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Executes Airflow CLI command.
+     * 
+ */ + public com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + executeAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExecuteAirflowCommandMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Stops Airflow CLI command execution.
+     * 
+ */ + public com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + stopAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getStopAirflowCommandMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Polls Airflow CLI command execution and fetches logs.
+     * 
+ */ + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + pollAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPollAirflowCommandMethod(), getCallOptions(), request); + } + /** * * @@ -787,6 +1250,34 @@ public com.google.longrunning.Operation loadSnapshot( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getLoadSnapshotMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Triggers database failover (only for highly resilient environments).
+     * 
+ */ + public com.google.longrunning.Operation databaseFailover( + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDatabaseFailoverMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Fetches database properties.
+     * 
+ */ + public com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + fetchDatabaseProperties( + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getFetchDatabasePropertiesMethod(), getCallOptions(), request); + } } /** @@ -880,6 +1371,52 @@ protected EnvironmentsFutureStub build( getChannel().newCall(getDeleteEnvironmentMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Executes Airflow CLI command.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse> + executeAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExecuteAirflowCommandMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Stops Airflow CLI command execution.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse> + stopAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getStopAirflowCommandMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Polls Airflow CLI command execution and fetches logs.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse> + pollAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPollAirflowCommandMethod(), getCallOptions()), request); + } + /** * * @@ -911,6 +1448,36 @@ protected EnvironmentsFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getLoadSnapshotMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Triggers database failover (only for highly resilient environments).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + databaseFailover( + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDatabaseFailoverMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Fetches database properties.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse> + fetchDatabaseProperties( + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getFetchDatabasePropertiesMethod(), getCallOptions()), request); + } } private static final int METHODID_CREATE_ENVIRONMENT = 0; @@ -918,8 +1485,13 @@ protected EnvironmentsFutureStub build( private static final int METHODID_LIST_ENVIRONMENTS = 2; private static final int METHODID_UPDATE_ENVIRONMENT = 3; private static final int METHODID_DELETE_ENVIRONMENT = 4; - private static final int METHODID_SAVE_SNAPSHOT = 5; - private static final int METHODID_LOAD_SNAPSHOT = 6; + private static final int METHODID_EXECUTE_AIRFLOW_COMMAND = 5; + private static final int METHODID_STOP_AIRFLOW_COMMAND = 6; + private static final int METHODID_POLL_AIRFLOW_COMMAND = 7; + private static final int METHODID_SAVE_SNAPSHOT = 8; + private static final int METHODID_LOAD_SNAPSHOT = 9; + private static final int METHODID_DATABASE_FAILOVER = 10; + private static final int METHODID_FETCH_DATABASE_PROPERTIES = 11; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -967,6 +1539,29 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_EXECUTE_AIRFLOW_COMMAND: + serviceImpl.executeAirflowCommand( + (com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1 + .ExecuteAirflowCommandResponse>) + responseObserver); + break; + case METHODID_STOP_AIRFLOW_COMMAND: + serviceImpl.stopAirflowCommand( + (com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse>) + responseObserver); + break; + case METHODID_POLL_AIRFLOW_COMMAND: + serviceImpl.pollAirflowCommand( + (com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse>) + responseObserver); + break; case METHODID_SAVE_SNAPSHOT: serviceImpl.saveSnapshot( (com.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest) request, @@ -977,6 +1572,20 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_DATABASE_FAILOVER: + serviceImpl.databaseFailover( + (com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_FETCH_DATABASE_PROPERTIES: + serviceImpl.fetchDatabaseProperties( + (com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1 + .FetchDatabasePropertiesResponse>) + responseObserver); + break; default: throw new AssertionError(); } @@ -1027,6 +1636,27 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest, com.google.longrunning.Operation>(service, METHODID_DELETE_ENVIRONMENT))) + .addMethod( + getExecuteAirflowCommandMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1 + .ExecuteAirflowCommandResponse>(service, METHODID_EXECUTE_AIRFLOW_COMMAND))) + .addMethod( + getStopAirflowCommandMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse>( + service, METHODID_STOP_AIRFLOW_COMMAND))) + .addMethod( + getPollAirflowCommandMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse>( + service, METHODID_POLL_AIRFLOW_COMMAND))) .addMethod( getSaveSnapshotMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1039,6 +1669,21 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest, com.google.longrunning.Operation>(service, METHODID_LOAD_SNAPSHOT))) + .addMethod( + getDatabaseFailoverMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest, + com.google.longrunning.Operation>(service, METHODID_DATABASE_FAILOVER))) + .addMethod( + getFetchDatabasePropertiesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1 + .FetchDatabasePropertiesRequest, + com.google.cloud.orchestration.airflow.service.v1 + .FetchDatabasePropertiesResponse>( + service, METHODID_FETCH_DATABASE_PROPERTIES))) .build(); } @@ -1096,8 +1741,13 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListEnvironmentsMethod()) .addMethod(getUpdateEnvironmentMethod()) .addMethod(getDeleteEnvironmentMethod()) + .addMethod(getExecuteAirflowCommandMethod()) + .addMethod(getStopAirflowCommandMethod()) + .addMethod(getPollAirflowCommandMethod()) .addMethod(getSaveSnapshotMethod()) .addMethod(getLoadSnapshotMethod()) + .addMethod(getDatabaseFailoverMethod()) + .addMethod(getFetchDatabasePropertiesMethod()) .build(); } } diff --git a/java-orchestration-airflow/grpc-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsGrpc.java b/java-orchestration-airflow/grpc-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsGrpc.java index b1f1e6358d80..94a696c899d2 100644 --- a/java-orchestration-airflow/grpc-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsGrpc.java +++ b/java-orchestration-airflow/grpc-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsGrpc.java @@ -374,6 +374,163 @@ private EnvironmentsGrpc() {} return getCheckUpgradeMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse> + getExecuteAirflowCommandMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExecuteAirflowCommand", + requestType = + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest.class, + responseType = + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse + .class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse> + getExecuteAirflowCommandMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse> + getExecuteAirflowCommandMethod; + if ((getExecuteAirflowCommandMethod = EnvironmentsGrpc.getExecuteAirflowCommandMethod) + == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getExecuteAirflowCommandMethod = EnvironmentsGrpc.getExecuteAirflowCommandMethod) + == null) { + EnvironmentsGrpc.getExecuteAirflowCommandMethod = + getExecuteAirflowCommandMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ExecuteAirflowCommand")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1 + .ExecuteAirflowCommandRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1 + .ExecuteAirflowCommandResponse.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("ExecuteAirflowCommand")) + .build(); + } + } + } + return getExecuteAirflowCommandMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse> + getStopAirflowCommandMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StopAirflowCommand", + requestType = + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest.class, + responseType = + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse> + getStopAirflowCommandMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse> + getStopAirflowCommandMethod; + if ((getStopAirflowCommandMethod = EnvironmentsGrpc.getStopAirflowCommandMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getStopAirflowCommandMethod = EnvironmentsGrpc.getStopAirflowCommandMethod) == null) { + EnvironmentsGrpc.getStopAirflowCommandMethod = + getStopAirflowCommandMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StopAirflowCommand")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1 + .StopAirflowCommandRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1 + .StopAirflowCommandResponse.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("StopAirflowCommand")) + .build(); + } + } + } + return getStopAirflowCommandMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse> + getPollAirflowCommandMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PollAirflowCommand", + requestType = + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest.class, + responseType = + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse> + getPollAirflowCommandMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse> + getPollAirflowCommandMethod; + if ((getPollAirflowCommandMethod = EnvironmentsGrpc.getPollAirflowCommandMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getPollAirflowCommandMethod = EnvironmentsGrpc.getPollAirflowCommandMethod) == null) { + EnvironmentsGrpc.getPollAirflowCommandMethod = + getPollAirflowCommandMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PollAirflowCommand")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1 + .PollAirflowCommandRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1 + .PollAirflowCommandResponse.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("PollAirflowCommand")) + .build(); + } + } + } + return getPollAirflowCommandMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest, com.google.longrunning.Operation> @@ -466,6 +623,110 @@ private EnvironmentsGrpc() {} return getLoadSnapshotMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest, + com.google.longrunning.Operation> + getDatabaseFailoverMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DatabaseFailover", + requestType = + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest, + com.google.longrunning.Operation> + getDatabaseFailoverMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest, + com.google.longrunning.Operation> + getDatabaseFailoverMethod; + if ((getDatabaseFailoverMethod = EnvironmentsGrpc.getDatabaseFailoverMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getDatabaseFailoverMethod = EnvironmentsGrpc.getDatabaseFailoverMethod) == null) { + EnvironmentsGrpc.getDatabaseFailoverMethod = + getDatabaseFailoverMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DatabaseFailover")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1 + .DatabaseFailoverRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("DatabaseFailover")) + .build(); + } + } + } + return getDatabaseFailoverMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse> + getFetchDatabasePropertiesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "FetchDatabaseProperties", + requestType = + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + .class, + responseType = + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + .class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse> + getFetchDatabasePropertiesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse> + getFetchDatabasePropertiesMethod; + if ((getFetchDatabasePropertiesMethod = EnvironmentsGrpc.getFetchDatabasePropertiesMethod) + == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getFetchDatabasePropertiesMethod = EnvironmentsGrpc.getFetchDatabasePropertiesMethod) + == null) { + EnvironmentsGrpc.getFetchDatabasePropertiesMethod = + getFetchDatabasePropertiesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "FetchDatabaseProperties")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("FetchDatabaseProperties")) + .build(); + } + } + } + return getFetchDatabasePropertiesMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static EnvironmentsStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -619,6 +880,55 @@ default void checkUpgrade( getCheckUpgradeMethod(), responseObserver); } + /** + * + * + *
+     * Executes Airflow CLI command.
+     * 
+ */ + default void executeAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1 + .ExecuteAirflowCommandResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getExecuteAirflowCommandMethod(), responseObserver); + } + + /** + * + * + *
+     * Stops Airflow CLI command execution.
+     * 
+ */ + default void stopAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getStopAirflowCommandMethod(), responseObserver); + } + + /** + * + * + *
+     * Polls Airflow CLI command execution and fetches logs.
+     * 
+ */ + default void pollAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getPollAirflowCommandMethod(), responseObserver); + } + /** * * @@ -650,6 +960,38 @@ default void loadSnapshot( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getLoadSnapshotMethod(), responseObserver); } + + /** + * + * + *
+     * Triggers database failover (only for highly resilient environments).
+     * 
+ */ + default void databaseFailover( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDatabaseFailoverMethod(), responseObserver); + } + + /** + * + * + *
+     * Fetches database properties.
+     * 
+ */ + default void fetchDatabaseProperties( + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getFetchDatabasePropertiesMethod(), responseObserver); + } } /** @@ -803,6 +1145,61 @@ public void checkUpgrade( responseObserver); } + /** + * + * + *
+     * Executes Airflow CLI command.
+     * 
+ */ + public void executeAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1 + .ExecuteAirflowCommandResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExecuteAirflowCommandMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Stops Airflow CLI command execution.
+     * 
+ */ + public void stopAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getStopAirflowCommandMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Polls Airflow CLI command execution and fetches logs.
+     * 
+ */ + public void pollAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPollAirflowCommandMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -838,6 +1235,42 @@ public void loadSnapshot( request, responseObserver); } + + /** + * + * + *
+     * Triggers database failover (only for highly resilient environments).
+     * 
+ */ + public void databaseFailover( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDatabaseFailoverMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Fetches database properties.
+     * 
+ */ + public void fetchDatabaseProperties( + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getFetchDatabasePropertiesMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -953,6 +1386,51 @@ public com.google.longrunning.Operation checkUpgrade( getChannel(), getCheckUpgradeMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Executes Airflow CLI command.
+     * 
+ */ + public com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse + executeAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExecuteAirflowCommandMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Stops Airflow CLI command execution.
+     * 
+ */ + public com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + stopAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getStopAirflowCommandMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Polls Airflow CLI command execution and fetches logs.
+     * 
+ */ + public com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse + pollAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPollAirflowCommandMethod(), getCallOptions(), request); + } + /** * * @@ -982,6 +1460,34 @@ public com.google.longrunning.Operation loadSnapshot( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getLoadSnapshotMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Triggers database failover (only for highly resilient environments).
+     * 
+ */ + public com.google.longrunning.Operation databaseFailover( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDatabaseFailoverMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Fetches database properties.
+     * 
+ */ + public com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + fetchDatabaseProperties( + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getFetchDatabasePropertiesMethod(), getCallOptions(), request); + } } /** @@ -1109,6 +1615,54 @@ protected EnvironmentsFutureStub build( getChannel().newCall(getCheckUpgradeMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Executes Airflow CLI command.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse> + executeAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExecuteAirflowCommandMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Stops Airflow CLI command execution.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse> + stopAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getStopAirflowCommandMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Polls Airflow CLI command execution and fetches logs.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse> + pollAirflowCommand( + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPollAirflowCommandMethod(), getCallOptions()), request); + } + /** * * @@ -1140,6 +1694,37 @@ protected EnvironmentsFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getLoadSnapshotMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Triggers database failover (only for highly resilient environments).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + databaseFailover( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDatabaseFailoverMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Fetches database properties.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse> + fetchDatabaseProperties( + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getFetchDatabasePropertiesMethod(), getCallOptions()), request); + } } private static final int METHODID_CREATE_ENVIRONMENT = 0; @@ -1149,8 +1734,13 @@ protected EnvironmentsFutureStub build( private static final int METHODID_DELETE_ENVIRONMENT = 4; private static final int METHODID_RESTART_WEB_SERVER = 5; private static final int METHODID_CHECK_UPGRADE = 6; - private static final int METHODID_SAVE_SNAPSHOT = 7; - private static final int METHODID_LOAD_SNAPSHOT = 8; + private static final int METHODID_EXECUTE_AIRFLOW_COMMAND = 7; + private static final int METHODID_STOP_AIRFLOW_COMMAND = 8; + private static final int METHODID_POLL_AIRFLOW_COMMAND = 9; + private static final int METHODID_SAVE_SNAPSHOT = 10; + private static final int METHODID_LOAD_SNAPSHOT = 11; + private static final int METHODID_DATABASE_FAILOVER = 12; + private static final int METHODID_FETCH_DATABASE_PROPERTIES = 13; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1215,6 +1805,33 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_EXECUTE_AIRFLOW_COMMAND: + serviceImpl.executeAirflowCommand( + (com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1 + .ExecuteAirflowCommandResponse>) + responseObserver); + break; + case METHODID_STOP_AIRFLOW_COMMAND: + serviceImpl.stopAirflowCommand( + (com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1 + .StopAirflowCommandResponse>) + responseObserver); + break; + case METHODID_POLL_AIRFLOW_COMMAND: + serviceImpl.pollAirflowCommand( + (com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1 + .PollAirflowCommandResponse>) + responseObserver); + break; case METHODID_SAVE_SNAPSHOT: serviceImpl.saveSnapshot( (com.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest) request, @@ -1225,6 +1842,22 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_DATABASE_FAILOVER: + serviceImpl.databaseFailover( + (com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_FETCH_DATABASE_PROPERTIES: + serviceImpl.fetchDatabaseProperties( + (com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse>) + responseObserver); + break; default: throw new AssertionError(); } @@ -1287,6 +1920,30 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest, com.google.longrunning.Operation>(service, METHODID_CHECK_UPGRADE))) + .addMethod( + getExecuteAirflowCommandMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1beta1 + .ExecuteAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1beta1 + .ExecuteAirflowCommandResponse>(service, METHODID_EXECUTE_AIRFLOW_COMMAND))) + .addMethod( + getStopAirflowCommandMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1beta1 + .StopAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1beta1 + .StopAirflowCommandResponse>(service, METHODID_STOP_AIRFLOW_COMMAND))) + .addMethod( + getPollAirflowCommandMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1beta1 + .PollAirflowCommandRequest, + com.google.cloud.orchestration.airflow.service.v1beta1 + .PollAirflowCommandResponse>(service, METHODID_POLL_AIRFLOW_COMMAND))) .addMethod( getSaveSnapshotMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1299,6 +1956,21 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest, com.google.longrunning.Operation>(service, METHODID_LOAD_SNAPSHOT))) + .addMethod( + getDatabaseFailoverMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest, + com.google.longrunning.Operation>(service, METHODID_DATABASE_FAILOVER))) + .addMethod( + getFetchDatabasePropertiesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesRequest, + com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse>( + service, METHODID_FETCH_DATABASE_PROPERTIES))) .build(); } @@ -1358,8 +2030,13 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getDeleteEnvironmentMethod()) .addMethod(getRestartWebServerMethod()) .addMethod(getCheckUpgradeMethod()) + .addMethod(getExecuteAirflowCommandMethod()) + .addMethod(getStopAirflowCommandMethod()) + .addMethod(getPollAirflowCommandMethod()) .addMethod(getSaveSnapshotMethod()) .addMethod(getLoadSnapshotMethod()) + .addMethod(getDatabaseFailoverMethod()) + .addMethod(getFetchDatabasePropertiesMethod()) .build(); } } diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/pom.xml b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/pom.xml index 209624255073..eacf943e6bc5 100644 --- a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/pom.xml +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/pom.xml @@ -21,5 +21,9 @@ com.google.api.grpc proto-google-common-protos + + com.google.api + api-common + diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseFailoverRequest.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseFailoverRequest.java new file mode 100644 index 000000000000..434903f45fcd --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseFailoverRequest.java @@ -0,0 +1,652 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Request to trigger database failover (only for highly resilient
+ * environments).
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest} + */ +public final class DatabaseFailoverRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest) + DatabaseFailoverRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DatabaseFailoverRequest.newBuilder() to construct. + private DatabaseFailoverRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DatabaseFailoverRequest() { + environment_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DatabaseFailoverRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest.class, + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest.Builder + .class); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object environment_ = ""; + /** + * + * + *
+   * Target environment:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * Target environment:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, environment_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, environment_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest other = + (com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest) obj; + + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request to trigger database failover (only for highly resilient
+   * environments).
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest) + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest.class, + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + environment_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest build() { + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest result = + new com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.environment_ = environment_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + .getDefaultInstance()) return this; + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + environment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * Target environment:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Target environment:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Target environment:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Target environment:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + environment_ = getDefaultInstance().getEnvironment(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Target environment:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest) + private static final com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatabaseFailoverRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseFailoverRequestOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseFailoverRequestOrBuilder.java new file mode 100644 index 000000000000..861a07225198 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseFailoverRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface DatabaseFailoverRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Target environment:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * Target environment:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseFailoverResponse.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseFailoverResponse.java new file mode 100644 index 000000000000..489c395ce8ba --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseFailoverResponse.java @@ -0,0 +1,454 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Response for DatabaseFailoverRequest.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse} + */ +public final class DatabaseFailoverResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse) + DatabaseFailoverResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use DatabaseFailoverResponse.newBuilder() to construct. + private DatabaseFailoverResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DatabaseFailoverResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DatabaseFailoverResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse.class, + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse.Builder + .class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse other = + (com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for DatabaseFailoverRequest.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse) + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse.class, + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse build() { + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse result = + new com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse) + private static final com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatabaseFailoverResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseFailoverResponseOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseFailoverResponseOrBuilder.java new file mode 100644 index 000000000000..82d0b9a395e2 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseFailoverResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface DatabaseFailoverResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentConfig.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentConfig.java index 2d814f32e813..918024dcbd04 100644 --- a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentConfig.java +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentConfig.java @@ -43,6 +43,7 @@ private EnvironmentConfig() { environmentSize_ = 0; airflowUri_ = ""; airflowByoidUri_ = ""; + resilienceMode_ = 0; } @java.lang.Override @@ -250,6 +251,144 @@ private EnvironmentSize(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize) } + /** + * + * + *
+   * Resilience mode of the Cloud Composer Environment.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode} + */ + public enum ResilienceMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default mode doesn't change environment parameters.
+     * 
+ * + * RESILIENCE_MODE_UNSPECIFIED = 0; + */ + RESILIENCE_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * Enabled High Resilience mode, including Cloud SQL HA.
+     * 
+ * + * HIGH_RESILIENCE = 1; + */ + HIGH_RESILIENCE(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default mode doesn't change environment parameters.
+     * 
+ * + * RESILIENCE_MODE_UNSPECIFIED = 0; + */ + public static final int RESILIENCE_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Enabled High Resilience mode, including Cloud SQL HA.
+     * 
+ * + * HIGH_RESILIENCE = 1; + */ + public static final int HIGH_RESILIENCE_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResilienceMode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ResilienceMode forNumber(int value) { + switch (value) { + case 0: + return RESILIENCE_MODE_UNSPECIFIED; + case 1: + return HIGH_RESILIENCE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ResilienceMode findValueByNumber(int number) { + return ResilienceMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final ResilienceMode[] VALUES = values(); + + public static ResilienceMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ResilienceMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode) + } + public static final int GKE_CLUSTER_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -1264,6 +1403,56 @@ public com.google.cloud.orchestration.airflow.service.v1.RecoveryConfig getRecov : recoveryConfig_; } + public static final int RESILIENCE_MODE_FIELD_NUMBER = 19; + private int resilienceMode_ = 0; + /** + * + * + *
+   * Optional. Resilience mode of the Cloud Composer Environment.
+   *
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.2.0-airflow-*.*.* and newer.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode resilience_mode = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for resilienceMode. + */ + @java.lang.Override + public int getResilienceModeValue() { + return resilienceMode_; + } + /** + * + * + *
+   * Optional. Resilience mode of the Cloud Composer Environment.
+   *
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.2.0-airflow-*.*.* and newer.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode resilience_mode = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resilienceMode. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode + getResilienceMode() { + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode result = + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode + .forNumber(resilienceMode_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode + .UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1329,6 +1518,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (recoveryConfig_ != null) { output.writeMessage(18, getRecoveryConfig()); } + if (resilienceMode_ + != com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode + .RESILIENCE_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(19, resilienceMode_); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(airflowByoidUri_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 20, airflowByoidUri_); } @@ -1398,6 +1593,12 @@ public int getSerializedSize() { if (recoveryConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getRecoveryConfig()); } + if (resilienceMode_ + != com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode + .RESILIENCE_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(19, resilienceMode_); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(airflowByoidUri_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, airflowByoidUri_); } @@ -1471,6 +1672,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRecoveryConfig()) { if (!getRecoveryConfig().equals(other.getRecoveryConfig())) return false; } + if (resilienceMode_ != other.resilienceMode_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1538,6 +1740,8 @@ public int hashCode() { hash = (37 * hash) + RECOVERY_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getRecoveryConfig().hashCode(); } + hash = (37 * hash) + RESILIENCE_MODE_FIELD_NUMBER; + hash = (53 * hash) + resilienceMode_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1741,6 +1945,7 @@ public Builder clear() { recoveryConfigBuilder_.dispose(); recoveryConfigBuilder_ = null; } + resilienceMode_ = 0; return this; } @@ -1849,6 +2054,9 @@ private void buildPartial0( result.recoveryConfig_ = recoveryConfigBuilder_ == null ? recoveryConfig_ : recoveryConfigBuilder_.build(); } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.resilienceMode_ = resilienceMode_; + } } @java.lang.Override @@ -1959,6 +2167,9 @@ public Builder mergeFrom( if (other.hasRecoveryConfig()) { mergeRecoveryConfig(other.getRecoveryConfig()); } + if (other.resilienceMode_ != 0) { + setResilienceModeValue(other.getResilienceModeValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2087,6 +2298,12 @@ public Builder mergeFrom( bitField0_ |= 0x00010000; break; } // case 146 + case 152: + { + resilienceMode_ = input.readEnum(); + bitField0_ |= 0x00020000; + break; + } // case 152 case 162: { airflowByoidUri_ = input.readStringRequireUtf8(); @@ -5337,6 +5554,127 @@ public Builder clearRecoveryConfig() { return recoveryConfigBuilder_; } + private int resilienceMode_ = 0; + /** + * + * + *
+     * Optional. Resilience mode of the Cloud Composer Environment.
+     *
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.2.0-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode resilience_mode = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for resilienceMode. + */ + @java.lang.Override + public int getResilienceModeValue() { + return resilienceMode_; + } + /** + * + * + *
+     * Optional. Resilience mode of the Cloud Composer Environment.
+     *
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.2.0-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode resilience_mode = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for resilienceMode to set. + * @return This builder for chaining. + */ + public Builder setResilienceModeValue(int value) { + resilienceMode_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Resilience mode of the Cloud Composer Environment.
+     *
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.2.0-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode resilience_mode = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resilienceMode. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode + getResilienceMode() { + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode result = + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode + .forNumber(resilienceMode_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Resilience mode of the Cloud Composer Environment.
+     *
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.2.0-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode resilience_mode = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The resilienceMode to set. + * @return This builder for chaining. + */ + public Builder setResilienceMode( + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00020000; + resilienceMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Resilience mode of the Cloud Composer Environment.
+     *
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.2.0-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode resilience_mode = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearResilienceMode() { + bitField0_ = (bitField0_ & ~0x00020000); + resilienceMode_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentConfigOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentConfigOrBuilder.java index 7c73f01ce8bb..393279cec5cf 100644 --- a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentConfigOrBuilder.java +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentConfigOrBuilder.java @@ -737,4 +737,40 @@ public interface EnvironmentConfigOrBuilder */ com.google.cloud.orchestration.airflow.service.v1.RecoveryConfigOrBuilder getRecoveryConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Resilience mode of the Cloud Composer Environment.
+   *
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.2.0-airflow-*.*.* and newer.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode resilience_mode = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for resilienceMode. + */ + int getResilienceModeValue(); + /** + * + * + *
+   * Optional. Resilience mode of the Cloud Composer Environment.
+   *
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.2.0-airflow-*.*.* and newer.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode resilience_mode = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resilienceMode. + */ + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode + getResilienceMode(); } diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentName.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentName.java new file mode 100644 index 000000000000..b286f4be45b3 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class EnvironmentName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ENVIRONMENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/environments/{environment}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String environment; + + @Deprecated + protected EnvironmentName() { + project = null; + location = null; + environment = null; + } + + private EnvironmentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + environment = Preconditions.checkNotNull(builder.getEnvironment()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEnvironment() { + return environment; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static EnvironmentName of(String project, String location, String environment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setEnvironment(environment) + .build(); + } + + public static String format(String project, String location, String environment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setEnvironment(environment) + .build() + .toString(); + } + + public static EnvironmentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ENVIRONMENT.validatedMatch( + formattedString, "EnvironmentName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("environment")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (EnvironmentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ENVIRONMENT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (environment != null) { + fieldMapBuilder.put("environment", environment); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ENVIRONMENT.instantiate( + "project", project, "location", location, "environment", environment); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + EnvironmentName that = ((EnvironmentName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.environment, that.environment); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(environment); + return h; + } + + /** Builder for projects/{project}/locations/{location}/environments/{environment}. */ + public static class Builder { + private String project; + private String location; + private String environment; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEnvironment() { + return environment; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setEnvironment(String environment) { + this.environment = environment; + return this; + } + + private Builder(EnvironmentName environmentName) { + this.project = environmentName.project; + this.location = environmentName.location; + this.environment = environmentName.environment; + } + + public EnvironmentName build() { + return new EnvironmentName(this); + } + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsOuterClass.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsOuterClass.java index fc8a8864e05c..09b4786a1d41 100644 --- a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsOuterClass.java +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsOuterClass.java @@ -51,6 +51,38 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_orchestration_airflow_service_v1_UpdateEnvironmentRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_orchestration_airflow_service_v1_UpdateEnvironmentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_Line_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_Line_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_ExitInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_ExitInfo_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_orchestration_airflow_service_v1_SaveSnapshotRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -67,6 +99,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_orchestration_airflow_service_v1_LoadSnapshotResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_orchestration_airflow_service_v1_LoadSnapshotResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_orchestration_airflow_service_v1_EnvironmentConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -213,236 +261,305 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\n\004name\030\002 \001(\t\022O\n\013environment\030\001 \001(\0132:.goog" + "le.cloud.orchestration.airflow.service.v" + "1.Environment\022/\n\013update_mask\030\003 \001(\0132\032.goo" - + "gle.protobuf.FieldMask\"E\n\023SaveSnapshotRe" - + "quest\022\023\n\013environment\030\001 \001(\t\022\031\n\021snapshot_l" - + "ocation\030\002 \001(\t\"-\n\024SaveSnapshotResponse\022\025\n" - + "\rsnapshot_path\030\001 \001(\t\"\335\001\n\023LoadSnapshotReq" - + "uest\022\023\n\013environment\030\001 \001(\t\022\025\n\rsnapshot_pa" - + "th\030\002 \001(\t\022\'\n\037skip_pypi_packages_installat" - + "ion\030\003 \001(\010\022*\n\"skip_environment_variables_" - + "setting\030\004 \001(\010\022&\n\036skip_airflow_overrides_" - + "setting\030\005 \001(\010\022\035\n\025skip_gcs_data_copying\030\006" - + " \001(\010\"\026\n\024LoadSnapshotResponse\"\336\013\n\021Environ" - + "mentConfig\022\023\n\013gke_cluster\030\001 \001(\t\022\026\n\016dag_g" - + "cs_prefix\030\002 \001(\t\022\022\n\nnode_count\030\003 \001(\005\022V\n\017s" - + "oftware_config\030\004 \001(\0132=.google.cloud.orch" - + "estration.airflow.service.v1.SoftwareCon" - + "fig\022N\n\013node_config\030\005 \001(\01329.google.cloud." - + "orchestration.airflow.service.v1.NodeCon" - + "fig\022k\n\032private_environment_config\030\007 \001(\0132" - + "G.google.cloud.orchestration.airflow.ser" - + "vice.v1.PrivateEnvironmentConfig\022}\n!web_" - + "server_network_access_control\030\010 \001(\0132L.go" - + "ogle.cloud.orchestration.airflow.service" - + ".v1.WebServerNetworkAccessControlB\004\342A\001\001\022" - + "\\\n\017database_config\030\t \001(\0132=.google.cloud." - + "orchestration.airflow.service.v1.Databas" - + "eConfigB\004\342A\001\001\022_\n\021web_server_config\030\n \001(\013" - + "2>.google.cloud.orchestration.airflow.se" - + "rvice.v1.WebServerConfigB\004\342A\001\001\022`\n\021encryp" - + "tion_config\030\013 \001(\0132?.google.cloud.orchest" - + "ration.airflow.service.v1.EncryptionConf" - + "igB\004\342A\001\001\022b\n\022maintenance_window\030\014 \001(\0132@.g" - + "oogle.cloud.orchestration.airflow.servic" - + "e.v1.MaintenanceWindowB\004\342A\001\001\022^\n\020workload" - + "s_config\030\017 \001(\0132>.google.cloud.orchestrat" - + "ion.airflow.service.v1.WorkloadsConfigB\004" - + "\342A\001\001\022p\n\020environment_size\030\020 \001(\0162P.google." - + "cloud.orchestration.airflow.service.v1.E" - + "nvironmentConfig.EnvironmentSizeB\004\342A\001\001\022\023" - + "\n\013airflow_uri\030\006 \001(\t\022\037\n\021airflow_byoid_uri" - + "\030\024 \001(\tB\004\342A\001\003\022~\n!master_authorized_networ" - + "ks_config\030\021 \001(\0132M.google.cloud.orchestra" - + "tion.airflow.service.v1.MasterAuthorized" - + "NetworksConfigB\004\342A\001\001\022\\\n\017recovery_config\030" - + "\022 \001(\0132=.google.cloud.orchestration.airfl" - + "ow.service.v1.RecoveryConfigB\004\342A\001\001\"\210\001\n\017E" - + "nvironmentSize\022 \n\034ENVIRONMENT_SIZE_UNSPE" - + "CIFIED\020\000\022\032\n\026ENVIRONMENT_SIZE_SMALL\020\001\022\033\n\027" - + "ENVIRONMENT_SIZE_MEDIUM\020\002\022\032\n\026ENVIRONMENT" - + "_SIZE_LARGE\020\003\"\323\001\n\035WebServerNetworkAccess" - + "Control\022v\n\021allowed_ip_ranges\030\001 \003(\0132[.goo" - + "gle.cloud.orchestration.airflow.service." - + "v1.WebServerNetworkAccessControl.Allowed" - + "IpRange\032:\n\016AllowedIpRange\022\r\n\005value\030\001 \001(\t" - + "\022\031\n\013description\030\002 \001(\tB\004\342A\001\001\",\n\016DatabaseC" - + "onfig\022\032\n\014machine_type\030\001 \001(\tB\004\342A\001\001\"-\n\017Web" - + "ServerConfig\022\032\n\014machine_type\030\001 \001(\tB\004\342A\001\001" - + "\".\n\020EncryptionConfig\022\032\n\014kms_key_name\030\001 \001" - + "(\tB\004\342A\001\001\"\227\001\n\021MaintenanceWindow\0224\n\nstart_" - + "time\030\001 \001(\0132\032.google.protobuf.TimestampB\004" - + "\342A\001\002\0222\n\010end_time\030\002 \001(\0132\032.google.protobuf" - + ".TimestampB\004\342A\001\002\022\030\n\nrecurrence\030\003 \001(\tB\004\342A" - + "\001\002\"\324\004\n\016SoftwareConfig\022\025\n\rimage_version\030\001" - + " \001(\t\022{\n\030airflow_config_overrides\030\002 \003(\0132Y" + + "gle.protobuf.FieldMask\"l\n\034ExecuteAirflow" + + "CommandRequest\022\023\n\013environment\030\001 \001(\t\022\017\n\007c" + + "ommand\030\002 \001(\t\022\022\n\nsubcommand\030\003 \001(\t\022\022\n\npara" + + "meters\030\004 \003(\t\"h\n\035ExecuteAirflowCommandRes" + + "ponse\022\024\n\014execution_id\030\001 \001(\t\022\013\n\003pod\030\002 \001(\t" + + "\022\025\n\rpod_namespace\030\003 \001(\t\022\r\n\005error\030\004 \001(\t\"y" + + "\n\031StopAirflowCommandRequest\022\023\n\013environme" + + "nt\030\001 \001(\t\022\024\n\014execution_id\030\002 \001(\t\022\013\n\003pod\030\003 " + + "\001(\t\022\025\n\rpod_namespace\030\004 \001(\t\022\r\n\005force\030\005 \001(" + + "\010\"=\n\032StopAirflowCommandResponse\022\017\n\007is_do" + + "ne\030\001 \001(\010\022\016\n\006output\030\002 \003(\t\"\204\001\n\031PollAirflow" + + "CommandRequest\022\023\n\013environment\030\001 \001(\t\022\024\n\014e" + + "xecution_id\030\002 \001(\t\022\013\n\003pod\030\003 \001(\t\022\025\n\rpod_na" + + "mespace\030\004 \001(\t\022\030\n\020next_line_number\030\005 \001(\005\"" + + "\323\002\n\032PollAirflowCommandResponse\022^\n\006output" + + "\030\001 \003(\0132N.google.cloud.orchestration.airf" + + "low.service.v1.PollAirflowCommandRespons" + + "e.Line\022\022\n\noutput_end\030\002 \001(\010\022e\n\texit_info\030" + + "\003 \001(\0132R.google.cloud.orchestration.airfl" + + "ow.service.v1.PollAirflowCommandResponse" + + ".ExitInfo\032,\n\004Line\022\023\n\013line_number\030\001 \001(\005\022\017" + + "\n\007content\030\002 \001(\t\032,\n\010ExitInfo\022\021\n\texit_code" + + "\030\001 \001(\005\022\r\n\005error\030\002 \001(\t\"E\n\023SaveSnapshotReq" + + "uest\022\023\n\013environment\030\001 \001(\t\022\031\n\021snapshot_lo" + + "cation\030\002 \001(\t\"-\n\024SaveSnapshotResponse\022\025\n\r" + + "snapshot_path\030\001 \001(\t\"\335\001\n\023LoadSnapshotRequ" + + "est\022\023\n\013environment\030\001 \001(\t\022\025\n\rsnapshot_pat" + + "h\030\002 \001(\t\022\'\n\037skip_pypi_packages_installati" + + "on\030\003 \001(\010\022*\n\"skip_environment_variables_s" + + "etting\030\004 \001(\010\022&\n\036skip_airflow_overrides_s" + + "etting\030\005 \001(\010\022\035\n\025skip_gcs_data_copying\030\006 " + + "\001(\010\"\026\n\024LoadSnapshotResponse\".\n\027DatabaseF" + + "ailoverRequest\022\023\n\013environment\030\001 \001(\t\"\032\n\030D" + + "atabaseFailoverResponse\"c\n\036FetchDatabase" + + "PropertiesRequest\022A\n\013environment\030\001 \001(\tB," + + "\342A\001\002\372A%\n#composer.googleapis.com/Environ" + + "ment\"~\n\037FetchDatabasePropertiesResponse\022" + + "\030\n\020primary_gce_zone\030\001 \001(\t\022\032\n\022secondary_g" + + "ce_zone\030\002 \001(\t\022%\n\035is_failover_replica_ava" + + "ilable\030\003 \001(\010\"\226\r\n\021EnvironmentConfig\022\023\n\013gk" + + "e_cluster\030\001 \001(\t\022\026\n\016dag_gcs_prefix\030\002 \001(\t\022" + + "\022\n\nnode_count\030\003 \001(\005\022V\n\017software_config\030\004" + + " \001(\0132=.google.cloud.orchestration.airflo" + + "w.service.v1.SoftwareConfig\022N\n\013node_conf" + + "ig\030\005 \001(\01329.google.cloud.orchestration.ai" + + "rflow.service.v1.NodeConfig\022k\n\032private_e" + + "nvironment_config\030\007 \001(\0132G.google.cloud.o" + + "rchestration.airflow.service.v1.PrivateE" + + "nvironmentConfig\022}\n!web_server_network_a" + + "ccess_control\030\010 \001(\0132L.google.cloud.orche" + + "stration.airflow.service.v1.WebServerNet" + + "workAccessControlB\004\342A\001\001\022\\\n\017database_conf" + + "ig\030\t \001(\0132=.google.cloud.orchestration.ai" + + "rflow.service.v1.DatabaseConfigB\004\342A\001\001\022_\n" + + "\021web_server_config\030\n \001(\0132>.google.cloud." + + "orchestration.airflow.service.v1.WebServ" + + "erConfigB\004\342A\001\001\022`\n\021encryption_config\030\013 \001(" + + "\0132?.google.cloud.orchestration.airflow.s" + + "ervice.v1.EncryptionConfigB\004\342A\001\001\022b\n\022main" + + "tenance_window\030\014 \001(\0132@.google.cloud.orch" + + "estration.airflow.service.v1.Maintenance" + + "WindowB\004\342A\001\001\022^\n\020workloads_config\030\017 \001(\0132>" + ".google.cloud.orchestration.airflow.serv" - + "ice.v1.SoftwareConfig.AirflowConfigOverr" - + "idesEntry\022f\n\rpypi_packages\030\003 \003(\0132O.googl" + + "ice.v1.WorkloadsConfigB\004\342A\001\001\022p\n\020environm" + + "ent_size\030\020 \001(\0162P.google.cloud.orchestrat" + + "ion.airflow.service.v1.EnvironmentConfig" + + ".EnvironmentSizeB\004\342A\001\001\022\023\n\013airflow_uri\030\006 " + + "\001(\t\022\037\n\021airflow_byoid_uri\030\024 \001(\tB\004\342A\001\003\022~\n!" + + "master_authorized_networks_config\030\021 \001(\0132" + + "M.google.cloud.orchestration.airflow.ser" + + "vice.v1.MasterAuthorizedNetworksConfigB\004" + + "\342A\001\001\022\\\n\017recovery_config\030\022 \001(\0132=.google.c" + + "loud.orchestration.airflow.service.v1.Re" + + "coveryConfigB\004\342A\001\001\022n\n\017resilience_mode\030\023 " + + "\001(\0162O.google.cloud.orchestration.airflow" + + ".service.v1.EnvironmentConfig.Resilience" + + "ModeB\004\342A\001\001\"\210\001\n\017EnvironmentSize\022 \n\034ENVIRO" + + "NMENT_SIZE_UNSPECIFIED\020\000\022\032\n\026ENVIRONMENT_" + + "SIZE_SMALL\020\001\022\033\n\027ENVIRONMENT_SIZE_MEDIUM\020" + + "\002\022\032\n\026ENVIRONMENT_SIZE_LARGE\020\003\"F\n\016Resilie" + + "nceMode\022\037\n\033RESILIENCE_MODE_UNSPECIFIED\020\000" + + "\022\023\n\017HIGH_RESILIENCE\020\001\"\323\001\n\035WebServerNetwo" + + "rkAccessControl\022v\n\021allowed_ip_ranges\030\001 \003" + + "(\0132[.google.cloud.orchestration.airflow." + + "service.v1.WebServerNetworkAccessControl" + + ".AllowedIpRange\032:\n\016AllowedIpRange\022\r\n\005val" + + "ue\030\001 \001(\t\022\031\n\013description\030\002 \001(\tB\004\342A\001\001\",\n\016D" + + "atabaseConfig\022\032\n\014machine_type\030\001 \001(\tB\004\342A\001" + + "\001\"-\n\017WebServerConfig\022\032\n\014machine_type\030\001 \001" + + "(\tB\004\342A\001\001\".\n\020EncryptionConfig\022\032\n\014kms_key_" + + "name\030\001 \001(\tB\004\342A\001\001\"\227\001\n\021MaintenanceWindow\0224" + + "\n\nstart_time\030\001 \001(\0132\032.google.protobuf.Tim" + + "estampB\004\342A\001\002\0222\n\010end_time\030\002 \001(\0132\032.google." + + "protobuf.TimestampB\004\342A\001\002\022\030\n\nrecurrence\030\003" + + " \001(\tB\004\342A\001\002\"\324\004\n\016SoftwareConfig\022\025\n\rimage_v" + + "ersion\030\001 \001(\t\022{\n\030airflow_config_overrides" + + "\030\002 \003(\0132Y.google.cloud.orchestration.airf" + + "low.service.v1.SoftwareConfig.AirflowCon" + + "figOverridesEntry\022f\n\rpypi_packages\030\003 \003(\013" + + "2O.google.cloud.orchestration.airflow.se" + + "rvice.v1.SoftwareConfig.PypiPackagesEntr" + + "y\022f\n\renv_variables\030\004 \003(\0132O.google.cloud." + + "orchestration.airflow.service.v1.Softwar" + + "eConfig.EnvVariablesEntry\022\026\n\016python_vers" + + "ion\030\006 \001(\t\022\035\n\017scheduler_count\030\007 \001(\005B\004\342A\001\001" + + "\032=\n\033AirflowConfigOverridesEntry\022\013\n\003key\030\001" + + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0323\n\021PypiPackagesE" + + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0323\n\021" + + "EnvVariablesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\001\"\225\002\n\022IPAllocationPolicy\022\034\n\016use_" + + "ip_aliases\030\001 \001(\010B\004\342A\001\001\022,\n\034cluster_second" + + "ary_range_name\030\002 \001(\tB\004\342A\001\001H\000\022\'\n\027cluster_" + + "ipv4_cidr_block\030\004 \001(\tB\004\342A\001\001H\000\022-\n\035service" + + "s_secondary_range_name\030\003 \001(\tB\004\342A\001\001H\001\022(\n\030" + + "services_ipv4_cidr_block\030\005 \001(\tB\004\342A\001\001H\001B\027" + + "\n\025cluster_ip_allocationB\030\n\026services_ip_a" + + "llocation\"\267\002\n\nNodeConfig\022\020\n\010location\030\001 \001" + + "(\t\022\024\n\014machine_type\030\002 \001(\t\022\017\n\007network\030\003 \001(" + + "\t\022\022\n\nsubnetwork\030\004 \001(\t\022\024\n\014disk_size_gb\030\005 " + + "\001(\005\022\024\n\014oauth_scopes\030\006 \003(\t\022\027\n\017service_acc" + + "ount\030\007 \001(\t\022\014\n\004tags\030\010 \003(\t\022e\n\024ip_allocatio" + + "n_policy\030\t \001(\0132A.google.cloud.orchestrat" + + "ion.airflow.service.v1.IPAllocationPolic" + + "yB\004\342A\001\001\022\"\n\024enable_ip_masq_agent\030\013 \001(\010B\004\342" + + "A\001\001\"\215\001\n\024PrivateClusterConfig\022%\n\027enable_p" + + "rivate_endpoint\030\001 \001(\010B\004\342A\001\001\022$\n\026master_ip" + + "v4_cidr_block\030\002 \001(\tB\004\342A\001\001\022(\n\032master_ipv4" + + "_reserved_range\030\003 \001(\tB\004\342A\001\003\"\342\001\n\020Networki" + + "ngConfig\022m\n\017connection_type\030\001 \001(\0162N.goog" + + "le.cloud.orchestration.airflow.service.v" + + "1.NetworkingConfig.ConnectionTypeB\004\342A\001\001\"" + + "_\n\016ConnectionType\022\037\n\033CONNECTION_TYPE_UNS" + + "PECIFIED\020\000\022\017\n\013VPC_PEERING\020\001\022\033\n\027PRIVATE_S" + + "ERVICE_CONNECT\020\002\"\346\004\n\030PrivateEnvironmentC" + + "onfig\022(\n\032enable_private_environment\030\001 \001(" + + "\010B\004\342A\001\001\022i\n\026private_cluster_config\030\002 \001(\0132" + + "C.google.cloud.orchestration.airflow.ser" + + "vice.v1.PrivateClusterConfigB\004\342A\001\001\022(\n\032we" + + "b_server_ipv4_cidr_block\030\003 \001(\tB\004\342A\001\001\022\'\n\031" + + "cloud_sql_ipv4_cidr_block\030\004 \001(\tB\004\342A\001\001\022,\n" + + "\036web_server_ipv4_reserved_range\030\005 \001(\tB\004\342" + + "A\001\003\0224\n&cloud_composer_network_ipv4_cidr_" + + "block\030\007 \001(\tB\004\342A\001\001\0228\n*cloud_composer_netw" + + "ork_ipv4_reserved_range\030\010 \001(\tB\004\342A\001\003\022.\n e" + + "nable_privately_used_public_ips\030\006 \001(\010B\004\342" + + "A\001\001\0222\n$cloud_composer_connection_subnetw" + + "ork\030\t \001(\tB\004\342A\001\001\022`\n\021networking_config\030\n \001" + + "(\0132?.google.cloud.orchestration.airflow." + + "service.v1.NetworkingConfigB\004\342A\001\001\"\243\005\n\017Wo" + + "rkloadsConfig\022i\n\tscheduler\030\001 \001(\0132P.googl" + "e.cloud.orchestration.airflow.service.v1" - + ".SoftwareConfig.PypiPackagesEntry\022f\n\renv" - + "_variables\030\004 \003(\0132O.google.cloud.orchestr" - + "ation.airflow.service.v1.SoftwareConfig." - + "EnvVariablesEntry\022\026\n\016python_version\030\006 \001(" - + "\t\022\035\n\017scheduler_count\030\007 \001(\005B\004\342A\001\001\032=\n\033Airf" - + "lowConfigOverridesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" - + "value\030\002 \001(\t:\0028\001\0323\n\021PypiPackagesEntry\022\013\n\003" - + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0323\n\021EnvVaria" - + "blesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028" - + "\001\"\225\002\n\022IPAllocationPolicy\022\034\n\016use_ip_alias" - + "es\030\001 \001(\010B\004\342A\001\001\022,\n\034cluster_secondary_rang" - + "e_name\030\002 \001(\tB\004\342A\001\001H\000\022\'\n\027cluster_ipv4_cid" - + "r_block\030\004 \001(\tB\004\342A\001\001H\000\022-\n\035services_second" - + "ary_range_name\030\003 \001(\tB\004\342A\001\001H\001\022(\n\030services" - + "_ipv4_cidr_block\030\005 \001(\tB\004\342A\001\001H\001B\027\n\025cluste" - + "r_ip_allocationB\030\n\026services_ip_allocatio" - + "n\"\267\002\n\nNodeConfig\022\020\n\010location\030\001 \001(\t\022\024\n\014ma" - + "chine_type\030\002 \001(\t\022\017\n\007network\030\003 \001(\t\022\022\n\nsub" - + "network\030\004 \001(\t\022\024\n\014disk_size_gb\030\005 \001(\005\022\024\n\014o" - + "auth_scopes\030\006 \003(\t\022\027\n\017service_account\030\007 \001" - + "(\t\022\014\n\004tags\030\010 \003(\t\022e\n\024ip_allocation_policy" - + "\030\t \001(\0132A.google.cloud.orchestration.airf" - + "low.service.v1.IPAllocationPolicyB\004\342A\001\001\022" - + "\"\n\024enable_ip_masq_agent\030\013 \001(\010B\004\342A\001\001\"\215\001\n\024" - + "PrivateClusterConfig\022%\n\027enable_private_e" - + "ndpoint\030\001 \001(\010B\004\342A\001\001\022$\n\026master_ipv4_cidr_" - + "block\030\002 \001(\tB\004\342A\001\001\022(\n\032master_ipv4_reserve" - + "d_range\030\003 \001(\tB\004\342A\001\003\"\342\001\n\020NetworkingConfig" - + "\022m\n\017connection_type\030\001 \001(\0162N.google.cloud" - + ".orchestration.airflow.service.v1.Networ" - + "kingConfig.ConnectionTypeB\004\342A\001\001\"_\n\016Conne" - + "ctionType\022\037\n\033CONNECTION_TYPE_UNSPECIFIED" - + "\020\000\022\017\n\013VPC_PEERING\020\001\022\033\n\027PRIVATE_SERVICE_C" - + "ONNECT\020\002\"\346\004\n\030PrivateEnvironmentConfig\022(\n" - + "\032enable_private_environment\030\001 \001(\010B\004\342A\001\001\022" - + "i\n\026private_cluster_config\030\002 \001(\0132C.google" - + ".cloud.orchestration.airflow.service.v1." - + "PrivateClusterConfigB\004\342A\001\001\022(\n\032web_server" - + "_ipv4_cidr_block\030\003 \001(\tB\004\342A\001\001\022\'\n\031cloud_sq" - + "l_ipv4_cidr_block\030\004 \001(\tB\004\342A\001\001\022,\n\036web_ser" - + "ver_ipv4_reserved_range\030\005 \001(\tB\004\342A\001\003\0224\n&c" - + "loud_composer_network_ipv4_cidr_block\030\007 " - + "\001(\tB\004\342A\001\001\0228\n*cloud_composer_network_ipv4" - + "_reserved_range\030\010 \001(\tB\004\342A\001\003\022.\n enable_pr" - + "ivately_used_public_ips\030\006 \001(\010B\004\342A\001\001\0222\n$c" - + "loud_composer_connection_subnetwork\030\t \001(" - + "\tB\004\342A\001\001\022`\n\021networking_config\030\n \001(\0132?.goo" - + "gle.cloud.orchestration.airflow.service." - + "v1.NetworkingConfigB\004\342A\001\001\"\243\005\n\017WorkloadsC" - + "onfig\022i\n\tscheduler\030\001 \001(\0132P.google.cloud." - + "orchestration.airflow.service.v1.Workloa" - + "dsConfig.SchedulerResourceB\004\342A\001\001\022j\n\nweb_" - + "server\030\002 \001(\0132P.google.cloud.orchestratio" - + "n.airflow.service.v1.WorkloadsConfig.Web" - + "ServerResourceB\004\342A\001\001\022c\n\006worker\030\003 \001(\0132M.g" - + "oogle.cloud.orchestration.airflow.servic" - + "e.v1.WorkloadsConfig.WorkerResourceB\004\342A\001" - + "\001\032n\n\021SchedulerResource\022\021\n\003cpu\030\001 \001(\002B\004\342A\001" + + ".WorkloadsConfig.SchedulerResourceB\004\342A\001\001" + + "\022j\n\nweb_server\030\002 \001(\0132P.google.cloud.orch" + + "estration.airflow.service.v1.WorkloadsCo" + + "nfig.WebServerResourceB\004\342A\001\001\022c\n\006worker\030\003" + + " \001(\0132M.google.cloud.orchestration.airflo" + + "w.service.v1.WorkloadsConfig.WorkerResou" + + "rceB\004\342A\001\001\032n\n\021SchedulerResource\022\021\n\003cpu\030\001 " + + "\001(\002B\004\342A\001\001\022\027\n\tmemory_gb\030\002 \001(\002B\004\342A\001\001\022\030\n\nst" + + "orage_gb\030\003 \001(\002B\004\342A\001\001\022\023\n\005count\030\004 \001(\005B\004\342A\001" + + "\001\032Y\n\021WebServerResource\022\021\n\003cpu\030\001 \001(\002B\004\342A\001" + "\001\022\027\n\tmemory_gb\030\002 \001(\002B\004\342A\001\001\022\030\n\nstorage_gb" - + "\030\003 \001(\002B\004\342A\001\001\022\023\n\005count\030\004 \001(\005B\004\342A\001\001\032Y\n\021Web" - + "ServerResource\022\021\n\003cpu\030\001 \001(\002B\004\342A\001\001\022\027\n\tmem" - + "ory_gb\030\002 \001(\002B\004\342A\001\001\022\030\n\nstorage_gb\030\003 \001(\002B\004" - + "\342A\001\001\032\210\001\n\016WorkerResource\022\021\n\003cpu\030\001 \001(\002B\004\342A" - + "\001\001\022\027\n\tmemory_gb\030\002 \001(\002B\004\342A\001\001\022\030\n\nstorage_g" - + "b\030\003 \001(\002B\004\342A\001\001\022\027\n\tmin_count\030\004 \001(\005B\004\342A\001\001\022\027" - + "\n\tmax_count\030\005 \001(\005B\004\342A\001\001\"\203\001\n\016RecoveryConf" - + "ig\022q\n\032scheduled_snapshots_config\030\001 \001(\0132G" + + "\030\003 \001(\002B\004\342A\001\001\032\210\001\n\016WorkerResource\022\021\n\003cpu\030\001" + + " \001(\002B\004\342A\001\001\022\027\n\tmemory_gb\030\002 \001(\002B\004\342A\001\001\022\030\n\ns" + + "torage_gb\030\003 \001(\002B\004\342A\001\001\022\027\n\tmin_count\030\004 \001(\005" + + "B\004\342A\001\001\022\027\n\tmax_count\030\005 \001(\005B\004\342A\001\001\"\203\001\n\016Reco" + + "veryConfig\022q\n\032scheduled_snapshots_config" + + "\030\001 \001(\0132G.google.cloud.orchestration.airf" + + "low.service.v1.ScheduledSnapshotsConfigB" + + "\004\342A\001\001\"\225\001\n\030ScheduledSnapshotsConfig\022\025\n\007en" + + "abled\030\001 \001(\010B\004\342A\001\001\022\037\n\021snapshot_location\030\006" + + " \001(\tB\004\342A\001\001\022(\n\032snapshot_creation_schedule" + + "\030\003 \001(\tB\004\342A\001\001\022\027\n\ttime_zone\030\005 \001(\tB\004\342A\001\001\"\326\001" + + "\n\036MasterAuthorizedNetworksConfig\022\017\n\007enab" + + "led\030\001 \001(\010\022l\n\013cidr_blocks\030\002 \003(\0132W.google." + + "cloud.orchestration.airflow.service.v1.M" + + "asterAuthorizedNetworksConfig.CidrBlock\032" + + "5\n\tCidrBlock\022\024\n\014display_name\030\001 \001(\t\022\022\n\nci" + + "dr_block\030\002 \001(\t\"\205\005\n\013Environment\022\014\n\004name\030\001" + + " \001(\t\022P\n\006config\030\002 \001(\0132@.google.cloud.orch" + + "estration.airflow.service.v1.Environment" + + "Config\022\014\n\004uuid\030\003 \001(\t\022O\n\005state\030\004 \001(\0162@.go" + + "ogle.cloud.orchestration.airflow.service" + + ".v1.Environment.State\022/\n\013create_time\030\005 \001" + + "(\0132\032.google.protobuf.Timestamp\022/\n\013update" + + "_time\030\006 \001(\0132\032.google.protobuf.Timestamp\022" + + "V\n\006labels\030\007 \003(\0132F.google.cloud.orchestra" + + "tion.airflow.service.v1.Environment.Labe" + + "lsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + + "alue\030\002 \001(\t:\0028\001\"`\n\005State\022\025\n\021STATE_UNSPECI" + + "FIED\020\000\022\014\n\010CREATING\020\001\022\013\n\007RUNNING\020\002\022\014\n\010UPD" + + "ATING\020\003\022\014\n\010DELETING\020\004\022\t\n\005ERROR\020\005:l\352Ai\n#c" + + "omposer.googleapis.com/Environment\022Bproj" + + "ects/{project}/locations/{location}/envi" + + "ronments/{environment}\"\375\003\n\024CheckUpgradeR" + + "esponse\022\033\n\rbuild_log_uri\030\001 \001(\tB\004\342A\001\003\022\200\001\n" + + "\036contains_pypi_modules_conflict\030\004 \001(\0162R." + + "google.cloud.orchestration.airflow.servi" + + "ce.v1.CheckUpgradeResponse.ConflictResul" + + "tB\004\342A\001\003\022-\n\037pypi_conflict_build_log_extra" + + "ct\030\003 \001(\tB\004\342A\001\003\022\025\n\rimage_version\030\005 \001(\t\022t\n" + + "\021pypi_dependencies\030\006 \003(\0132Y.google.cloud." + + "orchestration.airflow.service.v1.CheckUp" + + "gradeResponse.PypiDependenciesEntry\0327\n\025P" + + "ypiDependenciesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" + + "ue\030\002 \001(\t:\0028\001\"P\n\016ConflictResult\022\037\n\033CONFLI" + + "CT_RESULT_UNSPECIFIED\020\000\022\014\n\010CONFLICT\020\001\022\017\n" + + "\013NO_CONFLICT\020\0022\275\033\n\014Environments\022\251\002\n\021Crea" + + "teEnvironment\022G.google.cloud.orchestrati" + + "on.airflow.service.v1.CreateEnvironmentR" + + "equest\032\035.google.longrunning.Operation\"\253\001" + + "\312AN\n\013Environment\022?google.cloud.orchestra" + + "tion.airflow.service.v1.OperationMetadat" + + "a\332A\022parent,environment\202\323\344\223\002?\"0/v1/{paren" + + "t=projects/*/locations/*}/environments:\013" + + "environment\022\323\001\n\016GetEnvironment\022D.google." + + "cloud.orchestration.airflow.service.v1.G" + + "etEnvironmentRequest\032:.google.cloud.orch" + + "estration.airflow.service.v1.Environment" + + "\"?\332A\004name\202\323\344\223\0022\0220/v1/{name=projects/*/lo" + + "cations/*/environments/*}\022\346\001\n\020ListEnviro" + + "nments\022F.google.cloud.orchestration.airf" + + "low.service.v1.ListEnvironmentsRequest\032G" + ".google.cloud.orchestration.airflow.serv" - + "ice.v1.ScheduledSnapshotsConfigB\004\342A\001\001\"\225\001" - + "\n\030ScheduledSnapshotsConfig\022\025\n\007enabled\030\001 " - + "\001(\010B\004\342A\001\001\022\037\n\021snapshot_location\030\006 \001(\tB\004\342A" - + "\001\001\022(\n\032snapshot_creation_schedule\030\003 \001(\tB\004" - + "\342A\001\001\022\027\n\ttime_zone\030\005 \001(\tB\004\342A\001\001\"\326\001\n\036Master" - + "AuthorizedNetworksConfig\022\017\n\007enabled\030\001 \001(" - + "\010\022l\n\013cidr_blocks\030\002 \003(\0132W.google.cloud.or" - + "chestration.airflow.service.v1.MasterAut" - + "horizedNetworksConfig.CidrBlock\0325\n\tCidrB" - + "lock\022\024\n\014display_name\030\001 \001(\t\022\022\n\ncidr_block" - + "\030\002 \001(\t\"\205\005\n\013Environment\022\014\n\004name\030\001 \001(\t\022P\n\006" - + "config\030\002 \001(\0132@.google.cloud.orchestratio" - + "n.airflow.service.v1.EnvironmentConfig\022\014" - + "\n\004uuid\030\003 \001(\t\022O\n\005state\030\004 \001(\0162@.google.clo" - + "ud.orchestration.airflow.service.v1.Envi" - + "ronment.State\022/\n\013create_time\030\005 \001(\0132\032.goo" - + "gle.protobuf.Timestamp\022/\n\013update_time\030\006 " - + "\001(\0132\032.google.protobuf.Timestamp\022V\n\006label" - + "s\030\007 \003(\0132F.google.cloud.orchestration.air" - + "flow.service.v1.Environment.LabelsEntry\032" - + "-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" - + "(\t:\0028\001\"`\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014" - + "\n\010CREATING\020\001\022\013\n\007RUNNING\020\002\022\014\n\010UPDATING\020\003\022" - + "\014\n\010DELETING\020\004\022\t\n\005ERROR\020\005:l\352Ai\n#composer." - + "googleapis.com/Environment\022Bprojects/{pr" - + "oject}/locations/{location}/environments" - + "/{environment}\"\375\003\n\024CheckUpgradeResponse\022" - + "\033\n\rbuild_log_uri\030\001 \001(\tB\004\342A\001\003\022\200\001\n\036contain" - + "s_pypi_modules_conflict\030\004 \001(\0162R.google.c" - + "loud.orchestration.airflow.service.v1.Ch" - + "eckUpgradeResponse.ConflictResultB\004\342A\001\003\022" - + "-\n\037pypi_conflict_build_log_extract\030\003 \001(\t" - + "B\004\342A\001\003\022\025\n\rimage_version\030\005 \001(\t\022t\n\021pypi_de" - + "pendencies\030\006 \003(\0132Y.google.cloud.orchestr" - + "ation.airflow.service.v1.CheckUpgradeRes" - + "ponse.PypiDependenciesEntry\0327\n\025PypiDepen" - + "denciesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t" - + ":\0028\001\"P\n\016ConflictResult\022\037\n\033CONFLICT_RESUL" - + "T_UNSPECIFIED\020\000\022\014\n\010CONFLICT\020\001\022\017\n\013NO_CONF" - + "LICT\020\0022\265\020\n\014Environments\022\251\002\n\021CreateEnviro" - + "nment\022G.google.cloud.orchestration.airfl" - + "ow.service.v1.CreateEnvironmentRequest\032\035" - + ".google.longrunning.Operation\"\253\001\312AN\n\013Env" - + "ironment\022?google.cloud.orchestration.air" - + "flow.service.v1.OperationMetadata\332A\022pare" - + "nt,environment\202\323\344\223\002?\"0/v1/{parent=projec" - + "ts/*/locations/*}/environments:\013environm" - + "ent\022\323\001\n\016GetEnvironment\022D.google.cloud.or" - + "chestration.airflow.service.v1.GetEnviro" - + "nmentRequest\032:.google.cloud.orchestratio" - + "n.airflow.service.v1.Environment\"?\332A\004nam" - + "e\202\323\344\223\0022\0220/v1/{name=projects/*/locations/" - + "*/environments/*}\022\346\001\n\020ListEnvironments\022F" + + "ice.v1.ListEnvironmentsResponse\"A\332A\006pare" + + "nt\202\323\344\223\0022\0220/v1/{parent=projects/*/locatio" + + "ns/*}/environments\022\263\002\n\021UpdateEnvironment" + + "\022G.google.cloud.orchestration.airflow.se" + + "rvice.v1.UpdateEnvironmentRequest\032\035.goog" + + "le.longrunning.Operation\"\265\001\312AN\n\013Environm" + + "ent\022?google.cloud.orchestration.airflow." + + "service.v1.OperationMetadata\332A\034name,envi" + + "ronment,update_mask\202\323\344\223\002?20/v1/{name=pro" + + "jects/*/locations/*/environments/*}:\013env" + + "ironment\022\230\002\n\021DeleteEnvironment\022G.google." + + "cloud.orchestration.airflow.service.v1.D" + + "eleteEnvironmentRequest\032\035.google.longrun" + + "ning.Operation\"\232\001\312AX\n\025google.protobuf.Em" + + "pty\022?google.cloud.orchestration.airflow." + + "service.v1.OperationMetadata\332A\004name\202\323\344\223\002" + + "2*0/v1/{name=projects/*/locations/*/envi" + + "ronments/*}\022\214\002\n\025ExecuteAirflowCommand\022K." + + "google.cloud.orchestration.airflow.servi" + + "ce.v1.ExecuteAirflowCommandRequest\032L.goo" + + "gle.cloud.orchestration.airflow.service." + + "v1.ExecuteAirflowCommandResponse\"X\202\323\344\223\002R" + + "\"M/v1/{environment=projects/*/locations/" + + "*/environments/*}:executeAirflowCommand:" + + "\001*\022\200\002\n\022StopAirflowCommand\022H.google.cloud" + + ".orchestration.airflow.service.v1.StopAi" + + "rflowCommandRequest\032I.google.cloud.orche" + + "stration.airflow.service.v1.StopAirflowC" + + "ommandResponse\"U\202\323\344\223\002O\"J/v1/{environment" + + "=projects/*/locations/*/environments/*}:" + + "stopAirflowCommand:\001*\022\200\002\n\022PollAirflowCom" + + "mand\022H.google.cloud.orchestration.airflo" + + "w.service.v1.PollAirflowCommandRequest\032I" + ".google.cloud.orchestration.airflow.serv" - + "ice.v1.ListEnvironmentsRequest\032G.google." - + "cloud.orchestration.airflow.service.v1.L" - + "istEnvironmentsResponse\"A\332A\006parent\202\323\344\223\0022" - + "\0220/v1/{parent=projects/*/locations/*}/en" - + "vironments\022\263\002\n\021UpdateEnvironment\022G.googl" + + "ice.v1.PollAirflowCommandResponse\"U\202\323\344\223\002" + + "O\"J/v1/{environment=projects/*/locations" + + "/*/environments/*}:pollAirflowCommand:\001*" + + "\022\314\002\n\014SaveSnapshot\022B.google.cloud.orchest" + + "ration.airflow.service.v1.SaveSnapshotRe" + + "quest\032\035.google.longrunning.Operation\"\330\001\312" + + "A\205\001\nBgoogle.cloud.orchestration.airflow." + + "service.v1.SaveSnapshotResponse\022?google." + + "cloud.orchestration.airflow.service.v1.O" + + "perationMetadata\202\323\344\223\002I\"D/v1/{environment" + + "=projects/*/locations/*/environments/*}:" + + "saveSnapshot:\001*\022\314\002\n\014LoadSnapshot\022B.googl" + "e.cloud.orchestration.airflow.service.v1" - + ".UpdateEnvironmentRequest\032\035.google.longr" - + "unning.Operation\"\265\001\312AN\n\013Environment\022?goo" - + "gle.cloud.orchestration.airflow.service." - + "v1.OperationMetadata\332A\034name,environment," - + "update_mask\202\323\344\223\002?20/v1/{name=projects/*/" - + "locations/*/environments/*}:\013environment" - + "\022\230\002\n\021DeleteEnvironment\022G.google.cloud.or" - + "chestration.airflow.service.v1.DeleteEnv" - + "ironmentRequest\032\035.google.longrunning.Ope" - + "ration\"\232\001\312AX\n\025google.protobuf.Empty\022?goo" - + "gle.cloud.orchestration.airflow.service." - + "v1.OperationMetadata\332A\004name\202\323\344\223\0022*0/v1/{" - + "name=projects/*/locations/*/environments" - + "/*}\022\314\002\n\014SaveSnapshot\022B.google.cloud.orch" - + "estration.airflow.service.v1.SaveSnapsho" - + "tRequest\032\035.google.longrunning.Operation\"" - + "\330\001\312A\205\001\nBgoogle.cloud.orchestration.airfl" - + "ow.service.v1.SaveSnapshotResponse\022?goog" - + "le.cloud.orchestration.airflow.service.v" - + "1.OperationMetadata\202\323\344\223\002I\"D/v1/{environm" - + "ent=projects/*/locations/*/environments/" - + "*}:saveSnapshot:\001*\022\314\002\n\014LoadSnapshot\022B.go" - + "ogle.cloud.orchestration.airflow.service" - + ".v1.LoadSnapshotRequest\032\035.google.longrun" - + "ning.Operation\"\330\001\312A\205\001\nBgoogle.cloud.orch" - + "estration.airflow.service.v1.LoadSnapsho" - + "tResponse\022?google.cloud.orchestration.ai" - + "rflow.service.v1.OperationMetadata\202\323\344\223\002I" - + "\"D/v1/{environment=projects/*/locations/" - + "*/environments/*}:loadSnapshot:\001*\032K\312A\027co" - + "mposer.googleapis.com\322A.https://www.goog" - + "leapis.com/auth/cloud-platformB\202\001\n1com.g" - + "oogle.cloud.orchestration.airflow.servic" - + "e.v1P\001ZKcloud.google.com/go/orchestratio" - + "n/airflow/service/apiv1/servicepb;servic" - + "epbb\006proto3" + + ".LoadSnapshotRequest\032\035.google.longrunnin" + + "g.Operation\"\330\001\312A\205\001\nBgoogle.cloud.orchest" + + "ration.airflow.service.v1.LoadSnapshotRe" + + "sponse\022?google.cloud.orchestration.airfl" + + "ow.service.v1.OperationMetadata\202\323\344\223\002I\"D/" + + "v1/{environment=projects/*/locations/*/e" + + "nvironments/*}:loadSnapshot:\001*\022\334\002\n\020Datab" + + "aseFailover\022F.google.cloud.orchestration" + + ".airflow.service.v1.DatabaseFailoverRequ" + + "est\032\035.google.longrunning.Operation\"\340\001\312A\211" + + "\001\nFgoogle.cloud.orchestration.airflow.se" + + "rvice.v1.DatabaseFailoverResponse\022?googl" + + "e.cloud.orchestration.airflow.service.v1" + + ".OperationMetadata\202\323\344\223\002M\"H/v1/{environme" + + "nt=projects/*/locations/*/environments/*" + + "}:databaseFailover:\001*\022\221\002\n\027FetchDatabaseP" + + "roperties\022M.google.cloud.orchestration.a" + + "irflow.service.v1.FetchDatabasePropertie" + + "sRequest\032N.google.cloud.orchestration.ai" + + "rflow.service.v1.FetchDatabaseProperties" + + "Response\"W\202\323\344\223\002Q\022O/v1/{environment=proje" + + "cts/*/locations/*/environments/*}:fetchD" + + "atabaseProperties\032K\312A\027composer.googleapi" + + "s.com\322A.https://www.googleapis.com/auth/" + + "cloud-platformB\202\001\n1com.google.cloud.orch" + + "estration.airflow.service.v1P\001ZKcloud.go" + + "ogle.com/go/orchestration/airflow/servic" + + "e/apiv1/servicepb;servicepbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -506,8 +623,76 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "Environment", "UpdateMask", }); - internal_static_google_cloud_orchestration_airflow_service_v1_SaveSnapshotRequest_descriptor = + internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandRequest_descriptor = getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandRequest_descriptor, + new java.lang.String[] { + "Environment", "Command", "Subcommand", "Parameters", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandResponse_descriptor, + new java.lang.String[] { + "ExecutionId", "Pod", "PodNamespace", "Error", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandRequest_descriptor, + new java.lang.String[] { + "Environment", "ExecutionId", "Pod", "PodNamespace", "Force", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandResponse_descriptor, + new java.lang.String[] { + "IsDone", "Output", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandRequest_descriptor, + new java.lang.String[] { + "Environment", "ExecutionId", "Pod", "PodNamespace", "NextLineNumber", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_descriptor, + new java.lang.String[] { + "Output", "OutputEnd", "ExitInfo", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_Line_descriptor = + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_Line_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_Line_descriptor, + new java.lang.String[] { + "LineNumber", "Content", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_ExitInfo_descriptor = + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_ExitInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_ExitInfo_descriptor, + new java.lang.String[] { + "ExitCode", "Error", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_SaveSnapshotRequest_descriptor = + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_orchestration_airflow_service_v1_SaveSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_SaveSnapshotRequest_descriptor, @@ -515,7 +700,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Environment", "SnapshotLocation", }); internal_static_google_cloud_orchestration_airflow_service_v1_SaveSnapshotResponse_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_orchestration_airflow_service_v1_SaveSnapshotResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_SaveSnapshotResponse_descriptor, @@ -523,7 +708,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SnapshotPath", }); internal_static_google_cloud_orchestration_airflow_service_v1_LoadSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_orchestration_airflow_service_v1_LoadSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_LoadSnapshotRequest_descriptor, @@ -536,13 +721,43 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SkipGcsDataCopying", }); internal_static_google_cloud_orchestration_airflow_service_v1_LoadSnapshotResponse_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_orchestration_airflow_service_v1_LoadSnapshotResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_LoadSnapshotResponse_descriptor, new java.lang.String[] {}); + internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverRequest_descriptor, + new java.lang.String[] { + "Environment", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverResponse_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseFailoverResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesRequest_descriptor, + new java.lang.String[] { + "Environment", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesResponse_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesResponse_descriptor, + new java.lang.String[] { + "PrimaryGceZone", "SecondaryGceZone", "IsFailoverReplicaAvailable", + }); internal_static_google_cloud_orchestration_airflow_service_v1_EnvironmentConfig_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_orchestration_airflow_service_v1_EnvironmentConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_EnvironmentConfig_descriptor, @@ -564,9 +779,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AirflowByoidUri", "MasterAuthorizedNetworksConfig", "RecoveryConfig", + "ResilienceMode", }); internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_descriptor, @@ -584,7 +800,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Value", "Description", }); internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseConfig_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseConfig_descriptor, @@ -592,7 +808,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MachineType", }); internal_static_google_cloud_orchestration_airflow_service_v1_WebServerConfig_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_orchestration_airflow_service_v1_WebServerConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_WebServerConfig_descriptor, @@ -600,7 +816,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MachineType", }); internal_static_google_cloud_orchestration_airflow_service_v1_EncryptionConfig_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_orchestration_airflow_service_v1_EncryptionConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_EncryptionConfig_descriptor, @@ -608,7 +824,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "KmsKeyName", }); internal_static_google_cloud_orchestration_airflow_service_v1_MaintenanceWindow_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_orchestration_airflow_service_v1_MaintenanceWindow_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_MaintenanceWindow_descriptor, @@ -616,7 +832,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "StartTime", "EndTime", "Recurrence", }); internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(26); internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_descriptor, @@ -659,7 +875,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_orchestration_airflow_service_v1_IPAllocationPolicy_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(27); internal_static_google_cloud_orchestration_airflow_service_v1_IPAllocationPolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_IPAllocationPolicy_descriptor, @@ -673,7 +889,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ServicesIpAllocation", }); internal_static_google_cloud_orchestration_airflow_service_v1_NodeConfig_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(28); internal_static_google_cloud_orchestration_airflow_service_v1_NodeConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_NodeConfig_descriptor, @@ -690,7 +906,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EnableIpMasqAgent", }); internal_static_google_cloud_orchestration_airflow_service_v1_PrivateClusterConfig_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(29); internal_static_google_cloud_orchestration_airflow_service_v1_PrivateClusterConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_PrivateClusterConfig_descriptor, @@ -698,7 +914,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EnablePrivateEndpoint", "MasterIpv4CidrBlock", "MasterIpv4ReservedRange", }); internal_static_google_cloud_orchestration_airflow_service_v1_NetworkingConfig_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(30); internal_static_google_cloud_orchestration_airflow_service_v1_NetworkingConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_NetworkingConfig_descriptor, @@ -706,7 +922,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ConnectionType", }); internal_static_google_cloud_orchestration_airflow_service_v1_PrivateEnvironmentConfig_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(31); internal_static_google_cloud_orchestration_airflow_service_v1_PrivateEnvironmentConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_PrivateEnvironmentConfig_descriptor, @@ -723,7 +939,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "NetworkingConfig", }); internal_static_google_cloud_orchestration_airflow_service_v1_WorkloadsConfig_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(32); internal_static_google_cloud_orchestration_airflow_service_v1_WorkloadsConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_WorkloadsConfig_descriptor, @@ -761,7 +977,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Cpu", "MemoryGb", "StorageGb", "MinCount", "MaxCount", }); internal_static_google_cloud_orchestration_airflow_service_v1_RecoveryConfig_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(33); internal_static_google_cloud_orchestration_airflow_service_v1_RecoveryConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_RecoveryConfig_descriptor, @@ -769,7 +985,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ScheduledSnapshotsConfig", }); internal_static_google_cloud_orchestration_airflow_service_v1_ScheduledSnapshotsConfig_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(34); internal_static_google_cloud_orchestration_airflow_service_v1_ScheduledSnapshotsConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_ScheduledSnapshotsConfig_descriptor, @@ -777,7 +993,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Enabled", "SnapshotLocation", "SnapshotCreationSchedule", "TimeZone", }); internal_static_google_cloud_orchestration_airflow_service_v1_MasterAuthorizedNetworksConfig_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(35); internal_static_google_cloud_orchestration_airflow_service_v1_MasterAuthorizedNetworksConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_MasterAuthorizedNetworksConfig_descriptor, @@ -795,7 +1011,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DisplayName", "CidrBlock", }); internal_static_google_cloud_orchestration_airflow_service_v1_Environment_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(36); internal_static_google_cloud_orchestration_airflow_service_v1_Environment_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_Environment_descriptor, @@ -813,7 +1029,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(37); internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_descriptor, @@ -842,6 +1058,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ClientProto.methodSignature); registry.add(com.google.api.ClientProto.oauthScopes); registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); registry.add(com.google.longrunning.OperationsProto.operationInfo); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ExecuteAirflowCommandRequest.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ExecuteAirflowCommandRequest.java new file mode 100644 index 000000000000..a3b884133b80 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ExecuteAirflowCommandRequest.java @@ -0,0 +1,1339 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Execute Airflow Command request.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest} + */ +public final class ExecuteAirflowCommandRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest) + ExecuteAirflowCommandRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecuteAirflowCommandRequest.newBuilder() to construct. + private ExecuteAirflowCommandRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecuteAirflowCommandRequest() { + environment_ = ""; + command_ = ""; + subcommand_ = ""; + parameters_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecuteAirflowCommandRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest.class, + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest.Builder + .class); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object environment_ = ""; + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMMAND_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object command_ = ""; + /** + * + * + *
+   * Airflow command.
+   * 
+ * + * string command = 2; + * + * @return The command. + */ + @java.lang.Override + public java.lang.String getCommand() { + java.lang.Object ref = command_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + command_ = s; + return s; + } + } + /** + * + * + *
+   * Airflow command.
+   * 
+ * + * string command = 2; + * + * @return The bytes for command. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCommandBytes() { + java.lang.Object ref = command_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + command_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBCOMMAND_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object subcommand_ = ""; + /** + * + * + *
+   * Airflow subcommand.
+   * 
+ * + * string subcommand = 3; + * + * @return The subcommand. + */ + @java.lang.Override + public java.lang.String getSubcommand() { + java.lang.Object ref = subcommand_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subcommand_ = s; + return s; + } + } + /** + * + * + *
+   * Airflow subcommand.
+   * 
+ * + * string subcommand = 3; + * + * @return The bytes for subcommand. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubcommandBytes() { + java.lang.Object ref = subcommand_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subcommand_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAMETERS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList parameters_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Parameters for the Airflow command/subcommand as an array of arguments.
+   * It may contain positional arguments like `["my-dag-id"]`, key-value
+   * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+   * or other flags like `["-f"]`.
+   * 
+ * + * repeated string parameters = 4; + * + * @return A list containing the parameters. + */ + public com.google.protobuf.ProtocolStringList getParametersList() { + return parameters_; + } + /** + * + * + *
+   * Parameters for the Airflow command/subcommand as an array of arguments.
+   * It may contain positional arguments like `["my-dag-id"]`, key-value
+   * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+   * or other flags like `["-f"]`.
+   * 
+ * + * repeated string parameters = 4; + * + * @return The count of parameters. + */ + public int getParametersCount() { + return parameters_.size(); + } + /** + * + * + *
+   * Parameters for the Airflow command/subcommand as an array of arguments.
+   * It may contain positional arguments like `["my-dag-id"]`, key-value
+   * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+   * or other flags like `["-f"]`.
+   * 
+ * + * repeated string parameters = 4; + * + * @param index The index of the element to return. + * @return The parameters at the given index. + */ + public java.lang.String getParameters(int index) { + return parameters_.get(index); + } + /** + * + * + *
+   * Parameters for the Airflow command/subcommand as an array of arguments.
+   * It may contain positional arguments like `["my-dag-id"]`, key-value
+   * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+   * or other flags like `["-f"]`.
+   * 
+ * + * repeated string parameters = 4; + * + * @param index The index of the value to return. + * @return The bytes of the parameters at the given index. + */ + public com.google.protobuf.ByteString getParametersBytes(int index) { + return parameters_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, environment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(command_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, command_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subcommand_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, subcommand_); + } + for (int i = 0; i < parameters_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parameters_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, environment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(command_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, command_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subcommand_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, subcommand_); + } + { + int dataSize = 0; + for (int i = 0; i < parameters_.size(); i++) { + dataSize += computeStringSizeNoTag(parameters_.getRaw(i)); + } + size += dataSize; + size += 1 * getParametersList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest other = + (com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest) obj; + + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!getCommand().equals(other.getCommand())) return false; + if (!getSubcommand().equals(other.getSubcommand())) return false; + if (!getParametersList().equals(other.getParametersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + hash = (37 * hash) + COMMAND_FIELD_NUMBER; + hash = (53 * hash) + getCommand().hashCode(); + hash = (37 * hash) + SUBCOMMAND_FIELD_NUMBER; + hash = (53 * hash) + getSubcommand().hashCode(); + if (getParametersCount() > 0) { + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParametersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Execute Airflow Command request.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest) + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest.class, + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + environment_ = ""; + command_ = ""; + subcommand_ = ""; + parameters_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest build() { + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest result = + new com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.environment_ = environment_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.command_ = command_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.subcommand_ = subcommand_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + parameters_.makeImmutable(); + result.parameters_ = parameters_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + .getDefaultInstance()) return this; + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCommand().isEmpty()) { + command_ = other.command_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSubcommand().isEmpty()) { + subcommand_ = other.subcommand_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.parameters_.isEmpty()) { + if (parameters_.isEmpty()) { + parameters_ = other.parameters_; + bitField0_ |= 0x00000008; + } else { + ensureParametersIsMutable(); + parameters_.addAll(other.parameters_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + environment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + command_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + subcommand_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureParametersIsMutable(); + parameters_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + environment_ = getDefaultInstance().getEnvironment(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object command_ = ""; + /** + * + * + *
+     * Airflow command.
+     * 
+ * + * string command = 2; + * + * @return The command. + */ + public java.lang.String getCommand() { + java.lang.Object ref = command_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + command_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Airflow command.
+     * 
+ * + * string command = 2; + * + * @return The bytes for command. + */ + public com.google.protobuf.ByteString getCommandBytes() { + java.lang.Object ref = command_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + command_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Airflow command.
+     * 
+ * + * string command = 2; + * + * @param value The command to set. + * @return This builder for chaining. + */ + public Builder setCommand(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + command_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Airflow command.
+     * 
+ * + * string command = 2; + * + * @return This builder for chaining. + */ + public Builder clearCommand() { + command_ = getDefaultInstance().getCommand(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Airflow command.
+     * 
+ * + * string command = 2; + * + * @param value The bytes for command to set. + * @return This builder for chaining. + */ + public Builder setCommandBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + command_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object subcommand_ = ""; + /** + * + * + *
+     * Airflow subcommand.
+     * 
+ * + * string subcommand = 3; + * + * @return The subcommand. + */ + public java.lang.String getSubcommand() { + java.lang.Object ref = subcommand_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subcommand_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Airflow subcommand.
+     * 
+ * + * string subcommand = 3; + * + * @return The bytes for subcommand. + */ + public com.google.protobuf.ByteString getSubcommandBytes() { + java.lang.Object ref = subcommand_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subcommand_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Airflow subcommand.
+     * 
+ * + * string subcommand = 3; + * + * @param value The subcommand to set. + * @return This builder for chaining. + */ + public Builder setSubcommand(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + subcommand_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Airflow subcommand.
+     * 
+ * + * string subcommand = 3; + * + * @return This builder for chaining. + */ + public Builder clearSubcommand() { + subcommand_ = getDefaultInstance().getSubcommand(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Airflow subcommand.
+     * 
+ * + * string subcommand = 3; + * + * @param value The bytes for subcommand to set. + * @return This builder for chaining. + */ + public Builder setSubcommandBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + subcommand_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList parameters_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureParametersIsMutable() { + if (!parameters_.isModifiable()) { + parameters_ = new com.google.protobuf.LazyStringArrayList(parameters_); + } + bitField0_ |= 0x00000008; + } + /** + * + * + *
+     * Parameters for the Airflow command/subcommand as an array of arguments.
+     * It may contain positional arguments like `["my-dag-id"]`, key-value
+     * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+     * or other flags like `["-f"]`.
+     * 
+ * + * repeated string parameters = 4; + * + * @return A list containing the parameters. + */ + public com.google.protobuf.ProtocolStringList getParametersList() { + parameters_.makeImmutable(); + return parameters_; + } + /** + * + * + *
+     * Parameters for the Airflow command/subcommand as an array of arguments.
+     * It may contain positional arguments like `["my-dag-id"]`, key-value
+     * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+     * or other flags like `["-f"]`.
+     * 
+ * + * repeated string parameters = 4; + * + * @return The count of parameters. + */ + public int getParametersCount() { + return parameters_.size(); + } + /** + * + * + *
+     * Parameters for the Airflow command/subcommand as an array of arguments.
+     * It may contain positional arguments like `["my-dag-id"]`, key-value
+     * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+     * or other flags like `["-f"]`.
+     * 
+ * + * repeated string parameters = 4; + * + * @param index The index of the element to return. + * @return The parameters at the given index. + */ + public java.lang.String getParameters(int index) { + return parameters_.get(index); + } + /** + * + * + *
+     * Parameters for the Airflow command/subcommand as an array of arguments.
+     * It may contain positional arguments like `["my-dag-id"]`, key-value
+     * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+     * or other flags like `["-f"]`.
+     * 
+ * + * repeated string parameters = 4; + * + * @param index The index of the value to return. + * @return The bytes of the parameters at the given index. + */ + public com.google.protobuf.ByteString getParametersBytes(int index) { + return parameters_.getByteString(index); + } + /** + * + * + *
+     * Parameters for the Airflow command/subcommand as an array of arguments.
+     * It may contain positional arguments like `["my-dag-id"]`, key-value
+     * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+     * or other flags like `["-f"]`.
+     * 
+ * + * repeated string parameters = 4; + * + * @param index The index to set the value at. + * @param value The parameters to set. + * @return This builder for chaining. + */ + public Builder setParameters(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters for the Airflow command/subcommand as an array of arguments.
+     * It may contain positional arguments like `["my-dag-id"]`, key-value
+     * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+     * or other flags like `["-f"]`.
+     * 
+ * + * repeated string parameters = 4; + * + * @param value The parameters to add. + * @return This builder for chaining. + */ + public Builder addParameters(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters for the Airflow command/subcommand as an array of arguments.
+     * It may contain positional arguments like `["my-dag-id"]`, key-value
+     * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+     * or other flags like `["-f"]`.
+     * 
+ * + * repeated string parameters = 4; + * + * @param values The parameters to add. + * @return This builder for chaining. + */ + public Builder addAllParameters(java.lang.Iterable values) { + ensureParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parameters_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters for the Airflow command/subcommand as an array of arguments.
+     * It may contain positional arguments like `["my-dag-id"]`, key-value
+     * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+     * or other flags like `["-f"]`.
+     * 
+ * + * repeated string parameters = 4; + * + * @return This builder for chaining. + */ + public Builder clearParameters() { + parameters_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters for the Airflow command/subcommand as an array of arguments.
+     * It may contain positional arguments like `["my-dag-id"]`, key-value
+     * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+     * or other flags like `["-f"]`.
+     * 
+ * + * repeated string parameters = 4; + * + * @param value The bytes of the parameters to add. + * @return This builder for chaining. + */ + public Builder addParametersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureParametersIsMutable(); + parameters_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest) + private static final com.google.cloud.orchestration.airflow.service.v1 + .ExecuteAirflowCommandRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecuteAirflowCommandRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ExecuteAirflowCommandRequestOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ExecuteAirflowCommandRequestOrBuilder.java new file mode 100644 index 000000000000..8de71b5f5d8a --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ExecuteAirflowCommandRequestOrBuilder.java @@ -0,0 +1,165 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface ExecuteAirflowCommandRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); + + /** + * + * + *
+   * Airflow command.
+   * 
+ * + * string command = 2; + * + * @return The command. + */ + java.lang.String getCommand(); + /** + * + * + *
+   * Airflow command.
+   * 
+ * + * string command = 2; + * + * @return The bytes for command. + */ + com.google.protobuf.ByteString getCommandBytes(); + + /** + * + * + *
+   * Airflow subcommand.
+   * 
+ * + * string subcommand = 3; + * + * @return The subcommand. + */ + java.lang.String getSubcommand(); + /** + * + * + *
+   * Airflow subcommand.
+   * 
+ * + * string subcommand = 3; + * + * @return The bytes for subcommand. + */ + com.google.protobuf.ByteString getSubcommandBytes(); + + /** + * + * + *
+   * Parameters for the Airflow command/subcommand as an array of arguments.
+   * It may contain positional arguments like `["my-dag-id"]`, key-value
+   * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+   * or other flags like `["-f"]`.
+   * 
+ * + * repeated string parameters = 4; + * + * @return A list containing the parameters. + */ + java.util.List getParametersList(); + /** + * + * + *
+   * Parameters for the Airflow command/subcommand as an array of arguments.
+   * It may contain positional arguments like `["my-dag-id"]`, key-value
+   * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+   * or other flags like `["-f"]`.
+   * 
+ * + * repeated string parameters = 4; + * + * @return The count of parameters. + */ + int getParametersCount(); + /** + * + * + *
+   * Parameters for the Airflow command/subcommand as an array of arguments.
+   * It may contain positional arguments like `["my-dag-id"]`, key-value
+   * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+   * or other flags like `["-f"]`.
+   * 
+ * + * repeated string parameters = 4; + * + * @param index The index of the element to return. + * @return The parameters at the given index. + */ + java.lang.String getParameters(int index); + /** + * + * + *
+   * Parameters for the Airflow command/subcommand as an array of arguments.
+   * It may contain positional arguments like `["my-dag-id"]`, key-value
+   * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+   * or other flags like `["-f"]`.
+   * 
+ * + * repeated string parameters = 4; + * + * @param index The index of the value to return. + * @return The bytes of the parameters at the given index. + */ + com.google.protobuf.ByteString getParametersBytes(int index); +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ExecuteAirflowCommandResponse.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ExecuteAirflowCommandResponse.java new file mode 100644 index 000000000000..ec0d9a7fd28c --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ExecuteAirflowCommandResponse.java @@ -0,0 +1,1199 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Response to ExecuteAirflowCommandRequest.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse} + */ +public final class ExecuteAirflowCommandResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse) + ExecuteAirflowCommandResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecuteAirflowCommandResponse.newBuilder() to construct. + private ExecuteAirflowCommandResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecuteAirflowCommandResponse() { + executionId_ = ""; + pod_ = ""; + podNamespace_ = ""; + error_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecuteAirflowCommandResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse.class, + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse.Builder + .class); + } + + public static final int EXECUTION_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object executionId_ = ""; + /** + * + * + *
+   * The unique ID of the command execution for polling.
+   * 
+ * + * string execution_id = 1; + * + * @return The executionId. + */ + @java.lang.Override + public java.lang.String getExecutionId() { + java.lang.Object ref = executionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + executionId_ = s; + return s; + } + } + /** + * + * + *
+   * The unique ID of the command execution for polling.
+   * 
+ * + * string execution_id = 1; + * + * @return The bytes for executionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExecutionIdBytes() { + java.lang.Object ref = executionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + executionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POD_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object pod_ = ""; + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 2; + * + * @return The pod. + */ + @java.lang.Override + public java.lang.String getPod() { + java.lang.Object ref = pod_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pod_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 2; + * + * @return The bytes for pod. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPodBytes() { + java.lang.Object ref = pod_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pod_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POD_NAMESPACE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object podNamespace_ = ""; + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 3; + * + * @return The podNamespace. + */ + @java.lang.Override + public java.lang.String getPodNamespace() { + java.lang.Object ref = podNamespace_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + podNamespace_ = s; + return s; + } + } + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 3; + * + * @return The bytes for podNamespace. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPodNamespaceBytes() { + java.lang.Object ref = podNamespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + podNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object error_ = ""; + /** + * + * + *
+   * Error message. Empty if there was no error.
+   * 
+ * + * string error = 4; + * + * @return The error. + */ + @java.lang.Override + public java.lang.String getError() { + java.lang.Object ref = error_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + error_ = s; + return s; + } + } + /** + * + * + *
+   * Error message. Empty if there was no error.
+   * 
+ * + * string error = 4; + * + * @return The bytes for error. + */ + @java.lang.Override + public com.google.protobuf.ByteString getErrorBytes() { + java.lang.Object ref = error_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + error_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, executionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pod_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(podNamespace_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, podNamespace_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(error_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, error_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, executionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pod_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(podNamespace_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, podNamespace_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(error_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, error_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse other = + (com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse) obj; + + if (!getExecutionId().equals(other.getExecutionId())) return false; + if (!getPod().equals(other.getPod())) return false; + if (!getPodNamespace().equals(other.getPodNamespace())) return false; + if (!getError().equals(other.getError())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EXECUTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getExecutionId().hashCode(); + hash = (37 * hash) + POD_FIELD_NUMBER; + hash = (53 * hash) + getPod().hashCode(); + hash = (37 * hash) + POD_NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getPodNamespace().hashCode(); + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response to ExecuteAirflowCommandRequest.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse) + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse.class, + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + executionId_ = ""; + pod_ = ""; + podNamespace_ = ""; + error_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ExecuteAirflowCommandResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse build() { + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse result = + new com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.executionId_ = executionId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pod_ = pod_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.podNamespace_ = podNamespace_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.error_ = error_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + .getDefaultInstance()) return this; + if (!other.getExecutionId().isEmpty()) { + executionId_ = other.executionId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPod().isEmpty()) { + pod_ = other.pod_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPodNamespace().isEmpty()) { + podNamespace_ = other.podNamespace_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getError().isEmpty()) { + error_ = other.error_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + executionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + pod_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + podNamespace_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + error_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object executionId_ = ""; + /** + * + * + *
+     * The unique ID of the command execution for polling.
+     * 
+ * + * string execution_id = 1; + * + * @return The executionId. + */ + public java.lang.String getExecutionId() { + java.lang.Object ref = executionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + executionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The unique ID of the command execution for polling.
+     * 
+ * + * string execution_id = 1; + * + * @return The bytes for executionId. + */ + public com.google.protobuf.ByteString getExecutionIdBytes() { + java.lang.Object ref = executionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + executionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The unique ID of the command execution for polling.
+     * 
+ * + * string execution_id = 1; + * + * @param value The executionId to set. + * @return This builder for chaining. + */ + public Builder setExecutionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + executionId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique ID of the command execution for polling.
+     * 
+ * + * string execution_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearExecutionId() { + executionId_ = getDefaultInstance().getExecutionId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique ID of the command execution for polling.
+     * 
+ * + * string execution_id = 1; + * + * @param value The bytes for executionId to set. + * @return This builder for chaining. + */ + public Builder setExecutionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + executionId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object pod_ = ""; + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 2; + * + * @return The pod. + */ + public java.lang.String getPod() { + java.lang.Object ref = pod_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pod_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 2; + * + * @return The bytes for pod. + */ + public com.google.protobuf.ByteString getPodBytes() { + java.lang.Object ref = pod_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pod_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 2; + * + * @param value The pod to set. + * @return This builder for chaining. + */ + public Builder setPod(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pod_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 2; + * + * @return This builder for chaining. + */ + public Builder clearPod() { + pod_ = getDefaultInstance().getPod(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 2; + * + * @param value The bytes for pod to set. + * @return This builder for chaining. + */ + public Builder setPodBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pod_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object podNamespace_ = ""; + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 3; + * + * @return The podNamespace. + */ + public java.lang.String getPodNamespace() { + java.lang.Object ref = podNamespace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + podNamespace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 3; + * + * @return The bytes for podNamespace. + */ + public com.google.protobuf.ByteString getPodNamespaceBytes() { + java.lang.Object ref = podNamespace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + podNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 3; + * + * @param value The podNamespace to set. + * @return This builder for chaining. + */ + public Builder setPodNamespace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + podNamespace_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 3; + * + * @return This builder for chaining. + */ + public Builder clearPodNamespace() { + podNamespace_ = getDefaultInstance().getPodNamespace(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 3; + * + * @param value The bytes for podNamespace to set. + * @return This builder for chaining. + */ + public Builder setPodNamespaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + podNamespace_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object error_ = ""; + /** + * + * + *
+     * Error message. Empty if there was no error.
+     * 
+ * + * string error = 4; + * + * @return The error. + */ + public java.lang.String getError() { + java.lang.Object ref = error_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + error_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Error message. Empty if there was no error.
+     * 
+ * + * string error = 4; + * + * @return The bytes for error. + */ + public com.google.protobuf.ByteString getErrorBytes() { + java.lang.Object ref = error_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + error_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Error message. Empty if there was no error.
+     * 
+ * + * string error = 4; + * + * @param value The error to set. + * @return This builder for chaining. + */ + public Builder setError(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Error message. Empty if there was no error.
+     * 
+ * + * string error = 4; + * + * @return This builder for chaining. + */ + public Builder clearError() { + error_ = getDefaultInstance().getError(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Error message. Empty if there was no error.
+     * 
+ * + * string error = 4; + * + * @param value The bytes for error to set. + * @return This builder for chaining. + */ + public Builder setErrorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + error_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse) + private static final com.google.cloud.orchestration.airflow.service.v1 + .ExecuteAirflowCommandResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecuteAirflowCommandResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ExecuteAirflowCommandResponseOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ExecuteAirflowCommandResponseOrBuilder.java new file mode 100644 index 000000000000..856bb77fdca2 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ExecuteAirflowCommandResponseOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface ExecuteAirflowCommandResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique ID of the command execution for polling.
+   * 
+ * + * string execution_id = 1; + * + * @return The executionId. + */ + java.lang.String getExecutionId(); + /** + * + * + *
+   * The unique ID of the command execution for polling.
+   * 
+ * + * string execution_id = 1; + * + * @return The bytes for executionId. + */ + com.google.protobuf.ByteString getExecutionIdBytes(); + + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 2; + * + * @return The pod. + */ + java.lang.String getPod(); + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 2; + * + * @return The bytes for pod. + */ + com.google.protobuf.ByteString getPodBytes(); + + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 3; + * + * @return The podNamespace. + */ + java.lang.String getPodNamespace(); + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 3; + * + * @return The bytes for podNamespace. + */ + com.google.protobuf.ByteString getPodNamespaceBytes(); + + /** + * + * + *
+   * Error message. Empty if there was no error.
+   * 
+ * + * string error = 4; + * + * @return The error. + */ + java.lang.String getError(); + /** + * + * + *
+   * Error message. Empty if there was no error.
+   * 
+ * + * string error = 4; + * + * @return The bytes for error. + */ + com.google.protobuf.ByteString getErrorBytes(); +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/FetchDatabasePropertiesRequest.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/FetchDatabasePropertiesRequest.java new file mode 100644 index 000000000000..6977327d0ed2 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/FetchDatabasePropertiesRequest.java @@ -0,0 +1,679 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Request to fetch properties of environment's database.
+ * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest} + */ +public final class FetchDatabasePropertiesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest) + FetchDatabasePropertiesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use FetchDatabasePropertiesRequest.newBuilder() to construct. + private FetchDatabasePropertiesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FetchDatabasePropertiesRequest() { + environment_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FetchDatabasePropertiesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest.class, + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest.Builder + .class); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object environment_ = ""; + /** + * + * + *
+   * Required. The resource name of the environment, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the environment, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, environment_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, environment_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest other = + (com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest) obj; + + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request to fetch properties of environment's database.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest) + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + .class, + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + environment_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + build() { + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest result = + new com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.environment_ = environment_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + .getDefaultInstance()) return this; + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + environment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * Required. The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + environment_ = getDefaultInstance().getEnvironment(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest) + private static final com.google.cloud.orchestration.airflow.service.v1 + .FetchDatabasePropertiesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FetchDatabasePropertiesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/FetchDatabasePropertiesRequestOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/FetchDatabasePropertiesRequestOrBuilder.java new file mode 100644 index 000000000000..9aa6ed22c9da --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/FetchDatabasePropertiesRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface FetchDatabasePropertiesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the environment, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * Required. The resource name of the environment, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/FetchDatabasePropertiesResponse.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/FetchDatabasePropertiesResponse.java new file mode 100644 index 000000000000..5cd9d1499632 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/FetchDatabasePropertiesResponse.java @@ -0,0 +1,948 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Response for FetchDatabasePropertiesRequest.
+ * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse} + */ +public final class FetchDatabasePropertiesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse) + FetchDatabasePropertiesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use FetchDatabasePropertiesResponse.newBuilder() to construct. + private FetchDatabasePropertiesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FetchDatabasePropertiesResponse() { + primaryGceZone_ = ""; + secondaryGceZone_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FetchDatabasePropertiesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse.class, + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + .Builder.class); + } + + public static final int PRIMARY_GCE_ZONE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object primaryGceZone_ = ""; + /** + * + * + *
+   * The Compute Engine zone that the instance is currently serving from.
+   * 
+ * + * string primary_gce_zone = 1; + * + * @return The primaryGceZone. + */ + @java.lang.Override + public java.lang.String getPrimaryGceZone() { + java.lang.Object ref = primaryGceZone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + primaryGceZone_ = s; + return s; + } + } + /** + * + * + *
+   * The Compute Engine zone that the instance is currently serving from.
+   * 
+ * + * string primary_gce_zone = 1; + * + * @return The bytes for primaryGceZone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrimaryGceZoneBytes() { + java.lang.Object ref = primaryGceZone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + primaryGceZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SECONDARY_GCE_ZONE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object secondaryGceZone_ = ""; + /** + * + * + *
+   * The Compute Engine zone that the failover instance is currently serving
+   * from for a regional Cloud SQL instance.
+   * 
+ * + * string secondary_gce_zone = 2; + * + * @return The secondaryGceZone. + */ + @java.lang.Override + public java.lang.String getSecondaryGceZone() { + java.lang.Object ref = secondaryGceZone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secondaryGceZone_ = s; + return s; + } + } + /** + * + * + *
+   * The Compute Engine zone that the failover instance is currently serving
+   * from for a regional Cloud SQL instance.
+   * 
+ * + * string secondary_gce_zone = 2; + * + * @return The bytes for secondaryGceZone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecondaryGceZoneBytes() { + java.lang.Object ref = secondaryGceZone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secondaryGceZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_FAILOVER_REPLICA_AVAILABLE_FIELD_NUMBER = 3; + private boolean isFailoverReplicaAvailable_ = false; + /** + * + * + *
+   * The availability status of the failover replica. A false status indicates
+   * that the failover replica is out of sync. The primary instance can only
+   * fail over to the failover replica when the status is true.
+   * 
+ * + * bool is_failover_replica_available = 3; + * + * @return The isFailoverReplicaAvailable. + */ + @java.lang.Override + public boolean getIsFailoverReplicaAvailable() { + return isFailoverReplicaAvailable_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryGceZone_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, primaryGceZone_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secondaryGceZone_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, secondaryGceZone_); + } + if (isFailoverReplicaAvailable_ != false) { + output.writeBool(3, isFailoverReplicaAvailable_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryGceZone_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, primaryGceZone_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secondaryGceZone_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, secondaryGceZone_); + } + if (isFailoverReplicaAvailable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isFailoverReplicaAvailable_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse other = + (com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse) obj; + + if (!getPrimaryGceZone().equals(other.getPrimaryGceZone())) return false; + if (!getSecondaryGceZone().equals(other.getSecondaryGceZone())) return false; + if (getIsFailoverReplicaAvailable() != other.getIsFailoverReplicaAvailable()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PRIMARY_GCE_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getPrimaryGceZone().hashCode(); + hash = (37 * hash) + SECONDARY_GCE_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getSecondaryGceZone().hashCode(); + hash = (37 * hash) + IS_FAILOVER_REPLICA_AVAILABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsFailoverReplicaAvailable()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for FetchDatabasePropertiesRequest.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse) + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + .class, + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + primaryGceZone_ = ""; + secondaryGceZone_ = ""; + isFailoverReplicaAvailable_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_FetchDatabasePropertiesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + build() { + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse result = + new com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.primaryGceZone_ = primaryGceZone_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.secondaryGceZone_ = secondaryGceZone_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.isFailoverReplicaAvailable_ = isFailoverReplicaAvailable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + .getDefaultInstance()) return this; + if (!other.getPrimaryGceZone().isEmpty()) { + primaryGceZone_ = other.primaryGceZone_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSecondaryGceZone().isEmpty()) { + secondaryGceZone_ = other.secondaryGceZone_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getIsFailoverReplicaAvailable() != false) { + setIsFailoverReplicaAvailable(other.getIsFailoverReplicaAvailable()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + primaryGceZone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + secondaryGceZone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + isFailoverReplicaAvailable_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object primaryGceZone_ = ""; + /** + * + * + *
+     * The Compute Engine zone that the instance is currently serving from.
+     * 
+ * + * string primary_gce_zone = 1; + * + * @return The primaryGceZone. + */ + public java.lang.String getPrimaryGceZone() { + java.lang.Object ref = primaryGceZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + primaryGceZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Compute Engine zone that the instance is currently serving from.
+     * 
+ * + * string primary_gce_zone = 1; + * + * @return The bytes for primaryGceZone. + */ + public com.google.protobuf.ByteString getPrimaryGceZoneBytes() { + java.lang.Object ref = primaryGceZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + primaryGceZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Compute Engine zone that the instance is currently serving from.
+     * 
+ * + * string primary_gce_zone = 1; + * + * @param value The primaryGceZone to set. + * @return This builder for chaining. + */ + public Builder setPrimaryGceZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + primaryGceZone_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The Compute Engine zone that the instance is currently serving from.
+     * 
+ * + * string primary_gce_zone = 1; + * + * @return This builder for chaining. + */ + public Builder clearPrimaryGceZone() { + primaryGceZone_ = getDefaultInstance().getPrimaryGceZone(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The Compute Engine zone that the instance is currently serving from.
+     * 
+ * + * string primary_gce_zone = 1; + * + * @param value The bytes for primaryGceZone to set. + * @return This builder for chaining. + */ + public Builder setPrimaryGceZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + primaryGceZone_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object secondaryGceZone_ = ""; + /** + * + * + *
+     * The Compute Engine zone that the failover instance is currently serving
+     * from for a regional Cloud SQL instance.
+     * 
+ * + * string secondary_gce_zone = 2; + * + * @return The secondaryGceZone. + */ + public java.lang.String getSecondaryGceZone() { + java.lang.Object ref = secondaryGceZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secondaryGceZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Compute Engine zone that the failover instance is currently serving
+     * from for a regional Cloud SQL instance.
+     * 
+ * + * string secondary_gce_zone = 2; + * + * @return The bytes for secondaryGceZone. + */ + public com.google.protobuf.ByteString getSecondaryGceZoneBytes() { + java.lang.Object ref = secondaryGceZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secondaryGceZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Compute Engine zone that the failover instance is currently serving
+     * from for a regional Cloud SQL instance.
+     * 
+ * + * string secondary_gce_zone = 2; + * + * @param value The secondaryGceZone to set. + * @return This builder for chaining. + */ + public Builder setSecondaryGceZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + secondaryGceZone_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The Compute Engine zone that the failover instance is currently serving
+     * from for a regional Cloud SQL instance.
+     * 
+ * + * string secondary_gce_zone = 2; + * + * @return This builder for chaining. + */ + public Builder clearSecondaryGceZone() { + secondaryGceZone_ = getDefaultInstance().getSecondaryGceZone(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The Compute Engine zone that the failover instance is currently serving
+     * from for a regional Cloud SQL instance.
+     * 
+ * + * string secondary_gce_zone = 2; + * + * @param value The bytes for secondaryGceZone to set. + * @return This builder for chaining. + */ + public Builder setSecondaryGceZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + secondaryGceZone_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean isFailoverReplicaAvailable_; + /** + * + * + *
+     * The availability status of the failover replica. A false status indicates
+     * that the failover replica is out of sync. The primary instance can only
+     * fail over to the failover replica when the status is true.
+     * 
+ * + * bool is_failover_replica_available = 3; + * + * @return The isFailoverReplicaAvailable. + */ + @java.lang.Override + public boolean getIsFailoverReplicaAvailable() { + return isFailoverReplicaAvailable_; + } + /** + * + * + *
+     * The availability status of the failover replica. A false status indicates
+     * that the failover replica is out of sync. The primary instance can only
+     * fail over to the failover replica when the status is true.
+     * 
+ * + * bool is_failover_replica_available = 3; + * + * @param value The isFailoverReplicaAvailable to set. + * @return This builder for chaining. + */ + public Builder setIsFailoverReplicaAvailable(boolean value) { + + isFailoverReplicaAvailable_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The availability status of the failover replica. A false status indicates
+     * that the failover replica is out of sync. The primary instance can only
+     * fail over to the failover replica when the status is true.
+     * 
+ * + * bool is_failover_replica_available = 3; + * + * @return This builder for chaining. + */ + public Builder clearIsFailoverReplicaAvailable() { + bitField0_ = (bitField0_ & ~0x00000004); + isFailoverReplicaAvailable_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse) + private static final com.google.cloud.orchestration.airflow.service.v1 + .FetchDatabasePropertiesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FetchDatabasePropertiesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/FetchDatabasePropertiesResponseOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/FetchDatabasePropertiesResponseOrBuilder.java new file mode 100644 index 000000000000..cc20dd6dacdd --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/FetchDatabasePropertiesResponseOrBuilder.java @@ -0,0 +1,92 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface FetchDatabasePropertiesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Compute Engine zone that the instance is currently serving from.
+   * 
+ * + * string primary_gce_zone = 1; + * + * @return The primaryGceZone. + */ + java.lang.String getPrimaryGceZone(); + /** + * + * + *
+   * The Compute Engine zone that the instance is currently serving from.
+   * 
+ * + * string primary_gce_zone = 1; + * + * @return The bytes for primaryGceZone. + */ + com.google.protobuf.ByteString getPrimaryGceZoneBytes(); + + /** + * + * + *
+   * The Compute Engine zone that the failover instance is currently serving
+   * from for a regional Cloud SQL instance.
+   * 
+ * + * string secondary_gce_zone = 2; + * + * @return The secondaryGceZone. + */ + java.lang.String getSecondaryGceZone(); + /** + * + * + *
+   * The Compute Engine zone that the failover instance is currently serving
+   * from for a regional Cloud SQL instance.
+   * 
+ * + * string secondary_gce_zone = 2; + * + * @return The bytes for secondaryGceZone. + */ + com.google.protobuf.ByteString getSecondaryGceZoneBytes(); + + /** + * + * + *
+   * The availability status of the failover replica. A false status indicates
+   * that the failover replica is out of sync. The primary instance can only
+   * fail over to the failover replica when the status is true.
+   * 
+ * + * bool is_failover_replica_available = 3; + * + * @return The isFailoverReplicaAvailable. + */ + boolean getIsFailoverReplicaAvailable(); +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/OperationMetadata.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/OperationMetadata.java index fa4d7f109ee7..8c8cc5c7f619 100644 --- a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/OperationMetadata.java +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/OperationMetadata.java @@ -360,6 +360,17 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * LOAD_SNAPSHOT = 6; */ LOAD_SNAPSHOT(6), + /** + * + * + *
+     * Triggers failover of environment's Cloud SQL instance (only for highly
+     * resilient environments).
+     * 
+ * + * DATABASE_FAILOVER = 7; + */ + DATABASE_FAILOVER(7), UNRECOGNIZED(-1), ; @@ -433,6 +444,17 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * LOAD_SNAPSHOT = 6; */ public static final int LOAD_SNAPSHOT_VALUE = 6; + /** + * + * + *
+     * Triggers failover of environment's Cloud SQL instance (only for highly
+     * resilient environments).
+     * 
+ * + * DATABASE_FAILOVER = 7; + */ + public static final int DATABASE_FAILOVER_VALUE = 7; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -472,6 +494,8 @@ public static Type forNumber(int value) { return SAVE_SNAPSHOT; case 6: return LOAD_SNAPSHOT; + case 7: + return DATABASE_FAILOVER; default: return null; } diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/OperationsProto.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/OperationsProto.java index a7cad5ec5770..98378466b590 100644 --- a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/OperationsProto.java +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/OperationsProto.java @@ -43,7 +43,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n>google/cloud/orchestration/airflow/ser" + "vice/v1/operations.proto\022-google.cloud.o" + "rchestration.airflow.service.v1\032\037google/" - + "protobuf/timestamp.proto\"\255\004\n\021OperationMe" + + "protobuf/timestamp.proto\"\305\004\n\021OperationMe" + "tadata\022U\n\005state\030\001 \001(\0162F.google.cloud.orc" + "hestration.airflow.service.v1.OperationM" + "etadata.State\022]\n\016operation_type\030\002 \001(\0162E." @@ -54,14 +54,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\n\010end_time\030\006 \001(\0132\032.google.protobuf.Times" + "tamp\"g\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007" + "PENDING\020\001\022\013\n\007RUNNING\020\002\022\r\n\tSUCCEEDED\020\003\022\016\n" - + "\nSUCCESSFUL\020\003\022\n\n\006FAILED\020\004\032\002\020\001\"q\n\004Type\022\024\n" - + "\020TYPE_UNSPECIFIED\020\000\022\n\n\006CREATE\020\001\022\n\n\006DELET" - + "E\020\002\022\n\n\006UPDATE\020\003\022\t\n\005CHECK\020\004\022\021\n\rSAVE_SNAPS" - + "HOT\020\005\022\021\n\rLOAD_SNAPSHOT\020\006B\223\001\n1com.google." - + "cloud.orchestration.airflow.service.v1B\017" - + "OperationsProtoP\001ZKcloud.google.com/go/o" - + "rchestration/airflow/service/apiv1/servi" - + "cepb;servicepbb\006proto3" + + "\nSUCCESSFUL\020\003\022\n\n\006FAILED\020\004\032\002\020\001\"\210\001\n\004Type\022\024" + + "\n\020TYPE_UNSPECIFIED\020\000\022\n\n\006CREATE\020\001\022\n\n\006DELE" + + "TE\020\002\022\n\n\006UPDATE\020\003\022\t\n\005CHECK\020\004\022\021\n\rSAVE_SNAP" + + "SHOT\020\005\022\021\n\rLOAD_SNAPSHOT\020\006\022\025\n\021DATABASE_FA" + + "ILOVER\020\007B\223\001\n1com.google.cloud.orchestrat" + + "ion.airflow.service.v1B\017OperationsProtoP" + + "\001ZKcloud.google.com/go/orchestration/air" + + "flow/service/apiv1/servicepb;servicepbb\006" + + "proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PollAirflowCommandRequest.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PollAirflowCommandRequest.java new file mode 100644 index 000000000000..5aeaab4cc161 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PollAirflowCommandRequest.java @@ -0,0 +1,1294 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Poll Airflow Command request.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest} + */ +public final class PollAirflowCommandRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest) + PollAirflowCommandRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use PollAirflowCommandRequest.newBuilder() to construct. + private PollAirflowCommandRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PollAirflowCommandRequest() { + environment_ = ""; + executionId_ = ""; + pod_ = ""; + podNamespace_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PollAirflowCommandRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest.class, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest.Builder + .class); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object environment_ = ""; + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXECUTION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object executionId_ = ""; + /** + * + * + *
+   * The unique ID of the command execution.
+   * 
+ * + * string execution_id = 2; + * + * @return The executionId. + */ + @java.lang.Override + public java.lang.String getExecutionId() { + java.lang.Object ref = executionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + executionId_ = s; + return s; + } + } + /** + * + * + *
+   * The unique ID of the command execution.
+   * 
+ * + * string execution_id = 2; + * + * @return The bytes for executionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExecutionIdBytes() { + java.lang.Object ref = executionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + executionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POD_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pod_ = ""; + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 3; + * + * @return The pod. + */ + @java.lang.Override + public java.lang.String getPod() { + java.lang.Object ref = pod_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pod_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 3; + * + * @return The bytes for pod. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPodBytes() { + java.lang.Object ref = pod_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pod_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POD_NAMESPACE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object podNamespace_ = ""; + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 4; + * + * @return The podNamespace. + */ + @java.lang.Override + public java.lang.String getPodNamespace() { + java.lang.Object ref = podNamespace_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + podNamespace_ = s; + return s; + } + } + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 4; + * + * @return The bytes for podNamespace. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPodNamespaceBytes() { + java.lang.Object ref = podNamespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + podNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NEXT_LINE_NUMBER_FIELD_NUMBER = 5; + private int nextLineNumber_ = 0; + /** + * + * + *
+   * Line number from which new logs should be fetched.
+   * 
+ * + * int32 next_line_number = 5; + * + * @return The nextLineNumber. + */ + @java.lang.Override + public int getNextLineNumber() { + return nextLineNumber_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, environment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, executionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pod_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(podNamespace_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, podNamespace_); + } + if (nextLineNumber_ != 0) { + output.writeInt32(5, nextLineNumber_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, environment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, executionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pod_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(podNamespace_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, podNamespace_); + } + if (nextLineNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, nextLineNumber_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest other = + (com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest) obj; + + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!getExecutionId().equals(other.getExecutionId())) return false; + if (!getPod().equals(other.getPod())) return false; + if (!getPodNamespace().equals(other.getPodNamespace())) return false; + if (getNextLineNumber() != other.getNextLineNumber()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + hash = (37 * hash) + EXECUTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getExecutionId().hashCode(); + hash = (37 * hash) + POD_FIELD_NUMBER; + hash = (53 * hash) + getPod().hashCode(); + hash = (37 * hash) + POD_NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getPodNamespace().hashCode(); + hash = (37 * hash) + NEXT_LINE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getNextLineNumber(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Poll Airflow Command request.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest) + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest.class, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + environment_ = ""; + executionId_ = ""; + pod_ = ""; + podNamespace_ = ""; + nextLineNumber_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest build() { + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest result = + new com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.environment_ = environment_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.executionId_ = executionId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pod_ = pod_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.podNamespace_ = podNamespace_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.nextLineNumber_ = nextLineNumber_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + .getDefaultInstance()) return this; + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getExecutionId().isEmpty()) { + executionId_ = other.executionId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPod().isEmpty()) { + pod_ = other.pod_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getPodNamespace().isEmpty()) { + podNamespace_ = other.podNamespace_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getNextLineNumber() != 0) { + setNextLineNumber(other.getNextLineNumber()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + environment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + executionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + pod_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + podNamespace_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + nextLineNumber_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + environment_ = getDefaultInstance().getEnvironment(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object executionId_ = ""; + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @return The executionId. + */ + public java.lang.String getExecutionId() { + java.lang.Object ref = executionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + executionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @return The bytes for executionId. + */ + public com.google.protobuf.ByteString getExecutionIdBytes() { + java.lang.Object ref = executionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + executionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @param value The executionId to set. + * @return This builder for chaining. + */ + public Builder setExecutionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + executionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearExecutionId() { + executionId_ = getDefaultInstance().getExecutionId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @param value The bytes for executionId to set. + * @return This builder for chaining. + */ + public Builder setExecutionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + executionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object pod_ = ""; + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @return The pod. + */ + public java.lang.String getPod() { + java.lang.Object ref = pod_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pod_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @return The bytes for pod. + */ + public com.google.protobuf.ByteString getPodBytes() { + java.lang.Object ref = pod_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pod_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @param value The pod to set. + * @return This builder for chaining. + */ + public Builder setPod(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pod_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @return This builder for chaining. + */ + public Builder clearPod() { + pod_ = getDefaultInstance().getPod(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @param value The bytes for pod to set. + * @return This builder for chaining. + */ + public Builder setPodBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pod_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object podNamespace_ = ""; + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @return The podNamespace. + */ + public java.lang.String getPodNamespace() { + java.lang.Object ref = podNamespace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + podNamespace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @return The bytes for podNamespace. + */ + public com.google.protobuf.ByteString getPodNamespaceBytes() { + java.lang.Object ref = podNamespace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + podNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @param value The podNamespace to set. + * @return This builder for chaining. + */ + public Builder setPodNamespace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + podNamespace_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @return This builder for chaining. + */ + public Builder clearPodNamespace() { + podNamespace_ = getDefaultInstance().getPodNamespace(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @param value The bytes for podNamespace to set. + * @return This builder for chaining. + */ + public Builder setPodNamespaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + podNamespace_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int nextLineNumber_; + /** + * + * + *
+     * Line number from which new logs should be fetched.
+     * 
+ * + * int32 next_line_number = 5; + * + * @return The nextLineNumber. + */ + @java.lang.Override + public int getNextLineNumber() { + return nextLineNumber_; + } + /** + * + * + *
+     * Line number from which new logs should be fetched.
+     * 
+ * + * int32 next_line_number = 5; + * + * @param value The nextLineNumber to set. + * @return This builder for chaining. + */ + public Builder setNextLineNumber(int value) { + + nextLineNumber_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Line number from which new logs should be fetched.
+     * 
+ * + * int32 next_line_number = 5; + * + * @return This builder for chaining. + */ + public Builder clearNextLineNumber() { + bitField0_ = (bitField0_ & ~0x00000010); + nextLineNumber_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest) + private static final com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PollAirflowCommandRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PollAirflowCommandRequestOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PollAirflowCommandRequestOrBuilder.java new file mode 100644 index 000000000000..acd87ff21a2c --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PollAirflowCommandRequestOrBuilder.java @@ -0,0 +1,140 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface PollAirflowCommandRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); + + /** + * + * + *
+   * The unique ID of the command execution.
+   * 
+ * + * string execution_id = 2; + * + * @return The executionId. + */ + java.lang.String getExecutionId(); + /** + * + * + *
+   * The unique ID of the command execution.
+   * 
+ * + * string execution_id = 2; + * + * @return The bytes for executionId. + */ + com.google.protobuf.ByteString getExecutionIdBytes(); + + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 3; + * + * @return The pod. + */ + java.lang.String getPod(); + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 3; + * + * @return The bytes for pod. + */ + com.google.protobuf.ByteString getPodBytes(); + + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 4; + * + * @return The podNamespace. + */ + java.lang.String getPodNamespace(); + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 4; + * + * @return The bytes for podNamespace. + */ + com.google.protobuf.ByteString getPodNamespaceBytes(); + + /** + * + * + *
+   * Line number from which new logs should be fetched.
+   * 
+ * + * int32 next_line_number = 5; + * + * @return The nextLineNumber. + */ + int getNextLineNumber(); +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PollAirflowCommandResponse.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PollAirflowCommandResponse.java new file mode 100644 index 000000000000..7ffa4ee4ebbf --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PollAirflowCommandResponse.java @@ -0,0 +1,3078 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Response to PollAirflowCommandRequest.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse} + */ +public final class PollAirflowCommandResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse) + PollAirflowCommandResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use PollAirflowCommandResponse.newBuilder() to construct. + private PollAirflowCommandResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PollAirflowCommandResponse() { + output_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PollAirflowCommandResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.class, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Builder + .class); + } + + public interface LineOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Number of the line.
+     * 
+ * + * int32 line_number = 1; + * + * @return The lineNumber. + */ + int getLineNumber(); + + /** + * + * + *
+     * Text content of the log line.
+     * 
+ * + * string content = 2; + * + * @return The content. + */ + java.lang.String getContent(); + /** + * + * + *
+     * Text content of the log line.
+     * 
+ * + * string content = 2; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + } + /** + * + * + *
+   * Contains information about a single line from logs.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line} + */ + public static final class Line extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line) + LineOrBuilder { + private static final long serialVersionUID = 0L; + // Use Line.newBuilder() to construct. + private Line(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Line() { + content_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Line(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_Line_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_Line_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + .class, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + .Builder.class); + } + + public static final int LINE_NUMBER_FIELD_NUMBER = 1; + private int lineNumber_ = 0; + /** + * + * + *
+     * Number of the line.
+     * 
+ * + * int32 line_number = 1; + * + * @return The lineNumber. + */ + @java.lang.Override + public int getLineNumber() { + return lineNumber_; + } + + public static final int CONTENT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + * + * + *
+     * Text content of the log line.
+     * 
+ * + * string content = 2; + * + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } + } + /** + * + * + *
+     * Text content of the log line.
+     * 
+ * + * string content = 2; + * + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (lineNumber_ != 0) { + output.writeInt32(1, lineNumber_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (lineNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, lineNumber_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line other = + (com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line) obj; + + if (getLineNumber() != other.getLineNumber()) return false; + if (!getContent().equals(other.getContent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LINE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getLineNumber(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Contains information about a single line from logs.
+     * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line) + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.LineOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_Line_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_Line_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + .class, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + lineNumber_ = 0; + content_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_Line_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + build() { + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line result = + new com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.lineNumber_ = lineNumber_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = content_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + .getDefaultInstance()) return this; + if (other.getLineNumber() != 0) { + setLineNumber(other.getLineNumber()); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + lineNumber_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int lineNumber_; + /** + * + * + *
+       * Number of the line.
+       * 
+ * + * int32 line_number = 1; + * + * @return The lineNumber. + */ + @java.lang.Override + public int getLineNumber() { + return lineNumber_; + } + /** + * + * + *
+       * Number of the line.
+       * 
+ * + * int32 line_number = 1; + * + * @param value The lineNumber to set. + * @return This builder for chaining. + */ + public Builder setLineNumber(int value) { + + lineNumber_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Number of the line.
+       * 
+ * + * int32 line_number = 1; + * + * @return This builder for chaining. + */ + public Builder clearLineNumber() { + bitField0_ = (bitField0_ & ~0x00000001); + lineNumber_ = 0; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + /** + * + * + *
+       * Text content of the log line.
+       * 
+ * + * string content = 2; + * + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Text content of the log line.
+       * 
+ * + * string content = 2; + * + * @return The bytes for content. + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Text content of the log line.
+       * 
+ * + * string content = 2; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Text content of the log line.
+       * 
+ * + * string content = 2; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Text content of the log line.
+       * 
+ * + * string content = 2; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line) + private static final com.google.cloud.orchestration.airflow.service.v1 + .PollAirflowCommandResponse.Line + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Line parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExitInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The exit code from the command execution.
+     * 
+ * + * int32 exit_code = 1; + * + * @return The exitCode. + */ + int getExitCode(); + + /** + * + * + *
+     * Error message. Empty if there was no error.
+     * 
+ * + * string error = 2; + * + * @return The error. + */ + java.lang.String getError(); + /** + * + * + *
+     * Error message. Empty if there was no error.
+     * 
+ * + * string error = 2; + * + * @return The bytes for error. + */ + com.google.protobuf.ByteString getErrorBytes(); + } + /** + * + * + *
+   * Information about how a command ended.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo} + */ + public static final class ExitInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo) + ExitInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExitInfo.newBuilder() to construct. + private ExitInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExitInfo() { + error_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExitInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_ExitInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_ExitInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + .class, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + .Builder.class); + } + + public static final int EXIT_CODE_FIELD_NUMBER = 1; + private int exitCode_ = 0; + /** + * + * + *
+     * The exit code from the command execution.
+     * 
+ * + * int32 exit_code = 1; + * + * @return The exitCode. + */ + @java.lang.Override + public int getExitCode() { + return exitCode_; + } + + public static final int ERROR_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object error_ = ""; + /** + * + * + *
+     * Error message. Empty if there was no error.
+     * 
+ * + * string error = 2; + * + * @return The error. + */ + @java.lang.Override + public java.lang.String getError() { + java.lang.Object ref = error_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + error_ = s; + return s; + } + } + /** + * + * + *
+     * Error message. Empty if there was no error.
+     * 
+ * + * string error = 2; + * + * @return The bytes for error. + */ + @java.lang.Override + public com.google.protobuf.ByteString getErrorBytes() { + java.lang.Object ref = error_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + error_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (exitCode_ != 0) { + output.writeInt32(1, exitCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(error_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, error_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (exitCode_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, exitCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(error_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, error_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo other = + (com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo) + obj; + + if (getExitCode() != other.getExitCode()) return false; + if (!getError().equals(other.getError())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EXIT_CODE_FIELD_NUMBER; + hash = (53 * hash) + getExitCode(); + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Information about how a command ended.
+     * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo) + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_ExitInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_ExitInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo.class, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + exitCode_ = 0; + error_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_ExitInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + build() { + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + result = + new com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.exitCode_ = exitCode_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.error_ = error_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + .getDefaultInstance()) return this; + if (other.getExitCode() != 0) { + setExitCode(other.getExitCode()); + } + if (!other.getError().isEmpty()) { + error_ = other.error_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + exitCode_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + error_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int exitCode_; + /** + * + * + *
+       * The exit code from the command execution.
+       * 
+ * + * int32 exit_code = 1; + * + * @return The exitCode. + */ + @java.lang.Override + public int getExitCode() { + return exitCode_; + } + /** + * + * + *
+       * The exit code from the command execution.
+       * 
+ * + * int32 exit_code = 1; + * + * @param value The exitCode to set. + * @return This builder for chaining. + */ + public Builder setExitCode(int value) { + + exitCode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The exit code from the command execution.
+       * 
+ * + * int32 exit_code = 1; + * + * @return This builder for chaining. + */ + public Builder clearExitCode() { + bitField0_ = (bitField0_ & ~0x00000001); + exitCode_ = 0; + onChanged(); + return this; + } + + private java.lang.Object error_ = ""; + /** + * + * + *
+       * Error message. Empty if there was no error.
+       * 
+ * + * string error = 2; + * + * @return The error. + */ + public java.lang.String getError() { + java.lang.Object ref = error_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + error_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Error message. Empty if there was no error.
+       * 
+ * + * string error = 2; + * + * @return The bytes for error. + */ + public com.google.protobuf.ByteString getErrorBytes() { + java.lang.Object ref = error_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + error_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Error message. Empty if there was no error.
+       * 
+ * + * string error = 2; + * + * @param value The error to set. + * @return This builder for chaining. + */ + public Builder setError(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Error message. Empty if there was no error.
+       * 
+ * + * string error = 2; + * + * @return This builder for chaining. + */ + public Builder clearError() { + error_ = getDefaultInstance().getError(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Error message. Empty if there was no error.
+       * 
+ * + * string error = 2; + * + * @param value The bytes for error to set. + * @return This builder for chaining. + */ + public Builder setErrorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + error_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo) + private static final com.google.cloud.orchestration.airflow.service.v1 + .PollAirflowCommandResponse.ExitInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExitInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int OUTPUT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line> + output_; + /** + * + * + *
+   * Output from the command execution. It may not contain the full output
+   * and the caller may need to poll for more lines.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line> + getOutputList() { + return output_; + } + /** + * + * + *
+   * Output from the command execution. It may not contain the full output
+   * and the caller may need to poll for more lines.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .LineOrBuilder> + getOutputOrBuilderList() { + return output_; + } + /** + * + * + *
+   * Output from the command execution. It may not contain the full output
+   * and the caller may need to poll for more lines.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + @java.lang.Override + public int getOutputCount() { + return output_.size(); + } + /** + * + * + *
+   * Output from the command execution. It may not contain the full output
+   * and the caller may need to poll for more lines.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + getOutput(int index) { + return output_.get(index); + } + /** + * + * + *
+   * Output from the command execution. It may not contain the full output
+   * and the caller may need to poll for more lines.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.LineOrBuilder + getOutputOrBuilder(int index) { + return output_.get(index); + } + + public static final int OUTPUT_END_FIELD_NUMBER = 2; + private boolean outputEnd_ = false; + /** + * + * + *
+   * Whether the command execution has finished and there is no more output.
+   * 
+ * + * bool output_end = 2; + * + * @return The outputEnd. + */ + @java.lang.Override + public boolean getOutputEnd() { + return outputEnd_; + } + + public static final int EXIT_INFO_FIELD_NUMBER = 3; + private com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + exitInfo_; + /** + * + * + *
+   * The result exit status of the command.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; + * + * + * @return Whether the exitInfo field is set. + */ + @java.lang.Override + public boolean hasExitInfo() { + return exitInfo_ != null; + } + /** + * + * + *
+   * The result exit status of the command.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; + * + * + * @return The exitInfo. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + getExitInfo() { + return exitInfo_ == null + ? com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + .getDefaultInstance() + : exitInfo_; + } + /** + * + * + *
+   * The result exit status of the command.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfoOrBuilder + getExitInfoOrBuilder() { + return exitInfo_ == null + ? com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + .getDefaultInstance() + : exitInfo_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < output_.size(); i++) { + output.writeMessage(1, output_.get(i)); + } + if (outputEnd_ != false) { + output.writeBool(2, outputEnd_); + } + if (exitInfo_ != null) { + output.writeMessage(3, getExitInfo()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < output_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, output_.get(i)); + } + if (outputEnd_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, outputEnd_); + } + if (exitInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getExitInfo()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse other = + (com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse) obj; + + if (!getOutputList().equals(other.getOutputList())) return false; + if (getOutputEnd() != other.getOutputEnd()) return false; + if (hasExitInfo() != other.hasExitInfo()) return false; + if (hasExitInfo()) { + if (!getExitInfo().equals(other.getExitInfo())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getOutputCount() > 0) { + hash = (37 * hash) + OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getOutputList().hashCode(); + } + hash = (37 * hash) + OUTPUT_END_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOutputEnd()); + if (hasExitInfo()) { + hash = (37 * hash) + EXIT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getExitInfo().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response to PollAirflowCommandRequest.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse) + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.class, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (outputBuilder_ == null) { + output_ = java.util.Collections.emptyList(); + } else { + output_ = null; + outputBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + outputEnd_ = false; + exitInfo_ = null; + if (exitInfoBuilder_ != null) { + exitInfoBuilder_.dispose(); + exitInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PollAirflowCommandResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse build() { + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse result = + new com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse result) { + if (outputBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + output_ = java.util.Collections.unmodifiableList(output_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.output_ = output_; + } else { + result.output_ = outputBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.outputEnd_ = outputEnd_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.exitInfo_ = exitInfoBuilder_ == null ? exitInfo_ : exitInfoBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .getDefaultInstance()) return this; + if (outputBuilder_ == null) { + if (!other.output_.isEmpty()) { + if (output_.isEmpty()) { + output_ = other.output_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOutputIsMutable(); + output_.addAll(other.output_); + } + onChanged(); + } + } else { + if (!other.output_.isEmpty()) { + if (outputBuilder_.isEmpty()) { + outputBuilder_.dispose(); + outputBuilder_ = null; + output_ = other.output_; + bitField0_ = (bitField0_ & ~0x00000001); + outputBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOutputFieldBuilder() + : null; + } else { + outputBuilder_.addAllMessages(other.output_); + } + } + } + if (other.getOutputEnd() != false) { + setOutputEnd(other.getOutputEnd()); + } + if (other.hasExitInfo()) { + mergeExitInfo(other.getExitInfo()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + m = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1 + .PollAirflowCommandResponse.Line.parser(), + extensionRegistry); + if (outputBuilder_ == null) { + ensureOutputIsMutable(); + output_.add(m); + } else { + outputBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: + { + outputEnd_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage(getExitInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line> + output_ = java.util.Collections.emptyList(); + + private void ensureOutputIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + output_ = + new java.util.ArrayList< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line>( + output_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + .Builder, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .LineOrBuilder> + outputBuilder_; + + /** + * + * + *
+     * Output from the command execution. It may not contain the full output
+     * and the caller may need to poll for more lines.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + public java.util.List< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line> + getOutputList() { + if (outputBuilder_ == null) { + return java.util.Collections.unmodifiableList(output_); + } else { + return outputBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output from the command execution. It may not contain the full output
+     * and the caller may need to poll for more lines.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + public int getOutputCount() { + if (outputBuilder_ == null) { + return output_.size(); + } else { + return outputBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output from the command execution. It may not contain the full output
+     * and the caller may need to poll for more lines.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + getOutput(int index) { + if (outputBuilder_ == null) { + return output_.get(index); + } else { + return outputBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output from the command execution. It may not contain the full output
+     * and the caller may need to poll for more lines.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + public Builder setOutput( + int index, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line value) { + if (outputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputIsMutable(); + output_.set(index, value); + onChanged(); + } else { + outputBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output from the command execution. It may not contain the full output
+     * and the caller may need to poll for more lines.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + public Builder setOutput( + int index, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.Builder + builderForValue) { + if (outputBuilder_ == null) { + ensureOutputIsMutable(); + output_.set(index, builderForValue.build()); + onChanged(); + } else { + outputBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output from the command execution. It may not contain the full output
+     * and the caller may need to poll for more lines.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + public Builder addOutput( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line value) { + if (outputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputIsMutable(); + output_.add(value); + onChanged(); + } else { + outputBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output from the command execution. It may not contain the full output
+     * and the caller may need to poll for more lines.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + public Builder addOutput( + int index, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line value) { + if (outputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputIsMutable(); + output_.add(index, value); + onChanged(); + } else { + outputBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output from the command execution. It may not contain the full output
+     * and the caller may need to poll for more lines.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + public Builder addOutput( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.Builder + builderForValue) { + if (outputBuilder_ == null) { + ensureOutputIsMutable(); + output_.add(builderForValue.build()); + onChanged(); + } else { + outputBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output from the command execution. It may not contain the full output
+     * and the caller may need to poll for more lines.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + public Builder addOutput( + int index, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.Builder + builderForValue) { + if (outputBuilder_ == null) { + ensureOutputIsMutable(); + output_.add(index, builderForValue.build()); + onChanged(); + } else { + outputBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output from the command execution. It may not contain the full output
+     * and the caller may need to poll for more lines.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + public Builder addAllOutput( + java.lang.Iterable< + ? extends + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .Line> + values) { + if (outputBuilder_ == null) { + ensureOutputIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, output_); + onChanged(); + } else { + outputBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output from the command execution. It may not contain the full output
+     * and the caller may need to poll for more lines.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + public Builder clearOutput() { + if (outputBuilder_ == null) { + output_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + outputBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output from the command execution. It may not contain the full output
+     * and the caller may need to poll for more lines.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + public Builder removeOutput(int index) { + if (outputBuilder_ == null) { + ensureOutputIsMutable(); + output_.remove(index); + onChanged(); + } else { + outputBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output from the command execution. It may not contain the full output
+     * and the caller may need to poll for more lines.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.Builder + getOutputBuilder(int index) { + return getOutputFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output from the command execution. It may not contain the full output
+     * and the caller may need to poll for more lines.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .LineOrBuilder + getOutputOrBuilder(int index) { + if (outputBuilder_ == null) { + return output_.get(index); + } else { + return outputBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output from the command execution. It may not contain the full output
+     * and the caller may need to poll for more lines.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .LineOrBuilder> + getOutputOrBuilderList() { + if (outputBuilder_ != null) { + return outputBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(output_); + } + } + /** + * + * + *
+     * Output from the command execution. It may not contain the full output
+     * and the caller may need to poll for more lines.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.Builder + addOutputBuilder() { + return getOutputFieldBuilder() + .addBuilder( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + .getDefaultInstance()); + } + /** + * + * + *
+     * Output from the command execution. It may not contain the full output
+     * and the caller may need to poll for more lines.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.Builder + addOutputBuilder(int index) { + return getOutputFieldBuilder() + .addBuilder( + index, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + .getDefaultInstance()); + } + /** + * + * + *
+     * Output from the command execution. It may not contain the full output
+     * and the caller may need to poll for more lines.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + public java.util.List< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + .Builder> + getOutputBuilderList() { + return getOutputFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + .Builder, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .LineOrBuilder> + getOutputFieldBuilder() { + if (outputBuilder_ == null) { + outputBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + .Builder, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .LineOrBuilder>( + output_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + output_ = null; + } + return outputBuilder_; + } + + private boolean outputEnd_; + /** + * + * + *
+     * Whether the command execution has finished and there is no more output.
+     * 
+ * + * bool output_end = 2; + * + * @return The outputEnd. + */ + @java.lang.Override + public boolean getOutputEnd() { + return outputEnd_; + } + /** + * + * + *
+     * Whether the command execution has finished and there is no more output.
+     * 
+ * + * bool output_end = 2; + * + * @param value The outputEnd to set. + * @return This builder for chaining. + */ + public Builder setOutputEnd(boolean value) { + + outputEnd_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the command execution has finished and there is no more output.
+     * 
+ * + * bool output_end = 2; + * + * @return This builder for chaining. + */ + public Builder clearOutputEnd() { + bitField0_ = (bitField0_ & ~0x00000002); + outputEnd_ = false; + onChanged(); + return this; + } + + private com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + exitInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + .Builder, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfoOrBuilder> + exitInfoBuilder_; + /** + * + * + *
+     * The result exit status of the command.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; + * + * + * @return Whether the exitInfo field is set. + */ + public boolean hasExitInfo() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The result exit status of the command.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; + * + * + * @return The exitInfo. + */ + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + getExitInfo() { + if (exitInfoBuilder_ == null) { + return exitInfo_ == null + ? com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + .getDefaultInstance() + : exitInfo_; + } else { + return exitInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The result exit status of the command.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; + * + */ + public Builder setExitInfo( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + value) { + if (exitInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + exitInfo_ = value; + } else { + exitInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The result exit status of the command.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; + * + */ + public Builder setExitInfo( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + .Builder + builderForValue) { + if (exitInfoBuilder_ == null) { + exitInfo_ = builderForValue.build(); + } else { + exitInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The result exit status of the command.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; + * + */ + public Builder mergeExitInfo( + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + value) { + if (exitInfoBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && exitInfo_ != null + && exitInfo_ + != com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo.getDefaultInstance()) { + getExitInfoBuilder().mergeFrom(value); + } else { + exitInfo_ = value; + } + } else { + exitInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The result exit status of the command.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; + * + */ + public Builder clearExitInfo() { + bitField0_ = (bitField0_ & ~0x00000004); + exitInfo_ = null; + if (exitInfoBuilder_ != null) { + exitInfoBuilder_.dispose(); + exitInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The result exit status of the command.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + .Builder + getExitInfoBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getExitInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The result exit status of the command.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfoOrBuilder + getExitInfoOrBuilder() { + if (exitInfoBuilder_ != null) { + return exitInfoBuilder_.getMessageOrBuilder(); + } else { + return exitInfo_ == null + ? com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + .getDefaultInstance() + : exitInfo_; + } + } + /** + * + * + *
+     * The result exit status of the command.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + .Builder, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfoOrBuilder> + getExitInfoFieldBuilder() { + if (exitInfoBuilder_ == null) { + exitInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfo.Builder, + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .ExitInfoOrBuilder>(getExitInfo(), getParentForChildren(), isClean()); + exitInfo_ = null; + } + return exitInfoBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse) + private static final com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PollAirflowCommandResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PollAirflowCommandResponseOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PollAirflowCommandResponseOrBuilder.java new file mode 100644 index 000000000000..3cd9be41a264 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PollAirflowCommandResponseOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface PollAirflowCommandResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output from the command execution. It may not contain the full output
+   * and the caller may need to poll for more lines.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + java.util.List + getOutputList(); + /** + * + * + *
+   * Output from the command execution. It may not contain the full output
+   * and the caller may need to poll for more lines.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line getOutput( + int index); + /** + * + * + *
+   * Output from the command execution. It may not contain the full output
+   * and the caller may need to poll for more lines.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + int getOutputCount(); + /** + * + * + *
+   * Output from the command execution. It may not contain the full output
+   * and the caller may need to poll for more lines.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + .LineOrBuilder> + getOutputOrBuilderList(); + /** + * + * + *
+   * Output from the command execution. It may not contain the full output
+   * and the caller may need to poll for more lines.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * + */ + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.LineOrBuilder + getOutputOrBuilder(int index); + + /** + * + * + *
+   * Whether the command execution has finished and there is no more output.
+   * 
+ * + * bool output_end = 2; + * + * @return The outputEnd. + */ + boolean getOutputEnd(); + + /** + * + * + *
+   * The result exit status of the command.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; + * + * + * @return Whether the exitInfo field is set. + */ + boolean hasExitInfo(); + /** + * + * + *
+   * The result exit status of the command.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; + * + * + * @return The exitInfo. + */ + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + getExitInfo(); + /** + * + * + *
+   * The result exit status of the command.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; + * + */ + com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfoOrBuilder + getExitInfoOrBuilder(); +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/StopAirflowCommandRequest.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/StopAirflowCommandRequest.java new file mode 100644 index 000000000000..0436fbe180f7 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/StopAirflowCommandRequest.java @@ -0,0 +1,1298 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Stop Airflow Command request.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest} + */ +public final class StopAirflowCommandRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest) + StopAirflowCommandRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StopAirflowCommandRequest.newBuilder() to construct. + private StopAirflowCommandRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StopAirflowCommandRequest() { + environment_ = ""; + executionId_ = ""; + pod_ = ""; + podNamespace_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StopAirflowCommandRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest.class, + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest.Builder + .class); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object environment_ = ""; + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXECUTION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object executionId_ = ""; + /** + * + * + *
+   * The unique ID of the command execution.
+   * 
+ * + * string execution_id = 2; + * + * @return The executionId. + */ + @java.lang.Override + public java.lang.String getExecutionId() { + java.lang.Object ref = executionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + executionId_ = s; + return s; + } + } + /** + * + * + *
+   * The unique ID of the command execution.
+   * 
+ * + * string execution_id = 2; + * + * @return The bytes for executionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExecutionIdBytes() { + java.lang.Object ref = executionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + executionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POD_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pod_ = ""; + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 3; + * + * @return The pod. + */ + @java.lang.Override + public java.lang.String getPod() { + java.lang.Object ref = pod_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pod_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 3; + * + * @return The bytes for pod. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPodBytes() { + java.lang.Object ref = pod_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pod_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POD_NAMESPACE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object podNamespace_ = ""; + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 4; + * + * @return The podNamespace. + */ + @java.lang.Override + public java.lang.String getPodNamespace() { + java.lang.Object ref = podNamespace_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + podNamespace_ = s; + return s; + } + } + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 4; + * + * @return The bytes for podNamespace. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPodNamespaceBytes() { + java.lang.Object ref = podNamespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + podNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 5; + private boolean force_ = false; + /** + * + * + *
+   * If true, the execution is terminated forcefully (SIGKILL). If false, the
+   * execution is stopped gracefully, giving it time for cleanup.
+   * 
+ * + * bool force = 5; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, environment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, executionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pod_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(podNamespace_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, podNamespace_); + } + if (force_ != false) { + output.writeBool(5, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, environment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, executionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pod_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(podNamespace_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, podNamespace_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, force_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest other = + (com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest) obj; + + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!getExecutionId().equals(other.getExecutionId())) return false; + if (!getPod().equals(other.getPod())) return false; + if (!getPodNamespace().equals(other.getPodNamespace())) return false; + if (getForce() != other.getForce()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + hash = (37 * hash) + EXECUTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getExecutionId().hashCode(); + hash = (37 * hash) + POD_FIELD_NUMBER; + hash = (53 * hash) + getPod().hashCode(); + hash = (37 * hash) + POD_NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getPodNamespace().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Stop Airflow Command request.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest) + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest.class, + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + environment_ = ""; + executionId_ = ""; + pod_ = ""; + podNamespace_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest build() { + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest result = + new com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.environment_ = environment_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.executionId_ = executionId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pod_ = pod_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.podNamespace_ = podNamespace_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + .getDefaultInstance()) return this; + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getExecutionId().isEmpty()) { + executionId_ = other.executionId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPod().isEmpty()) { + pod_ = other.pod_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getPodNamespace().isEmpty()) { + podNamespace_ = other.podNamespace_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + environment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + executionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + pod_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + podNamespace_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + force_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + environment_ = getDefaultInstance().getEnvironment(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object executionId_ = ""; + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @return The executionId. + */ + public java.lang.String getExecutionId() { + java.lang.Object ref = executionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + executionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @return The bytes for executionId. + */ + public com.google.protobuf.ByteString getExecutionIdBytes() { + java.lang.Object ref = executionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + executionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @param value The executionId to set. + * @return This builder for chaining. + */ + public Builder setExecutionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + executionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearExecutionId() { + executionId_ = getDefaultInstance().getExecutionId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @param value The bytes for executionId to set. + * @return This builder for chaining. + */ + public Builder setExecutionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + executionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object pod_ = ""; + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @return The pod. + */ + public java.lang.String getPod() { + java.lang.Object ref = pod_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pod_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @return The bytes for pod. + */ + public com.google.protobuf.ByteString getPodBytes() { + java.lang.Object ref = pod_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pod_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @param value The pod to set. + * @return This builder for chaining. + */ + public Builder setPod(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pod_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @return This builder for chaining. + */ + public Builder clearPod() { + pod_ = getDefaultInstance().getPod(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @param value The bytes for pod to set. + * @return This builder for chaining. + */ + public Builder setPodBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pod_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object podNamespace_ = ""; + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @return The podNamespace. + */ + public java.lang.String getPodNamespace() { + java.lang.Object ref = podNamespace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + podNamespace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @return The bytes for podNamespace. + */ + public com.google.protobuf.ByteString getPodNamespaceBytes() { + java.lang.Object ref = podNamespace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + podNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @param value The podNamespace to set. + * @return This builder for chaining. + */ + public Builder setPodNamespace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + podNamespace_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @return This builder for chaining. + */ + public Builder clearPodNamespace() { + podNamespace_ = getDefaultInstance().getPodNamespace(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @param value The bytes for podNamespace to set. + * @return This builder for chaining. + */ + public Builder setPodNamespaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + podNamespace_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private boolean force_; + /** + * + * + *
+     * If true, the execution is terminated forcefully (SIGKILL). If false, the
+     * execution is stopped gracefully, giving it time for cleanup.
+     * 
+ * + * bool force = 5; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * If true, the execution is terminated forcefully (SIGKILL). If false, the
+     * execution is stopped gracefully, giving it time for cleanup.
+     * 
+ * + * bool force = 5; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, the execution is terminated forcefully (SIGKILL). If false, the
+     * execution is stopped gracefully, giving it time for cleanup.
+     * 
+ * + * bool force = 5; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000010); + force_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest) + private static final com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StopAirflowCommandRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/StopAirflowCommandRequestOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/StopAirflowCommandRequestOrBuilder.java new file mode 100644 index 000000000000..038aa8c23a4f --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/StopAirflowCommandRequestOrBuilder.java @@ -0,0 +1,141 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface StopAirflowCommandRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); + + /** + * + * + *
+   * The unique ID of the command execution.
+   * 
+ * + * string execution_id = 2; + * + * @return The executionId. + */ + java.lang.String getExecutionId(); + /** + * + * + *
+   * The unique ID of the command execution.
+   * 
+ * + * string execution_id = 2; + * + * @return The bytes for executionId. + */ + com.google.protobuf.ByteString getExecutionIdBytes(); + + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 3; + * + * @return The pod. + */ + java.lang.String getPod(); + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 3; + * + * @return The bytes for pod. + */ + com.google.protobuf.ByteString getPodBytes(); + + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 4; + * + * @return The podNamespace. + */ + java.lang.String getPodNamespace(); + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 4; + * + * @return The bytes for podNamespace. + */ + com.google.protobuf.ByteString getPodNamespaceBytes(); + + /** + * + * + *
+   * If true, the execution is terminated forcefully (SIGKILL). If false, the
+   * execution is stopped gracefully, giving it time for cleanup.
+   * 
+ * + * bool force = 5; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/StopAirflowCommandResponse.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/StopAirflowCommandResponse.java new file mode 100644 index 000000000000..3d1e507a09be --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/StopAirflowCommandResponse.java @@ -0,0 +1,836 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Response to StopAirflowCommandRequest.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse} + */ +public final class StopAirflowCommandResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse) + StopAirflowCommandResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StopAirflowCommandResponse.newBuilder() to construct. + private StopAirflowCommandResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StopAirflowCommandResponse() { + output_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StopAirflowCommandResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse.class, + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse.Builder + .class); + } + + public static final int IS_DONE_FIELD_NUMBER = 1; + private boolean isDone_ = false; + /** + * + * + *
+   * Whether the execution is still running.
+   * 
+ * + * bool is_done = 1; + * + * @return The isDone. + */ + @java.lang.Override + public boolean getIsDone() { + return isDone_; + } + + public static final int OUTPUT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList output_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Output message from stopping execution request.
+   * 
+ * + * repeated string output = 2; + * + * @return A list containing the output. + */ + public com.google.protobuf.ProtocolStringList getOutputList() { + return output_; + } + /** + * + * + *
+   * Output message from stopping execution request.
+   * 
+ * + * repeated string output = 2; + * + * @return The count of output. + */ + public int getOutputCount() { + return output_.size(); + } + /** + * + * + *
+   * Output message from stopping execution request.
+   * 
+ * + * repeated string output = 2; + * + * @param index The index of the element to return. + * @return The output at the given index. + */ + public java.lang.String getOutput(int index) { + return output_.get(index); + } + /** + * + * + *
+   * Output message from stopping execution request.
+   * 
+ * + * repeated string output = 2; + * + * @param index The index of the value to return. + * @return The bytes of the output at the given index. + */ + public com.google.protobuf.ByteString getOutputBytes(int index) { + return output_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (isDone_ != false) { + output.writeBool(1, isDone_); + } + for (int i = 0; i < output_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, output_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (isDone_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, isDone_); + } + { + int dataSize = 0; + for (int i = 0; i < output_.size(); i++) { + dataSize += computeStringSizeNoTag(output_.getRaw(i)); + } + size += dataSize; + size += 1 * getOutputList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse other = + (com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse) obj; + + if (getIsDone() != other.getIsDone()) return false; + if (!getOutputList().equals(other.getOutputList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IS_DONE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsDone()); + if (getOutputCount() > 0) { + hash = (37 * hash) + OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getOutputList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response to StopAirflowCommandRequest.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse) + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse.class, + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + isDone_ = false; + output_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_StopAirflowCommandResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse build() { + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse result = + new com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.isDone_ = isDone_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + output_.makeImmutable(); + result.output_ = output_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + .getDefaultInstance()) return this; + if (other.getIsDone() != false) { + setIsDone(other.getIsDone()); + } + if (!other.output_.isEmpty()) { + if (output_.isEmpty()) { + output_ = other.output_; + bitField0_ |= 0x00000002; + } else { + ensureOutputIsMutable(); + output_.addAll(other.output_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + isDone_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureOutputIsMutable(); + output_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean isDone_; + /** + * + * + *
+     * Whether the execution is still running.
+     * 
+ * + * bool is_done = 1; + * + * @return The isDone. + */ + @java.lang.Override + public boolean getIsDone() { + return isDone_; + } + /** + * + * + *
+     * Whether the execution is still running.
+     * 
+ * + * bool is_done = 1; + * + * @param value The isDone to set. + * @return This builder for chaining. + */ + public Builder setIsDone(boolean value) { + + isDone_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the execution is still running.
+     * 
+ * + * bool is_done = 1; + * + * @return This builder for chaining. + */ + public Builder clearIsDone() { + bitField0_ = (bitField0_ & ~0x00000001); + isDone_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList output_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureOutputIsMutable() { + if (!output_.isModifiable()) { + output_ = new com.google.protobuf.LazyStringArrayList(output_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Output message from stopping execution request.
+     * 
+ * + * repeated string output = 2; + * + * @return A list containing the output. + */ + public com.google.protobuf.ProtocolStringList getOutputList() { + output_.makeImmutable(); + return output_; + } + /** + * + * + *
+     * Output message from stopping execution request.
+     * 
+ * + * repeated string output = 2; + * + * @return The count of output. + */ + public int getOutputCount() { + return output_.size(); + } + /** + * + * + *
+     * Output message from stopping execution request.
+     * 
+ * + * repeated string output = 2; + * + * @param index The index of the element to return. + * @return The output at the given index. + */ + public java.lang.String getOutput(int index) { + return output_.get(index); + } + /** + * + * + *
+     * Output message from stopping execution request.
+     * 
+ * + * repeated string output = 2; + * + * @param index The index of the value to return. + * @return The bytes of the output at the given index. + */ + public com.google.protobuf.ByteString getOutputBytes(int index) { + return output_.getByteString(index); + } + /** + * + * + *
+     * Output message from stopping execution request.
+     * 
+ * + * repeated string output = 2; + * + * @param index The index to set the value at. + * @param value The output to set. + * @return This builder for chaining. + */ + public Builder setOutput(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputIsMutable(); + output_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output message from stopping execution request.
+     * 
+ * + * repeated string output = 2; + * + * @param value The output to add. + * @return This builder for chaining. + */ + public Builder addOutput(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputIsMutable(); + output_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output message from stopping execution request.
+     * 
+ * + * repeated string output = 2; + * + * @param values The output to add. + * @return This builder for chaining. + */ + public Builder addAllOutput(java.lang.Iterable values) { + ensureOutputIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, output_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output message from stopping execution request.
+     * 
+ * + * repeated string output = 2; + * + * @return This builder for chaining. + */ + public Builder clearOutput() { + output_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Output message from stopping execution request.
+     * 
+ * + * repeated string output = 2; + * + * @param value The bytes of the output to add. + * @return This builder for chaining. + */ + public Builder addOutputBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureOutputIsMutable(); + output_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse) + private static final com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StopAirflowCommandResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/StopAirflowCommandResponseOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/StopAirflowCommandResponseOrBuilder.java new file mode 100644 index 000000000000..be64cc2d9a35 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/StopAirflowCommandResponseOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface StopAirflowCommandResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Whether the execution is still running.
+   * 
+ * + * bool is_done = 1; + * + * @return The isDone. + */ + boolean getIsDone(); + + /** + * + * + *
+   * Output message from stopping execution request.
+   * 
+ * + * repeated string output = 2; + * + * @return A list containing the output. + */ + java.util.List getOutputList(); + /** + * + * + *
+   * Output message from stopping execution request.
+   * 
+ * + * repeated string output = 2; + * + * @return The count of output. + */ + int getOutputCount(); + /** + * + * + *
+   * Output message from stopping execution request.
+   * 
+ * + * repeated string output = 2; + * + * @param index The index of the element to return. + * @return The output at the given index. + */ + java.lang.String getOutput(int index); + /** + * + * + *
+   * Output message from stopping execution request.
+   * 
+ * + * repeated string output = 2; + * + * @param index The index of the value to return. + * @return The bytes of the output at the given index. + */ + com.google.protobuf.ByteString getOutputBytes(int index); +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/proto/google/cloud/orchestration/airflow/service/v1/environments.proto b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/proto/google/cloud/orchestration/airflow/service/v1/environments.proto index 22d7af747115..e83af80a94ac 100644 --- a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/proto/google/cloud/orchestration/airflow/service/v1/environments.proto +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/proto/google/cloud/orchestration/airflow/service/v1/environments.proto @@ -94,6 +94,33 @@ service Environments { }; } + // Executes Airflow CLI command. + rpc ExecuteAirflowCommand(ExecuteAirflowCommandRequest) + returns (ExecuteAirflowCommandResponse) { + option (google.api.http) = { + post: "/v1/{environment=projects/*/locations/*/environments/*}:executeAirflowCommand" + body: "*" + }; + } + + // Stops Airflow CLI command execution. + rpc StopAirflowCommand(StopAirflowCommandRequest) + returns (StopAirflowCommandResponse) { + option (google.api.http) = { + post: "/v1/{environment=projects/*/locations/*/environments/*}:stopAirflowCommand" + body: "*" + }; + } + + // Polls Airflow CLI command execution and fetches logs. + rpc PollAirflowCommand(PollAirflowCommandRequest) + returns (PollAirflowCommandResponse) { + option (google.api.http) = { + post: "/v1/{environment=projects/*/locations/*/environments/*}:pollAirflowCommand" + body: "*" + }; + } + // Creates a snapshots of a Cloud Composer environment. // // As a result of this operation, snapshot of environment's state is stored @@ -123,6 +150,27 @@ service Environments { metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" }; } + + // Triggers database failover (only for highly resilient environments). + rpc DatabaseFailover(DatabaseFailoverRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{environment=projects/*/locations/*/environments/*}:databaseFailover" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse" + metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }; + } + + // Fetches database properties. + rpc FetchDatabaseProperties(FetchDatabasePropertiesRequest) + returns (FetchDatabasePropertiesResponse) { + option (google.api.http) = { + get: "/v1/{environment=projects/*/locations/*/environments/*}:fetchDatabaseProperties" + }; + } } // Create a new environment. @@ -307,6 +355,119 @@ message UpdateEnvironmentRequest { google.protobuf.FieldMask update_mask = 3; } +// Execute Airflow Command request. +message ExecuteAirflowCommandRequest { + // The resource name of the environment in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + string environment = 1; + + // Airflow command. + string command = 2; + + // Airflow subcommand. + string subcommand = 3; + + // Parameters for the Airflow command/subcommand as an array of arguments. + // It may contain positional arguments like `["my-dag-id"]`, key-value + // parameters like `["--foo=bar"]` or `["--foo","bar"]`, + // or other flags like `["-f"]`. + repeated string parameters = 4; +} + +// Response to ExecuteAirflowCommandRequest. +message ExecuteAirflowCommandResponse { + // The unique ID of the command execution for polling. + string execution_id = 1; + + // The name of the pod where the command is executed. + string pod = 2; + + // The namespace of the pod where the command is executed. + string pod_namespace = 3; + + // Error message. Empty if there was no error. + string error = 4; +} + +// Stop Airflow Command request. +message StopAirflowCommandRequest { + // The resource name of the environment in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + string environment = 1; + + // The unique ID of the command execution. + string execution_id = 2; + + // The name of the pod where the command is executed. + string pod = 3; + + // The namespace of the pod where the command is executed. + string pod_namespace = 4; + + // If true, the execution is terminated forcefully (SIGKILL). If false, the + // execution is stopped gracefully, giving it time for cleanup. + bool force = 5; +} + +// Response to StopAirflowCommandRequest. +message StopAirflowCommandResponse { + // Whether the execution is still running. + bool is_done = 1; + + // Output message from stopping execution request. + repeated string output = 2; +} + +// Poll Airflow Command request. +message PollAirflowCommandRequest { + // The resource name of the environment in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1; + + // The unique ID of the command execution. + string execution_id = 2; + + // The name of the pod where the command is executed. + string pod = 3; + + // The namespace of the pod where the command is executed. + string pod_namespace = 4; + + // Line number from which new logs should be fetched. + int32 next_line_number = 5; +} + +// Response to PollAirflowCommandRequest. +message PollAirflowCommandResponse { + // Contains information about a single line from logs. + message Line { + // Number of the line. + int32 line_number = 1; + + // Text content of the log line. + string content = 2; + } + + // Information about how a command ended. + message ExitInfo { + // The exit code from the command execution. + int32 exit_code = 1; + + // Error message. Empty if there was no error. + string error = 2; + } + + // Output from the command execution. It may not contain the full output + // and the caller may need to poll for more lines. + repeated Line output = 1; + + // Whether the command execution has finished and there is no more output. + bool output_end = 2; + + // The result exit status of the command. + ExitInfo exit_info = 3; +} + // Request to create a snapshot of a Cloud Composer environment. message SaveSnapshotRequest { // The resource name of the source environment in the form: @@ -357,6 +518,44 @@ message LoadSnapshotRequest { // Response to LoadSnapshotRequest. message LoadSnapshotResponse {} +// Request to trigger database failover (only for highly resilient +// environments). +message DatabaseFailoverRequest { + // Target environment: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1; +} + +// Response for DatabaseFailoverRequest. +message DatabaseFailoverResponse {} + +// Request to fetch properties of environment's database. +message FetchDatabasePropertiesRequest { + // Required. The resource name of the environment, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/Environment" + } + ]; +} + +// Response for FetchDatabasePropertiesRequest. +message FetchDatabasePropertiesResponse { + // The Compute Engine zone that the instance is currently serving from. + string primary_gce_zone = 1; + + // The Compute Engine zone that the failover instance is currently serving + // from for a regional Cloud SQL instance. + string secondary_gce_zone = 2; + + // The availability status of the failover replica. A false status indicates + // that the failover replica is out of sync. The primary instance can only + // fail over to the failover replica when the status is true. + bool is_failover_replica_available = 3; +} + // Configuration information for an environment. message EnvironmentConfig { // The size of the Cloud Composer environment. @@ -374,6 +573,15 @@ message EnvironmentConfig { ENVIRONMENT_SIZE_LARGE = 3; } + // Resilience mode of the Cloud Composer Environment. + enum ResilienceMode { + // Default mode doesn't change environment parameters. + RESILIENCE_MODE_UNSPECIFIED = 0; + + // Enabled High Resilience mode, including Cloud SQL HA. + HIGH_RESILIENCE = 1; + } + // Output only. The Kubernetes Engine cluster used to run this environment. string gke_cluster = 1; @@ -478,6 +686,12 @@ message EnvironmentConfig { // This field is supported for Cloud Composer environments in versions // composer-2.*.*-airflow-*.*.* and newer. RecoveryConfig recovery_config = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resilience mode of the Cloud Composer Environment. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.2.0-airflow-*.*.* and newer. + ResilienceMode resilience_mode = 19 [(google.api.field_behavior) = OPTIONAL]; } // Network-level access control policy for the Airflow web server. diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/proto/google/cloud/orchestration/airflow/service/v1/operations.proto b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/proto/google/cloud/orchestration/airflow/service/v1/operations.proto index d82fba818e3f..71672aa3c8e6 100644 --- a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/proto/google/cloud/orchestration/airflow/service/v1/operations.proto +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1/src/main/proto/google/cloud/orchestration/airflow/service/v1/operations.proto @@ -69,6 +69,10 @@ message OperationMetadata { // Loads snapshot of the resource operation. LOAD_SNAPSHOT = 6; + + // Triggers failover of environment's Cloud SQL instance (only for highly + // resilient environments). + DATABASE_FAILOVER = 7; } // Output only. The current operation state. diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/pom.xml b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/pom.xml index 80b47d208d56..673caeb504aa 100644 --- a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/pom.xml +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/pom.xml @@ -21,5 +21,9 @@ com.google.api.grpc proto-google-common-protos + + com.google.api + api-common + diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseFailoverRequest.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseFailoverRequest.java new file mode 100644 index 000000000000..0814c3030e96 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseFailoverRequest.java @@ -0,0 +1,661 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Request to trigger database failover (only for highly resilient
+ * environments).
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest} + */ +public final class DatabaseFailoverRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest) + DatabaseFailoverRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DatabaseFailoverRequest.newBuilder() to construct. + private DatabaseFailoverRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DatabaseFailoverRequest() { + environment_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DatabaseFailoverRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest.Builder + .class); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object environment_ = ""; + /** + * + * + *
+   * Target environment:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * Target environment:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, environment_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, environment_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest other = + (com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest) obj; + + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request to trigger database failover (only for highly resilient
+   * environments).
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest) + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + environment_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest build() { + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest result = + new com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.environment_ = environment_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + .getDefaultInstance()) return this; + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + environment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * Target environment:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Target environment:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Target environment:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Target environment:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + environment_ = getDefaultInstance().getEnvironment(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Target environment:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest) + private static final com.google.cloud.orchestration.airflow.service.v1beta1 + .DatabaseFailoverRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatabaseFailoverRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseFailoverRequestOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseFailoverRequestOrBuilder.java new file mode 100644 index 000000000000..e585a3db429a --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseFailoverRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface DatabaseFailoverRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Target environment:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * Target environment:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseFailoverResponse.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseFailoverResponse.java new file mode 100644 index 000000000000..4b2b4eaa3889 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseFailoverResponse.java @@ -0,0 +1,459 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Response for DatabaseFailoverRequest.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse} + */ +public final class DatabaseFailoverResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse) + DatabaseFailoverResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use DatabaseFailoverResponse.newBuilder() to construct. + private DatabaseFailoverResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DatabaseFailoverResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DatabaseFailoverResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse.class, + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse.Builder + .class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse other = + (com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for DatabaseFailoverRequest.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse) + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse.class, + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse build() { + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse result = + new com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse) + private static final com.google.cloud.orchestration.airflow.service.v1beta1 + .DatabaseFailoverResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatabaseFailoverResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseFailoverResponseOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseFailoverResponseOrBuilder.java new file mode 100644 index 000000000000..9e9fbca08583 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseFailoverResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface DatabaseFailoverResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentConfig.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentConfig.java index ee90dffb42cb..10ccf820f963 100644 --- a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentConfig.java +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentConfig.java @@ -43,6 +43,7 @@ private EnvironmentConfig() { airflowUri_ = ""; airflowByoidUri_ = ""; environmentSize_ = 0; + resilienceMode_ = 0; } @java.lang.Override @@ -251,6 +252,145 @@ private EnvironmentSize(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize) } + /** + * + * + *
+   * Resilience mode of the Cloud Composer Environment.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode} + */ + public enum ResilienceMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default mode doesn't change environment parameters.
+     * 
+ * + * RESILIENCE_MODE_UNSPECIFIED = 0; + */ + RESILIENCE_MODE_UNSPECIFIED(0), + /** + * + * + *
+     * Enabled High Resilience mode, including Cloud SQL HA.
+     * 
+ * + * HIGH_RESILIENCE = 1; + */ + HIGH_RESILIENCE(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default mode doesn't change environment parameters.
+     * 
+ * + * RESILIENCE_MODE_UNSPECIFIED = 0; + */ + public static final int RESILIENCE_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Enabled High Resilience mode, including Cloud SQL HA.
+     * 
+ * + * HIGH_RESILIENCE = 1; + */ + public static final int HIGH_RESILIENCE_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResilienceMode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ResilienceMode forNumber(int value) { + switch (value) { + case 0: + return RESILIENCE_MODE_UNSPECIFIED; + case 1: + return HIGH_RESILIENCE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ResilienceMode findValueByNumber(int number) { + return ResilienceMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + .getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final ResilienceMode[] VALUES = values(); + + public static ResilienceMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ResilienceMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode) + } + public static final int GKE_CLUSTER_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -1292,6 +1432,56 @@ public com.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig get : recoveryConfig_; } + public static final int RESILIENCE_MODE_FIELD_NUMBER = 20; + private int resilienceMode_ = 0; + /** + * + * + *
+   * Optional. Resilience mode of the Cloud Composer Environment.
+   *
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.2.0-airflow-*.*.* and newer.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode resilience_mode = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for resilienceMode. + */ + @java.lang.Override + public int getResilienceModeValue() { + return resilienceMode_; + } + /** + * + * + *
+   * Optional. Resilience mode of the Cloud Composer Environment.
+   *
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.2.0-airflow-*.*.* and newer.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode resilience_mode = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resilienceMode. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode + getResilienceMode() { + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode result = + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode + .forNumber(resilienceMode_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode + .UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1357,6 +1547,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (recoveryConfig_ != null) { output.writeMessage(18, getRecoveryConfig()); } + if (resilienceMode_ + != com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode + .RESILIENCE_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(20, resilienceMode_); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(airflowByoidUri_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 21, airflowByoidUri_); } @@ -1426,6 +1622,12 @@ public int getSerializedSize() { if (recoveryConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getRecoveryConfig()); } + if (resilienceMode_ + != com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode + .RESILIENCE_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(20, resilienceMode_); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(airflowByoidUri_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, airflowByoidUri_); } @@ -1500,6 +1702,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRecoveryConfig()) { if (!getRecoveryConfig().equals(other.getRecoveryConfig())) return false; } + if (resilienceMode_ != other.resilienceMode_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1567,6 +1770,8 @@ public int hashCode() { hash = (37 * hash) + RECOVERY_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getRecoveryConfig().hashCode(); } + hash = (37 * hash) + RESILIENCE_MODE_FIELD_NUMBER; + hash = (53 * hash) + resilienceMode_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1771,6 +1976,7 @@ public Builder clear() { recoveryConfigBuilder_.dispose(); recoveryConfigBuilder_ = null; } + resilienceMode_ = 0; return this; } @@ -1880,6 +2086,9 @@ private void buildPartial0( result.recoveryConfig_ = recoveryConfigBuilder_ == null ? recoveryConfig_ : recoveryConfigBuilder_.build(); } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.resilienceMode_ = resilienceMode_; + } } @java.lang.Override @@ -1991,6 +2200,9 @@ public Builder mergeFrom( if (other.hasRecoveryConfig()) { mergeRecoveryConfig(other.getRecoveryConfig()); } + if (other.resilienceMode_ != 0) { + setResilienceModeValue(other.getResilienceModeValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2119,6 +2331,12 @@ public Builder mergeFrom( bitField0_ |= 0x00010000; break; } // case 146 + case 160: + { + resilienceMode_ = input.readEnum(); + bitField0_ |= 0x00020000; + break; + } // case 160 case 170: { airflowByoidUri_ = input.readStringRequireUtf8(); @@ -5436,6 +5654,129 @@ public Builder clearRecoveryConfig() { return recoveryConfigBuilder_; } + private int resilienceMode_ = 0; + /** + * + * + *
+     * Optional. Resilience mode of the Cloud Composer Environment.
+     *
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.2.0-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode resilience_mode = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for resilienceMode. + */ + @java.lang.Override + public int getResilienceModeValue() { + return resilienceMode_; + } + /** + * + * + *
+     * Optional. Resilience mode of the Cloud Composer Environment.
+     *
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.2.0-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode resilience_mode = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for resilienceMode to set. + * @return This builder for chaining. + */ + public Builder setResilienceModeValue(int value) { + resilienceMode_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Resilience mode of the Cloud Composer Environment.
+     *
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.2.0-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode resilience_mode = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resilienceMode. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode + getResilienceMode() { + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode + result = + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + .ResilienceMode.forNumber(resilienceMode_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Resilience mode of the Cloud Composer Environment.
+     *
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.2.0-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode resilience_mode = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The resilienceMode to set. + * @return This builder for chaining. + */ + public Builder setResilienceMode( + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00020000; + resilienceMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Resilience mode of the Cloud Composer Environment.
+     *
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.2.0-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode resilience_mode = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearResilienceMode() { + bitField0_ = (bitField0_ & ~0x00020000); + resilienceMode_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentConfigOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentConfigOrBuilder.java index dca6cdc0d1f0..dbe872358c57 100644 --- a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentConfigOrBuilder.java +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentConfigOrBuilder.java @@ -750,4 +750,40 @@ public interface EnvironmentConfigOrBuilder */ com.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfigOrBuilder getRecoveryConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Resilience mode of the Cloud Composer Environment.
+   *
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.2.0-airflow-*.*.* and newer.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode resilience_mode = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for resilienceMode. + */ + int getResilienceModeValue(); + /** + * + * + *
+   * Optional. Resilience mode of the Cloud Composer Environment.
+   *
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.2.0-airflow-*.*.* and newer.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode resilience_mode = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resilienceMode. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode + getResilienceMode(); } diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentName.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentName.java new file mode 100644 index 000000000000..27499354ef9f --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class EnvironmentName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ENVIRONMENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/environments/{environment}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String environment; + + @Deprecated + protected EnvironmentName() { + project = null; + location = null; + environment = null; + } + + private EnvironmentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + environment = Preconditions.checkNotNull(builder.getEnvironment()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEnvironment() { + return environment; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static EnvironmentName of(String project, String location, String environment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setEnvironment(environment) + .build(); + } + + public static String format(String project, String location, String environment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setEnvironment(environment) + .build() + .toString(); + } + + public static EnvironmentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ENVIRONMENT.validatedMatch( + formattedString, "EnvironmentName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("environment")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (EnvironmentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ENVIRONMENT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (environment != null) { + fieldMapBuilder.put("environment", environment); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ENVIRONMENT.instantiate( + "project", project, "location", location, "environment", environment); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + EnvironmentName that = ((EnvironmentName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.environment, that.environment); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(environment); + return h; + } + + /** Builder for projects/{project}/locations/{location}/environments/{environment}. */ + public static class Builder { + private String project; + private String location; + private String environment; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEnvironment() { + return environment; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setEnvironment(String environment) { + this.environment = environment; + return this; + } + + private Builder(EnvironmentName environmentName) { + this.project = environmentName.project; + this.location = environmentName.location; + this.environment = environmentName.environment; + } + + public EnvironmentName build() { + return new EnvironmentName(this); + } + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsOuterClass.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsOuterClass.java index 0a4e8b5031f3..dfde3ea192ca 100644 --- a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsOuterClass.java +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsOuterClass.java @@ -55,10 +55,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_orchestration_airflow_service_v1beta1_RestartWebServerRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_orchestration_airflow_service_v1beta1_RestartWebServerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ExecuteAirflowCommandRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ExecuteAirflowCommandRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_orchestration_airflow_service_v1beta1_ExecuteAirflowCommandResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_orchestration_airflow_service_v1beta1_ExecuteAirflowCommandResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_PollAirflowCommandRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_PollAirflowCommandRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_orchestration_airflow_service_v1beta1_PollAirflowCommandResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -87,6 +103,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_orchestration_airflow_service_v1beta1_LoadSnapshotResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_orchestration_airflow_service_v1beta1_LoadSnapshotResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_orchestration_airflow_service_v1beta1_EnvironmentConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -247,284 +279,344 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "stration.airflow.service.v1beta1.Environ" + "ment\0225\n\013update_mask\030\003 \001(\0132\032.google.proto" + "buf.FieldMaskB\004\342A\001\002\"\'\n\027RestartWebServerR" - + "equest\022\014\n\004name\030\001 \001(\t\"h\n\035ExecuteAirflowCo" - + "mmandResponse\022\024\n\014execution_id\030\001 \001(\t\022\013\n\003p" - + "od\030\002 \001(\t\022\025\n\rpod_namespace\030\003 \001(\t\022\r\n\005error" - + "\030\004 \001(\t\"\335\002\n\032PollAirflowCommandResponse\022c\n" - + "\006output\030\001 \003(\0132S.google.cloud.orchestrati" - + "on.airflow.service.v1beta1.PollAirflowCo" - + "mmandResponse.Line\022\022\n\noutput_end\030\002 \001(\010\022j" - + "\n\texit_info\030\003 \001(\0132W.google.cloud.orchest" - + "ration.airflow.service.v1beta1.PollAirfl" - + "owCommandResponse.ExitInfo\032,\n\004Line\022\023\n\013li" - + "ne_number\030\001 \001(\005\022\017\n\007content\030\002 \001(\t\032,\n\010Exit" - + "Info\022\021\n\texit_code\030\001 \001(\005\022\r\n\005error\030\002 \001(\t\"E" - + "\n\023SaveSnapshotRequest\022\023\n\013environment\030\001 \001" - + "(\t\022\031\n\021snapshot_location\030\002 \001(\t\"-\n\024SaveSna" - + "pshotResponse\022\025\n\rsnapshot_path\030\001 \001(\t\"\335\001\n" - + "\023LoadSnapshotRequest\022\023\n\013environment\030\001 \001(" - + "\t\022\025\n\rsnapshot_path\030\002 \001(\t\022\'\n\037skip_pypi_pa" - + "ckages_installation\030\003 \001(\010\022*\n\"skip_enviro" - + "nment_variables_setting\030\004 \001(\010\022&\n\036skip_ai" - + "rflow_overrides_setting\030\005 \001(\010\022\035\n\025skip_gc" - + "s_data_copying\030\006 \001(\010\"\026\n\024LoadSnapshotResp" - + "onse\"\256\014\n\021EnvironmentConfig\022\031\n\013gke_cluste" - + "r\030\001 \001(\tB\004\342A\001\003\022\034\n\016dag_gcs_prefix\030\002 \001(\tB\004\342" - + "A\001\003\022\022\n\nnode_count\030\003 \001(\005\022[\n\017software_conf" - + "ig\030\004 \001(\0132B.google.cloud.orchestration.ai" - + "rflow.service.v1beta1.SoftwareConfig\022S\n\013" - + "node_config\030\005 \001(\0132>.google.cloud.orchest" - + "ration.airflow.service.v1beta1.NodeConfi" - + "g\022p\n\032private_environment_config\030\007 \001(\0132L." - + "google.cloud.orchestration.airflow.servi" - + "ce.v1beta1.PrivateEnvironmentConfig\022\202\001\n!" - + "web_server_network_access_control\030\t \001(\0132" - + "Q.google.cloud.orchestration.airflow.ser" - + "vice.v1beta1.WebServerNetworkAccessContr" - + "olB\004\342A\001\001\022a\n\017database_config\030\n \001(\0132B.goog" + + "equest\022\014\n\004name\030\001 \001(\t\"l\n\034ExecuteAirflowCo" + + "mmandRequest\022\023\n\013environment\030\001 \001(\t\022\017\n\007com" + + "mand\030\002 \001(\t\022\022\n\nsubcommand\030\003 \001(\t\022\022\n\nparame" + + "ters\030\004 \003(\t\"h\n\035ExecuteAirflowCommandRespo" + + "nse\022\024\n\014execution_id\030\001 \001(\t\022\013\n\003pod\030\002 \001(\t\022\025" + + "\n\rpod_namespace\030\003 \001(\t\022\r\n\005error\030\004 \001(\t\"y\n\031" + + "StopAirflowCommandRequest\022\023\n\013environment" + + "\030\001 \001(\t\022\024\n\014execution_id\030\002 \001(\t\022\013\n\003pod\030\003 \001(" + + "\t\022\025\n\rpod_namespace\030\004 \001(\t\022\r\n\005force\030\005 \001(\010\"" + + "=\n\032StopAirflowCommandResponse\022\017\n\007is_done" + + "\030\001 \001(\010\022\016\n\006output\030\002 \003(\t\"\204\001\n\031PollAirflowCo" + + "mmandRequest\022\023\n\013environment\030\001 \001(\t\022\024\n\014exe" + + "cution_id\030\002 \001(\t\022\013\n\003pod\030\003 \001(\t\022\025\n\rpod_name" + + "space\030\004 \001(\t\022\030\n\020next_line_number\030\005 \001(\005\"\335\002" + + "\n\032PollAirflowCommandResponse\022c\n\006output\030\001" + + " \003(\0132S.google.cloud.orchestration.airflo" + + "w.service.v1beta1.PollAirflowCommandResp" + + "onse.Line\022\022\n\noutput_end\030\002 \001(\010\022j\n\texit_in" + + "fo\030\003 \001(\0132W.google.cloud.orchestration.ai" + + "rflow.service.v1beta1.PollAirflowCommand" + + "Response.ExitInfo\032,\n\004Line\022\023\n\013line_number" + + "\030\001 \001(\005\022\017\n\007content\030\002 \001(\t\032,\n\010ExitInfo\022\021\n\te" + + "xit_code\030\001 \001(\005\022\r\n\005error\030\002 \001(\t\"E\n\023SaveSna" + + "pshotRequest\022\023\n\013environment\030\001 \001(\t\022\031\n\021sna" + + "pshot_location\030\002 \001(\t\"-\n\024SaveSnapshotResp" + + "onse\022\025\n\rsnapshot_path\030\001 \001(\t\"\335\001\n\023LoadSnap" + + "shotRequest\022\023\n\013environment\030\001 \001(\t\022\025\n\rsnap" + + "shot_path\030\002 \001(\t\022\'\n\037skip_pypi_packages_in" + + "stallation\030\003 \001(\010\022*\n\"skip_environment_var" + + "iables_setting\030\004 \001(\010\022&\n\036skip_airflow_ove" + + "rrides_setting\030\005 \001(\010\022\035\n\025skip_gcs_data_co" + + "pying\030\006 \001(\010\"\026\n\024LoadSnapshotResponse\".\n\027D" + + "atabaseFailoverRequest\022\023\n\013environment\030\001 " + + "\001(\t\"\032\n\030DatabaseFailoverResponse\"c\n\036Fetch" + + "DatabasePropertiesRequest\022A\n\013environment" + + "\030\001 \001(\tB,\342A\001\002\372A%\n#composer.googleapis.com" + + "/Environment\"~\n\037FetchDatabasePropertiesR" + + "esponse\022\030\n\020primary_gce_zone\030\001 \001(\t\022\032\n\022sec" + + "ondary_gce_zone\030\002 \001(\t\022%\n\035is_failover_rep" + + "lica_available\030\003 \001(\010\"\353\r\n\021EnvironmentConf" + + "ig\022\031\n\013gke_cluster\030\001 \001(\tB\004\342A\001\003\022\034\n\016dag_gcs" + + "_prefix\030\002 \001(\tB\004\342A\001\003\022\022\n\nnode_count\030\003 \001(\005\022" + + "[\n\017software_config\030\004 \001(\0132B.google.cloud." + + "orchestration.airflow.service.v1beta1.So" + + "ftwareConfig\022S\n\013node_config\030\005 \001(\0132>.goog" + "le.cloud.orchestration.airflow.service.v" - + "1beta1.DatabaseConfigB\004\342A\001\001\022d\n\021web_serve" - + "r_config\030\013 \001(\0132C.google.cloud.orchestrat" - + "ion.airflow.service.v1beta1.WebServerCon" - + "figB\004\342A\001\001\022\031\n\013airflow_uri\030\006 \001(\tB\004\342A\001\003\022\037\n\021" - + "airflow_byoid_uri\030\025 \001(\tB\004\342A\001\003\022e\n\021encrypt" - + "ion_config\030\014 \001(\0132D.google.cloud.orchestr" - + "ation.airflow.service.v1beta1.Encryption" - + "ConfigB\004\342A\001\001\022g\n\022maintenance_window\030\r \001(\013" - + "2E.google.cloud.orchestration.airflow.se" - + "rvice.v1beta1.MaintenanceWindowB\004\342A\001\001\022c\n" - + "\020workloads_config\030\017 \001(\0132C.google.cloud.o" - + "rchestration.airflow.service.v1beta1.Wor" - + "kloadsConfigB\004\342A\001\001\022u\n\020environment_size\030\020" - + " \001(\0162U.google.cloud.orchestration.airflo" - + "w.service.v1beta1.EnvironmentConfig.Envi" - + "ronmentSizeB\004\342A\001\001\022\203\001\n!master_authorized_" - + "networks_config\030\021 \001(\0132R.google.cloud.orc" - + "hestration.airflow.service.v1beta1.Maste" - + "rAuthorizedNetworksConfigB\004\342A\001\001\022a\n\017recov" - + "ery_config\030\022 \001(\0132B.google.cloud.orchestr" - + "ation.airflow.service.v1beta1.RecoveryCo" - + "nfigB\004\342A\001\001\"\210\001\n\017EnvironmentSize\022 \n\034ENVIRO" - + "NMENT_SIZE_UNSPECIFIED\020\000\022\032\n\026ENVIRONMENT_" - + "SIZE_SMALL\020\001\022\033\n\027ENVIRONMENT_SIZE_MEDIUM\020" - + "\002\022\032\n\026ENVIRONMENT_SIZE_LARGE\020\003\"\330\001\n\035WebSer" - + "verNetworkAccessControl\022{\n\021allowed_ip_ra" - + "nges\030\001 \003(\0132`.google.cloud.orchestration." - + "airflow.service.v1beta1.WebServerNetwork" - + "AccessControl.AllowedIpRange\032:\n\016AllowedI" - + "pRange\022\r\n\005value\030\001 \001(\t\022\031\n\013description\030\002 \001" - + "(\tB\004\342A\001\001\"\373\005\n\016SoftwareConfig\022\025\n\rimage_ver" - + "sion\030\001 \001(\t\022\206\001\n\030airflow_config_overrides\030" - + "\002 \003(\0132^.google.cloud.orchestration.airfl" - + "ow.service.v1beta1.SoftwareConfig.Airflo" - + "wConfigOverridesEntryB\004\342A\001\001\022q\n\rpypi_pack" - + "ages\030\003 \003(\0132T.google.cloud.orchestration." - + "airflow.service.v1beta1.SoftwareConfig.P" - + "ypiPackagesEntryB\004\342A\001\001\022q\n\renv_variables\030" - + "\004 \003(\0132T.google.cloud.orchestration.airfl" - + "ow.service.v1beta1.SoftwareConfig.EnvVar" - + "iablesEntryB\004\342A\001\001\022\034\n\016python_version\030\006 \001(" - + "\tB\004\342A\001\001\022\035\n\017scheduler_count\030\007 \001(\005B\004\342A\001\001\022}" - + "\n\036cloud_data_lineage_integration\030\010 \001(\0132O" - + ".google.cloud.orchestration.airflow.serv" - + "ice.v1beta1.CloudDataLineageIntegrationB" - + "\004\342A\001\001\032=\n\033AirflowConfigOverridesEntry\022\013\n\003" - + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0323\n\021PypiPack" - + "agesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028" - + "\001\0323\n\021EnvVariablesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" - + "alue\030\002 \001(\t:\0028\001\"\332\001\n\022IPAllocationPolicy\022\034\n" - + "\016use_ip_aliases\030\001 \001(\010B\004\342A\001\001\022*\n\034cluster_s" - + "econdary_range_name\030\002 \001(\tB\004\342A\001\001\022+\n\035servi" - + "ces_secondary_range_name\030\003 \001(\tB\004\342A\001\001\022%\n\027" - + "cluster_ipv4_cidr_block\030\004 \001(\tB\004\342A\001\001\022&\n\030s" - + "ervices_ipv4_cidr_block\030\005 \001(\tB\004\342A\001\001\"\215\003\n\n" - + "NodeConfig\022\026\n\010location\030\001 \001(\tB\004\342A\001\001\022\032\n\014ma" - + "chine_type\030\002 \001(\tB\004\342A\001\001\022\025\n\007network\030\003 \001(\tB" - + "\004\342A\001\001\022\030\n\nsubnetwork\030\004 \001(\tB\004\342A\001\001\022\032\n\014disk_" - + "size_gb\030\005 \001(\005B\004\342A\001\001\022\032\n\014oauth_scopes\030\006 \003(" - + "\tB\004\342A\001\001\022\035\n\017service_account\030\007 \001(\tB\004\342A\001\001\022\022" - + "\n\004tags\030\010 \003(\tB\004\342A\001\001\022j\n\024ip_allocation_poli" - + "cy\030\t \001(\0132F.google.cloud.orchestration.ai" - + "rflow.service.v1beta1.IPAllocationPolicy" - + "B\004\342A\001\001\022\037\n\021max_pods_per_node\030\n \001(\005B\004\342A\001\001\022" - + "\"\n\024enable_ip_masq_agent\030\013 \001(\010B\004\342A\001\001\"\215\001\n\024" - + "PrivateClusterConfig\022%\n\027enable_private_e" - + "ndpoint\030\001 \001(\010B\004\342A\001\001\022$\n\026master_ipv4_cidr_" - + "block\030\002 \001(\tB\004\342A\001\001\022(\n\032master_ipv4_reserve" - + "d_range\030\003 \001(\tB\004\342A\001\003\"\347\001\n\020NetworkingConfig" - + "\022r\n\017connection_type\030\001 \001(\0162S.google.cloud" - + ".orchestration.airflow.service.v1beta1.N" - + "etworkingConfig.ConnectionTypeB\004\342A\001\001\"_\n\016" - + "ConnectionType\022\037\n\033CONNECTION_TYPE_UNSPEC" - + "IFIED\020\000\022\017\n\013VPC_PEERING\020\001\022\033\n\027PRIVATE_SERV" - + "ICE_CONNECT\020\002\"\360\004\n\030PrivateEnvironmentConf" - + "ig\022(\n\032enable_private_environment\030\001 \001(\010B\004" - + "\342A\001\001\022n\n\026private_cluster_config\030\002 \001(\0132H.g" - + "oogle.cloud.orchestration.airflow.servic" - + "e.v1beta1.PrivateClusterConfigB\004\342A\001\001\022(\n\032" - + "web_server_ipv4_cidr_block\030\003 \001(\tB\004\342A\001\001\022\'" - + "\n\031cloud_sql_ipv4_cidr_block\030\004 \001(\tB\004\342A\001\001\022" - + ",\n\036web_server_ipv4_reserved_range\030\005 \001(\tB" - + "\004\342A\001\003\0224\n&cloud_composer_network_ipv4_cid" - + "r_block\030\007 \001(\tB\004\342A\001\001\0228\n*cloud_composer_ne" - + "twork_ipv4_reserved_range\030\010 \001(\tB\004\342A\001\003\022.\n" - + " enable_privately_used_public_ips\030\006 \001(\010B" - + "\004\342A\001\001\0222\n$cloud_composer_connection_subne" - + "twork\030\t \001(\tB\004\342A\001\001\022e\n\021networking_config\030\n" - + " \001(\0132D.google.cloud.orchestration.airflo" - + "w.service.v1beta1.NetworkingConfigB\004\342A\001\001" - + "\",\n\016DatabaseConfig\022\032\n\014machine_type\030\001 \001(\t" - + "B\004\342A\001\001\"-\n\017WebServerConfig\022\032\n\014machine_typ" - + "e\030\001 \001(\tB\004\342A\001\001\".\n\020EncryptionConfig\022\032\n\014kms" - + "_key_name\030\001 \001(\tB\004\342A\001\001\"\227\001\n\021MaintenanceWin" - + "dow\0224\n\nstart_time\030\001 \001(\0132\032.google.protobu" - + "f.TimestampB\004\342A\001\002\0222\n\010end_time\030\002 \001(\0132\032.go" - + "ogle.protobuf.TimestampB\004\342A\001\002\022\030\n\nrecurre" - + "nce\030\003 \001(\tB\004\342A\001\002\"\370\006\n\017WorkloadsConfig\022n\n\ts" - + "cheduler\030\001 \001(\0132U.google.cloud.orchestrat" - + "ion.airflow.service.v1beta1.WorkloadsCon" - + "fig.SchedulerResourceB\004\342A\001\001\022o\n\nweb_serve" - + "r\030\002 \001(\0132U.google.cloud.orchestration.air" - + "flow.service.v1beta1.WorkloadsConfig.Web" - + "ServerResourceB\004\342A\001\001\022h\n\006worker\030\003 \001(\0132R.g" - + "oogle.cloud.orchestration.airflow.servic" - + "e.v1beta1.WorkloadsConfig.WorkerResource" - + "B\004\342A\001\001\022n\n\ttriggerer\030\004 \001(\0132U.google.cloud" - + ".orchestration.airflow.service.v1beta1.W" - + "orkloadsConfig.TriggererResourceB\004\342A\001\001\032n" - + "\n\021SchedulerResource\022\021\n\003cpu\030\001 \001(\002B\004\342A\001\001\022\027" - + "\n\tmemory_gb\030\002 \001(\002B\004\342A\001\001\022\030\n\nstorage_gb\030\003 " - + "\001(\002B\004\342A\001\001\022\023\n\005count\030\004 \001(\005B\004\342A\001\001\032Y\n\021WebSer" - + "verResource\022\021\n\003cpu\030\001 \001(\002B\004\342A\001\001\022\027\n\tmemory" - + "_gb\030\002 \001(\002B\004\342A\001\001\022\030\n\nstorage_gb\030\003 \001(\002B\004\342A\001" - + "\001\032\210\001\n\016WorkerResource\022\021\n\003cpu\030\001 \001(\002B\004\342A\001\001\022" - + "\027\n\tmemory_gb\030\002 \001(\002B\004\342A\001\001\022\030\n\nstorage_gb\030\003" - + " \001(\002B\004\342A\001\001\022\027\n\tmin_count\030\004 \001(\005B\004\342A\001\001\022\027\n\tm" - + "ax_count\030\005 \001(\005B\004\342A\001\001\032T\n\021TriggererResourc" - + "e\022\023\n\005count\030\001 \001(\005B\004\342A\001\001\022\021\n\003cpu\030\002 \001(\002B\004\342A\001" - + "\001\022\027\n\tmemory_gb\030\003 \001(\002B\004\342A\001\001\"\210\001\n\016RecoveryC" - + "onfig\022v\n\032scheduled_snapshots_config\030\001 \001(" - + "\0132L.google.cloud.orchestration.airflow.s" - + "ervice.v1beta1.ScheduledSnapshotsConfigB" - + "\004\342A\001\001\"\225\001\n\030ScheduledSnapshotsConfig\022\025\n\007en" - + "abled\030\001 \001(\010B\004\342A\001\001\022\037\n\021snapshot_location\030\006" - + " \001(\tB\004\342A\001\001\022(\n\032snapshot_creation_schedule" - + "\030\003 \001(\tB\004\342A\001\001\022\027\n\ttime_zone\030\005 \001(\tB\004\342A\001\001\"\333\001" - + "\n\036MasterAuthorizedNetworksConfig\022\017\n\007enab" - + "led\030\001 \001(\010\022q\n\013cidr_blocks\030\002 \003(\0132\\.google." + + "1beta1.NodeConfig\022p\n\032private_environment" + + "_config\030\007 \001(\0132L.google.cloud.orchestrati" + + "on.airflow.service.v1beta1.PrivateEnviro" + + "nmentConfig\022\202\001\n!web_server_network_acces" + + "s_control\030\t \001(\0132Q.google.cloud.orchestra" + + "tion.airflow.service.v1beta1.WebServerNe" + + "tworkAccessControlB\004\342A\001\001\022a\n\017database_con" + + "fig\030\n \001(\0132B.google.cloud.orchestration.a" + + "irflow.service.v1beta1.DatabaseConfigB\004\342" + + "A\001\001\022d\n\021web_server_config\030\013 \001(\0132C.google." + "cloud.orchestration.airflow.service.v1be" - + "ta1.MasterAuthorizedNetworksConfig.CidrB" - + "lock\0325\n\tCidrBlock\022\024\n\014display_name\030\001 \001(\t\022" - + "\022\n\ncidr_block\030\002 \001(\t\"4\n\033CloudDataLineageI" - + "ntegration\022\025\n\007enabled\030\001 \001(\010B\004\342A\001\001\"\254\005\n\013En" - + "vironment\022\014\n\004name\030\001 \001(\t\022U\n\006config\030\002 \001(\0132" - + "E.google.cloud.orchestration.airflow.ser" - + "vice.v1beta1.EnvironmentConfig\022\022\n\004uuid\030\003" - + " \001(\tB\004\342A\001\003\022T\n\005state\030\004 \001(\0162E.google.cloud" - + ".orchestration.airflow.service.v1beta1.E" - + "nvironment.State\0225\n\013create_time\030\005 \001(\0132\032." - + "google.protobuf.TimestampB\004\342A\001\003\0225\n\013updat" - + "e_time\030\006 \001(\0132\032.google.protobuf.Timestamp" - + "B\004\342A\001\003\022a\n\006labels\030\007 \003(\0132K.google.cloud.or" - + "chestration.airflow.service.v1beta1.Envi" - + "ronment.LabelsEntryB\004\342A\001\001\032-\n\013LabelsEntry" - + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"`\n\005Stat" - + "e\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\013" - + "\n\007RUNNING\020\002\022\014\n\010UPDATING\020\003\022\014\n\010DELETING\020\004\022" - + "\t\n\005ERROR\020\005:l\352Ai\n#composer.googleapis.com" - + "/Environment\022Bprojects/{project}/locatio" - + "ns/{location}/environments/{environment}" - + "\"A\n\023CheckUpgradeRequest\022\023\n\013environment\030\001" - + " \001(\t\022\025\n\rimage_version\030\002 \001(\t\"\207\004\n\024CheckUpg" - + "radeResponse\022\033\n\rbuild_log_uri\030\001 \001(\tB\004\342A\001" - + "\003\022\205\001\n\036contains_pypi_modules_conflict\030\004 \001" - + "(\0162W.google.cloud.orchestration.airflow." - + "service.v1beta1.CheckUpgradeResponse.Con" - + "flictResultB\004\342A\001\003\022-\n\037pypi_conflict_build" - + "_log_extract\030\003 \001(\tB\004\342A\001\003\022\025\n\rimage_versio" - + "n\030\005 \001(\t\022y\n\021pypi_dependencies\030\006 \003(\0132^.goo" - + "gle.cloud.orchestration.airflow.service." - + "v1beta1.CheckUpgradeResponse.PypiDepende" - + "nciesEntry\0327\n\025PypiDependenciesEntry\022\013\n\003k" - + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"P\n\016ConflictR" - + "esult\022\037\n\033CONFLICT_RESULT_UNSPECIFIED\020\000\022\014" - + "\n\010CONFLICT\020\001\022\017\n\013NO_CONFLICT\020\0022\266\026\n\014Enviro" - + "nments\022\270\002\n\021CreateEnvironment\022L.google.cl" - + "oud.orchestration.airflow.service.v1beta" - + "1.CreateEnvironmentRequest\032\035.google.long" - + "running.Operation\"\265\001\312AS\n\013Environment\022Dgo" + + "ta1.WebServerConfigB\004\342A\001\001\022\031\n\013airflow_uri" + + "\030\006 \001(\tB\004\342A\001\003\022\037\n\021airflow_byoid_uri\030\025 \001(\tB" + + "\004\342A\001\003\022e\n\021encryption_config\030\014 \001(\0132D.googl" + + "e.cloud.orchestration.airflow.service.v1" + + "beta1.EncryptionConfigB\004\342A\001\001\022g\n\022maintena" + + "nce_window\030\r \001(\0132E.google.cloud.orchestr" + + "ation.airflow.service.v1beta1.Maintenanc" + + "eWindowB\004\342A\001\001\022c\n\020workloads_config\030\017 \001(\0132" + + "C.google.cloud.orchestration.airflow.ser" + + "vice.v1beta1.WorkloadsConfigB\004\342A\001\001\022u\n\020en" + + "vironment_size\030\020 \001(\0162U.google.cloud.orch" + + "estration.airflow.service.v1beta1.Enviro" + + "nmentConfig.EnvironmentSizeB\004\342A\001\001\022\203\001\n!ma" + + "ster_authorized_networks_config\030\021 \001(\0132R." + + "google.cloud.orchestration.airflow.servi" + + "ce.v1beta1.MasterAuthorizedNetworksConfi" + + "gB\004\342A\001\001\022a\n\017recovery_config\030\022 \001(\0132B.googl" + + "e.cloud.orchestration.airflow.service.v1" + + "beta1.RecoveryConfigB\004\342A\001\001\022s\n\017resilience" + + "_mode\030\024 \001(\0162T.google.cloud.orchestration" + + ".airflow.service.v1beta1.EnvironmentConf" + + "ig.ResilienceModeB\004\342A\001\001\"\210\001\n\017EnvironmentS" + + "ize\022 \n\034ENVIRONMENT_SIZE_UNSPECIFIED\020\000\022\032\n" + + "\026ENVIRONMENT_SIZE_SMALL\020\001\022\033\n\027ENVIRONMENT" + + "_SIZE_MEDIUM\020\002\022\032\n\026ENVIRONMENT_SIZE_LARGE" + + "\020\003\"F\n\016ResilienceMode\022\037\n\033RESILIENCE_MODE_" + + "UNSPECIFIED\020\000\022\023\n\017HIGH_RESILIENCE\020\001\"\330\001\n\035W" + + "ebServerNetworkAccessControl\022{\n\021allowed_" + + "ip_ranges\030\001 \003(\0132`.google.cloud.orchestra" + + "tion.airflow.service.v1beta1.WebServerNe" + + "tworkAccessControl.AllowedIpRange\032:\n\016All" + + "owedIpRange\022\r\n\005value\030\001 \001(\t\022\031\n\013descriptio" + + "n\030\002 \001(\tB\004\342A\001\001\"\373\005\n\016SoftwareConfig\022\025\n\rimag" + + "e_version\030\001 \001(\t\022\206\001\n\030airflow_config_overr" + + "ides\030\002 \003(\0132^.google.cloud.orchestration." + + "airflow.service.v1beta1.SoftwareConfig.A" + + "irflowConfigOverridesEntryB\004\342A\001\001\022q\n\rpypi" + + "_packages\030\003 \003(\0132T.google.cloud.orchestra" + + "tion.airflow.service.v1beta1.SoftwareCon" + + "fig.PypiPackagesEntryB\004\342A\001\001\022q\n\renv_varia" + + "bles\030\004 \003(\0132T.google.cloud.orchestration." + + "airflow.service.v1beta1.SoftwareConfig.E" + + "nvVariablesEntryB\004\342A\001\001\022\034\n\016python_version" + + "\030\006 \001(\tB\004\342A\001\001\022\035\n\017scheduler_count\030\007 \001(\005B\004\342" + + "A\001\001\022}\n\036cloud_data_lineage_integration\030\010 " + + "\001(\0132O.google.cloud.orchestration.airflow" + + ".service.v1beta1.CloudDataLineageIntegra" + + "tionB\004\342A\001\001\032=\n\033AirflowConfigOverridesEntr" + + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0323\n\021Pyp" + + "iPackagesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + + "(\t:\0028\001\0323\n\021EnvVariablesEntry\022\013\n\003key\030\001 \001(\t" + + "\022\r\n\005value\030\002 \001(\t:\0028\001\"\332\001\n\022IPAllocationPoli" + + "cy\022\034\n\016use_ip_aliases\030\001 \001(\010B\004\342A\001\001\022*\n\034clus" + + "ter_secondary_range_name\030\002 \001(\tB\004\342A\001\001\022+\n\035" + + "services_secondary_range_name\030\003 \001(\tB\004\342A\001" + + "\001\022%\n\027cluster_ipv4_cidr_block\030\004 \001(\tB\004\342A\001\001" + + "\022&\n\030services_ipv4_cidr_block\030\005 \001(\tB\004\342A\001\001" + + "\"\215\003\n\nNodeConfig\022\026\n\010location\030\001 \001(\tB\004\342A\001\001\022" + + "\032\n\014machine_type\030\002 \001(\tB\004\342A\001\001\022\025\n\007network\030\003" + + " \001(\tB\004\342A\001\001\022\030\n\nsubnetwork\030\004 \001(\tB\004\342A\001\001\022\032\n\014" + + "disk_size_gb\030\005 \001(\005B\004\342A\001\001\022\032\n\014oauth_scopes" + + "\030\006 \003(\tB\004\342A\001\001\022\035\n\017service_account\030\007 \001(\tB\004\342" + + "A\001\001\022\022\n\004tags\030\010 \003(\tB\004\342A\001\001\022j\n\024ip_allocation" + + "_policy\030\t \001(\0132F.google.cloud.orchestrati" + + "on.airflow.service.v1beta1.IPAllocationP" + + "olicyB\004\342A\001\001\022\037\n\021max_pods_per_node\030\n \001(\005B\004" + + "\342A\001\001\022\"\n\024enable_ip_masq_agent\030\013 \001(\010B\004\342A\001\001" + + "\"\215\001\n\024PrivateClusterConfig\022%\n\027enable_priv" + + "ate_endpoint\030\001 \001(\010B\004\342A\001\001\022$\n\026master_ipv4_" + + "cidr_block\030\002 \001(\tB\004\342A\001\001\022(\n\032master_ipv4_re" + + "served_range\030\003 \001(\tB\004\342A\001\003\"\347\001\n\020NetworkingC" + + "onfig\022r\n\017connection_type\030\001 \001(\0162S.google." + + "cloud.orchestration.airflow.service.v1be" + + "ta1.NetworkingConfig.ConnectionTypeB\004\342A\001" + + "\001\"_\n\016ConnectionType\022\037\n\033CONNECTION_TYPE_U" + + "NSPECIFIED\020\000\022\017\n\013VPC_PEERING\020\001\022\033\n\027PRIVATE" + + "_SERVICE_CONNECT\020\002\"\360\004\n\030PrivateEnvironmen" + + "tConfig\022(\n\032enable_private_environment\030\001 " + + "\001(\010B\004\342A\001\001\022n\n\026private_cluster_config\030\002 \001(" + + "\0132H.google.cloud.orchestration.airflow.s" + + "ervice.v1beta1.PrivateClusterConfigB\004\342A\001" + + "\001\022(\n\032web_server_ipv4_cidr_block\030\003 \001(\tB\004\342" + + "A\001\001\022\'\n\031cloud_sql_ipv4_cidr_block\030\004 \001(\tB\004" + + "\342A\001\001\022,\n\036web_server_ipv4_reserved_range\030\005" + + " \001(\tB\004\342A\001\003\0224\n&cloud_composer_network_ipv" + + "4_cidr_block\030\007 \001(\tB\004\342A\001\001\0228\n*cloud_compos" + + "er_network_ipv4_reserved_range\030\010 \001(\tB\004\342A" + + "\001\003\022.\n enable_privately_used_public_ips\030\006" + + " \001(\010B\004\342A\001\001\0222\n$cloud_composer_connection_" + + "subnetwork\030\t \001(\tB\004\342A\001\001\022e\n\021networking_con" + + "fig\030\n \001(\0132D.google.cloud.orchestration.a" + + "irflow.service.v1beta1.NetworkingConfigB" + + "\004\342A\001\001\",\n\016DatabaseConfig\022\032\n\014machine_type\030" + + "\001 \001(\tB\004\342A\001\001\"-\n\017WebServerConfig\022\032\n\014machin" + + "e_type\030\001 \001(\tB\004\342A\001\001\".\n\020EncryptionConfig\022\032" + + "\n\014kms_key_name\030\001 \001(\tB\004\342A\001\001\"\227\001\n\021Maintenan" + + "ceWindow\0224\n\nstart_time\030\001 \001(\0132\032.google.pr" + + "otobuf.TimestampB\004\342A\001\002\0222\n\010end_time\030\002 \001(\013" + + "2\032.google.protobuf.TimestampB\004\342A\001\002\022\030\n\nre" + + "currence\030\003 \001(\tB\004\342A\001\002\"\370\006\n\017WorkloadsConfig" + + "\022n\n\tscheduler\030\001 \001(\0132U.google.cloud.orche" + + "stration.airflow.service.v1beta1.Workloa" + + "dsConfig.SchedulerResourceB\004\342A\001\001\022o\n\nweb_" + + "server\030\002 \001(\0132U.google.cloud.orchestratio" + + "n.airflow.service.v1beta1.WorkloadsConfi" + + "g.WebServerResourceB\004\342A\001\001\022h\n\006worker\030\003 \001(" + + "\0132R.google.cloud.orchestration.airflow.s" + + "ervice.v1beta1.WorkloadsConfig.WorkerRes" + + "ourceB\004\342A\001\001\022n\n\ttriggerer\030\004 \001(\0132U.google." + + "cloud.orchestration.airflow.service.v1be" + + "ta1.WorkloadsConfig.TriggererResourceB\004\342" + + "A\001\001\032n\n\021SchedulerResource\022\021\n\003cpu\030\001 \001(\002B\004\342" + + "A\001\001\022\027\n\tmemory_gb\030\002 \001(\002B\004\342A\001\001\022\030\n\nstorage_" + + "gb\030\003 \001(\002B\004\342A\001\001\022\023\n\005count\030\004 \001(\005B\004\342A\001\001\032Y\n\021W" + + "ebServerResource\022\021\n\003cpu\030\001 \001(\002B\004\342A\001\001\022\027\n\tm" + + "emory_gb\030\002 \001(\002B\004\342A\001\001\022\030\n\nstorage_gb\030\003 \001(\002" + + "B\004\342A\001\001\032\210\001\n\016WorkerResource\022\021\n\003cpu\030\001 \001(\002B\004" + + "\342A\001\001\022\027\n\tmemory_gb\030\002 \001(\002B\004\342A\001\001\022\030\n\nstorage" + + "_gb\030\003 \001(\002B\004\342A\001\001\022\027\n\tmin_count\030\004 \001(\005B\004\342A\001\001" + + "\022\027\n\tmax_count\030\005 \001(\005B\004\342A\001\001\032T\n\021TriggererRe" + + "source\022\023\n\005count\030\001 \001(\005B\004\342A\001\001\022\021\n\003cpu\030\002 \001(\002" + + "B\004\342A\001\001\022\027\n\tmemory_gb\030\003 \001(\002B\004\342A\001\001\"\210\001\n\016Reco" + + "veryConfig\022v\n\032scheduled_snapshots_config" + + "\030\001 \001(\0132L.google.cloud.orchestration.airf" + + "low.service.v1beta1.ScheduledSnapshotsCo" + + "nfigB\004\342A\001\001\"\225\001\n\030ScheduledSnapshotsConfig\022" + + "\025\n\007enabled\030\001 \001(\010B\004\342A\001\001\022\037\n\021snapshot_locat" + + "ion\030\006 \001(\tB\004\342A\001\001\022(\n\032snapshot_creation_sch" + + "edule\030\003 \001(\tB\004\342A\001\001\022\027\n\ttime_zone\030\005 \001(\tB\004\342A" + + "\001\001\"\333\001\n\036MasterAuthorizedNetworksConfig\022\017\n" + + "\007enabled\030\001 \001(\010\022q\n\013cidr_blocks\030\002 \003(\0132\\.go" + "ogle.cloud.orchestration.airflow.service" - + ".v1beta1.OperationMetadata\332A\022parent,envi" - + "ronment\202\323\344\223\002D\"5/v1beta1/{parent=projects" - + "/*/locations/*}/environments:\013environmen" - + "t\022\342\001\n\016GetEnvironment\022I.google.cloud.orch" - + "estration.airflow.service.v1beta1.GetEnv" - + "ironmentRequest\032?.google.cloud.orchestra" - + "tion.airflow.service.v1beta1.Environment" - + "\"D\332A\004name\202\323\344\223\0027\0225/v1beta1/{name=projects" - + "/*/locations/*/environments/*}\022\365\001\n\020ListE" - + "nvironments\022K.google.cloud.orchestration" - + ".airflow.service.v1beta1.ListEnvironment" - + "sRequest\032L.google.cloud.orchestration.ai" - + "rflow.service.v1beta1.ListEnvironmentsRe" - + "sponse\"F\332A\006parent\202\323\344\223\0027\0225/v1beta1/{paren" - + "t=projects/*/locations/*}/environments\022\302" - + "\002\n\021UpdateEnvironment\022L.google.cloud.orch" - + "estration.airflow.service.v1beta1.Update" - + "EnvironmentRequest\032\035.google.longrunning." - + "Operation\"\277\001\312AS\n\013Environment\022Dgoogle.clo" + + ".v1beta1.MasterAuthorizedNetworksConfig." + + "CidrBlock\0325\n\tCidrBlock\022\024\n\014display_name\030\001" + + " \001(\t\022\022\n\ncidr_block\030\002 \001(\t\"4\n\033CloudDataLin" + + "eageIntegration\022\025\n\007enabled\030\001 \001(\010B\004\342A\001\001\"\254" + + "\005\n\013Environment\022\014\n\004name\030\001 \001(\t\022U\n\006config\030\002" + + " \001(\0132E.google.cloud.orchestration.airflo" + + "w.service.v1beta1.EnvironmentConfig\022\022\n\004u" + + "uid\030\003 \001(\tB\004\342A\001\003\022T\n\005state\030\004 \001(\0162E.google." + + "cloud.orchestration.airflow.service.v1be" + + "ta1.Environment.State\0225\n\013create_time\030\005 \001" + + "(\0132\032.google.protobuf.TimestampB\004\342A\001\003\0225\n\013" + + "update_time\030\006 \001(\0132\032.google.protobuf.Time" + + "stampB\004\342A\001\003\022a\n\006labels\030\007 \003(\0132K.google.clo" + "ud.orchestration.airflow.service.v1beta1" - + ".OperationMetadata\332A\034name,environment,up" - + "date_mask\202\323\344\223\002D25/v1beta1/{name=projects" - + "/*/locations/*/environments/*}:\013environm" - + "ent\022\247\002\n\021DeleteEnvironment\022L.google.cloud" - + ".orchestration.airflow.service.v1beta1.D" - + "eleteEnvironmentRequest\032\035.google.longrun" - + "ning.Operation\"\244\001\312A]\n\025google.protobuf.Em" - + "pty\022Dgoogle.cloud.orchestration.airflow." - + "service.v1beta1.OperationMetadata\332A\004name" - + "\202\323\344\223\0027*5/v1beta1/{name=projects/*/locati" - + "ons/*/environments/*}\022\250\002\n\020RestartWebServ" - + "er\022K.google.cloud.orchestration.airflow." - + "service.v1beta1.RestartWebServerRequest\032" - + "\035.google.longrunning.Operation\"\247\001\312AS\n\013En" - + "vironment\022Dgoogle.cloud.orchestration.ai" - + "rflow.service.v1beta1.OperationMetadata\202" - + "\323\344\223\002K\"F/v1beta1/{name=projects/*/locatio" - + "ns/*/environments/*}:restartWebServer:\001*" - + "\022\340\002\n\014CheckUpgrade\022G.google.cloud.orchest" - + "ration.airflow.service.v1beta1.CheckUpgr" - + "adeRequest\032\035.google.longrunning.Operatio" - + "n\"\347\001\312A\217\001\nGgoogle.cloud.orchestration.air" + + ".Environment.LabelsEntryB\004\342A\001\001\032-\n\013Labels" + + "Entry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"`\n" + + "\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATIN" + + "G\020\001\022\013\n\007RUNNING\020\002\022\014\n\010UPDATING\020\003\022\014\n\010DELETI" + + "NG\020\004\022\t\n\005ERROR\020\005:l\352Ai\n#composer.googleapi" + + "s.com/Environment\022Bprojects/{project}/lo" + + "cations/{location}/environments/{environ" + + "ment}\"A\n\023CheckUpgradeRequest\022\023\n\013environm" + + "ent\030\001 \001(\t\022\025\n\rimage_version\030\002 \001(\t\"\207\004\n\024Che" + + "ckUpgradeResponse\022\033\n\rbuild_log_uri\030\001 \001(\t" + + "B\004\342A\001\003\022\205\001\n\036contains_pypi_modules_conflic" + + "t\030\004 \001(\0162W.google.cloud.orchestration.air" + "flow.service.v1beta1.CheckUpgradeRespons" - + "e\022Dgoogle.cloud.orchestration.airflow.se" - + "rvice.v1beta1.OperationMetadata\202\323\344\223\002N\"I/" - + "v1beta1/{environment=projects/*/location" - + "s/*/environments/*}:checkUpgrade:\001*\022\340\002\n\014" - + "SaveSnapshot\022G.google.cloud.orchestratio" - + "n.airflow.service.v1beta1.SaveSnapshotRe" - + "quest\032\035.google.longrunning.Operation\"\347\001\312" - + "A\217\001\nGgoogle.cloud.orchestration.airflow." - + "service.v1beta1.SaveSnapshotResponse\022Dgo" - + "ogle.cloud.orchestration.airflow.service" - + ".v1beta1.OperationMetadata\202\323\344\223\002N\"I/v1bet" - + "a1/{environment=projects/*/locations/*/e" - + "nvironments/*}:saveSnapshot:\001*\022\340\002\n\014LoadS" - + "napshot\022G.google.cloud.orchestration.air" - + "flow.service.v1beta1.LoadSnapshotRequest" - + "\032\035.google.longrunning.Operation\"\347\001\312A\217\001\nG" - + "google.cloud.orchestration.airflow.servi" - + "ce.v1beta1.LoadSnapshotResponse\022Dgoogle." + + "e.ConflictResultB\004\342A\001\003\022-\n\037pypi_conflict_" + + "build_log_extract\030\003 \001(\tB\004\342A\001\003\022\025\n\rimage_v" + + "ersion\030\005 \001(\t\022y\n\021pypi_dependencies\030\006 \003(\0132" + + "^.google.cloud.orchestration.airflow.ser" + + "vice.v1beta1.CheckUpgradeResponse.PypiDe" + + "pendenciesEntry\0327\n\025PypiDependenciesEntry" + + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"P\n\016Conf" + + "lictResult\022\037\n\033CONFLICT_RESULT_UNSPECIFIE" + + "D\020\000\022\014\n\010CONFLICT\020\001\022\017\n\013NO_CONFLICT\020\0022\216\"\n\014E" + + "nvironments\022\270\002\n\021CreateEnvironment\022L.goog" + + "le.cloud.orchestration.airflow.service.v" + + "1beta1.CreateEnvironmentRequest\032\035.google" + + ".longrunning.Operation\"\265\001\312AS\n\013Environmen" + + "t\022Dgoogle.cloud.orchestration.airflow.se" + + "rvice.v1beta1.OperationMetadata\332A\022parent" + + ",environment\202\323\344\223\002D\"5/v1beta1/{parent=pro" + + "jects/*/locations/*}/environments:\013envir" + + "onment\022\342\001\n\016GetEnvironment\022I.google.cloud" + + ".orchestration.airflow.service.v1beta1.G" + + "etEnvironmentRequest\032?.google.cloud.orch" + + "estration.airflow.service.v1beta1.Enviro" + + "nment\"D\332A\004name\202\323\344\223\0027\0225/v1beta1/{name=pro" + + "jects/*/locations/*/environments/*}\022\365\001\n\020" + + "ListEnvironments\022K.google.cloud.orchestr" + + "ation.airflow.service.v1beta1.ListEnviro" + + "nmentsRequest\032L.google.cloud.orchestrati" + + "on.airflow.service.v1beta1.ListEnvironme" + + "ntsResponse\"F\332A\006parent\202\323\344\223\0027\0225/v1beta1/{" + + "parent=projects/*/locations/*}/environme" + + "nts\022\302\002\n\021UpdateEnvironment\022L.google.cloud" + + ".orchestration.airflow.service.v1beta1.U" + + "pdateEnvironmentRequest\032\035.google.longrun" + + "ning.Operation\"\277\001\312AS\n\013Environment\022Dgoogl" + + "e.cloud.orchestration.airflow.service.v1" + + "beta1.OperationMetadata\332A\034name,environme" + + "nt,update_mask\202\323\344\223\002D25/v1beta1/{name=pro" + + "jects/*/locations/*/environments/*}:\013env" + + "ironment\022\247\002\n\021DeleteEnvironment\022L.google." + "cloud.orchestration.airflow.service.v1be" - + "ta1.OperationMetadata\202\323\344\223\002N\"I/v1beta1/{e" - + "nvironment=projects/*/locations/*/enviro" - + "nments/*}:loadSnapshot:\001*\032K\312A\027composer.g" - + "oogleapis.com\322A.https://www.googleapis.c" - + "om/auth/cloud-platformB\214\001\n6com.google.cl" + + "ta1.DeleteEnvironmentRequest\032\035.google.lo" + + "ngrunning.Operation\"\244\001\312A]\n\025google.protob" + + "uf.Empty\022Dgoogle.cloud.orchestration.air" + + "flow.service.v1beta1.OperationMetadata\332A" + + "\004name\202\323\344\223\0027*5/v1beta1/{name=projects/*/l" + + "ocations/*/environments/*}\022\250\002\n\020RestartWe" + + "bServer\022K.google.cloud.orchestration.air" + + "flow.service.v1beta1.RestartWebServerReq" + + "uest\032\035.google.longrunning.Operation\"\247\001\312A" + + "S\n\013Environment\022Dgoogle.cloud.orchestrati" + + "on.airflow.service.v1beta1.OperationMeta" + + "data\202\323\344\223\002K\"F/v1beta1/{name=projects/*/lo" + + "cations/*/environments/*}:restartWebServ" + + "er:\001*\022\340\002\n\014CheckUpgrade\022G.google.cloud.or" + + "chestration.airflow.service.v1beta1.Chec" + + "kUpgradeRequest\032\035.google.longrunning.Ope" + + "ration\"\347\001\312A\217\001\nGgoogle.cloud.orchestratio" + + "n.airflow.service.v1beta1.CheckUpgradeRe" + + "sponse\022Dgoogle.cloud.orchestration.airfl" + + "ow.service.v1beta1.OperationMetadata\202\323\344\223" + + "\002N\"I/v1beta1/{environment=projects/*/loc" + + "ations/*/environments/*}:checkUpgrade:\001*" + + "\022\233\002\n\025ExecuteAirflowCommand\022P.google.clou" + + "d.orchestration.airflow.service.v1beta1." + + "ExecuteAirflowCommandRequest\032Q.google.cl" + + "oud.orchestration.airflow.service.v1beta" + + "1.ExecuteAirflowCommandResponse\"]\202\323\344\223\002W\"" + + "R/v1beta1/{environment=projects/*/locati" + + "ons/*/environments/*}:executeAirflowComm" + + "and:\001*\022\217\002\n\022StopAirflowCommand\022M.google.c" + + "loud.orchestration.airflow.service.v1bet" + + "a1.StopAirflowCommandRequest\032N.google.cl" + "oud.orchestration.airflow.service.v1beta" - + "1P\001ZPcloud.google.com/go/orchestration/a" - + "irflow/service/apiv1beta1/servicepb;serv" - + "icepbb\006proto3" + + "1.StopAirflowCommandResponse\"Z\202\323\344\223\002T\"O/v" + + "1beta1/{environment=projects/*/locations" + + "/*/environments/*}:stopAirflowCommand:\001*" + + "\022\217\002\n\022PollAirflowCommand\022M.google.cloud.o" + + "rchestration.airflow.service.v1beta1.Pol" + + "lAirflowCommandRequest\032N.google.cloud.or" + + "chestration.airflow.service.v1beta1.Poll" + + "AirflowCommandResponse\"Z\202\323\344\223\002T\"O/v1beta1" + + "/{environment=projects/*/locations/*/env" + + "ironments/*}:pollAirflowCommand:\001*\022\340\002\n\014S" + + "aveSnapshot\022G.google.cloud.orchestration" + + ".airflow.service.v1beta1.SaveSnapshotReq" + + "uest\032\035.google.longrunning.Operation\"\347\001\312A" + + "\217\001\nGgoogle.cloud.orchestration.airflow.s" + + "ervice.v1beta1.SaveSnapshotResponse\022Dgoo" + + "gle.cloud.orchestration.airflow.service." + + "v1beta1.OperationMetadata\202\323\344\223\002N\"I/v1beta" + + "1/{environment=projects/*/locations/*/en" + + "vironments/*}:saveSnapshot:\001*\022\340\002\n\014LoadSn" + + "apshot\022G.google.cloud.orchestration.airf" + + "low.service.v1beta1.LoadSnapshotRequest\032" + + "\035.google.longrunning.Operation\"\347\001\312A\217\001\nGg" + + "oogle.cloud.orchestration.airflow.servic" + + "e.v1beta1.LoadSnapshotResponse\022Dgoogle.c" + + "loud.orchestration.airflow.service.v1bet" + + "a1.OperationMetadata\202\323\344\223\002N\"I/v1beta1/{en" + + "vironment=projects/*/locations/*/environ" + + "ments/*}:loadSnapshot:\001*\022\360\002\n\020DatabaseFai" + + "lover\022K.google.cloud.orchestration.airfl" + + "ow.service.v1beta1.DatabaseFailoverReque" + + "st\032\035.google.longrunning.Operation\"\357\001\312A\223\001" + + "\nKgoogle.cloud.orchestration.airflow.ser" + + "vice.v1beta1.DatabaseFailoverResponse\022Dg" + + "oogle.cloud.orchestration.airflow.servic" + + "e.v1beta1.OperationMetadata\202\323\344\223\002R\"M/v1be" + + "ta1/{environment=projects/*/locations/*/" + + "environments/*}:databaseFailover:\001*\022\240\002\n\027" + + "FetchDatabaseProperties\022R.google.cloud.o" + + "rchestration.airflow.service.v1beta1.Fet" + + "chDatabasePropertiesRequest\032S.google.clo" + + "ud.orchestration.airflow.service.v1beta1" + + ".FetchDatabasePropertiesResponse\"\\\202\323\344\223\002V" + + "\022T/v1beta1/{environment=projects/*/locat" + + "ions/*/environments/*}:fetchDatabaseProp" + + "erties\032K\312A\027composer.googleapis.com\322A.htt" + + "ps://www.googleapis.com/auth/cloud-platf" + + "ormB\214\001\n6com.google.cloud.orchestration.a" + + "irflow.service.v1beta1P\001ZPcloud.google.c" + + "om/go/orchestration/airflow/service/apiv" + + "1beta1/servicepb;servicepbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -597,16 +689,48 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", }); - internal_static_google_cloud_orchestration_airflow_service_v1beta1_ExecuteAirflowCommandResponse_descriptor = + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ExecuteAirflowCommandRequest_descriptor = getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ExecuteAirflowCommandRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ExecuteAirflowCommandRequest_descriptor, + new java.lang.String[] { + "Environment", "Command", "Subcommand", "Parameters", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ExecuteAirflowCommandResponse_descriptor = + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_orchestration_airflow_service_v1beta1_ExecuteAirflowCommandResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_ExecuteAirflowCommandResponse_descriptor, new java.lang.String[] { "ExecutionId", "Pod", "PodNamespace", "Error", }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandRequest_descriptor, + new java.lang.String[] { + "Environment", "ExecutionId", "Pod", "PodNamespace", "Force", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandResponse_descriptor, + new java.lang.String[] { + "IsDone", "Output", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_PollAirflowCommandRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_PollAirflowCommandRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_PollAirflowCommandRequest_descriptor, + new java.lang.String[] { + "Environment", "ExecutionId", "Pod", "PodNamespace", "NextLineNumber", + }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_PollAirflowCommandResponse_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_orchestration_airflow_service_v1beta1_PollAirflowCommandResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_PollAirflowCommandResponse_descriptor, @@ -634,7 +758,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ExitCode", "Error", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_SaveSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_orchestration_airflow_service_v1beta1_SaveSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_SaveSnapshotRequest_descriptor, @@ -642,7 +766,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Environment", "SnapshotLocation", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_SaveSnapshotResponse_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_orchestration_airflow_service_v1beta1_SaveSnapshotResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_SaveSnapshotResponse_descriptor, @@ -650,7 +774,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SnapshotPath", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_LoadSnapshotRequest_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_orchestration_airflow_service_v1beta1_LoadSnapshotRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_LoadSnapshotRequest_descriptor, @@ -663,13 +787,43 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SkipGcsDataCopying", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_LoadSnapshotResponse_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_orchestration_airflow_service_v1beta1_LoadSnapshotResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_LoadSnapshotResponse_descriptor, new java.lang.String[] {}); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverRequest_descriptor, + new java.lang.String[] { + "Environment", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverResponse_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseFailoverResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesRequest_descriptor, + new java.lang.String[] { + "Environment", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesResponse_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesResponse_descriptor, + new java.lang.String[] { + "PrimaryGceZone", "SecondaryGceZone", "IsFailoverReplicaAvailable", + }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_EnvironmentConfig_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_orchestration_airflow_service_v1beta1_EnvironmentConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_EnvironmentConfig_descriptor, @@ -691,9 +845,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EnvironmentSize", "MasterAuthorizedNetworksConfig", "RecoveryConfig", + "ResilienceMode", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_descriptor, @@ -711,7 +866,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Value", "Description", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_descriptor, @@ -755,7 +910,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_IPAllocationPolicy_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_orchestration_airflow_service_v1beta1_IPAllocationPolicy_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_IPAllocationPolicy_descriptor, @@ -767,7 +922,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ServicesIpv4CidrBlock", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_NodeConfig_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_orchestration_airflow_service_v1beta1_NodeConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_NodeConfig_descriptor, @@ -785,7 +940,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EnableIpMasqAgent", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateClusterConfig_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(26); internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateClusterConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateClusterConfig_descriptor, @@ -793,7 +948,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EnablePrivateEndpoint", "MasterIpv4CidrBlock", "MasterIpv4ReservedRange", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_NetworkingConfig_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(27); internal_static_google_cloud_orchestration_airflow_service_v1beta1_NetworkingConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_NetworkingConfig_descriptor, @@ -801,7 +956,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ConnectionType", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateEnvironmentConfig_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(28); internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateEnvironmentConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateEnvironmentConfig_descriptor, @@ -818,7 +973,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "NetworkingConfig", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseConfig_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(29); internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseConfig_descriptor, @@ -826,7 +981,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MachineType", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerConfig_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(30); internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerConfig_descriptor, @@ -834,7 +989,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MachineType", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_EncryptionConfig_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(31); internal_static_google_cloud_orchestration_airflow_service_v1beta1_EncryptionConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_EncryptionConfig_descriptor, @@ -842,7 +997,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "KmsKeyName", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_MaintenanceWindow_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(32); internal_static_google_cloud_orchestration_airflow_service_v1beta1_MaintenanceWindow_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_MaintenanceWindow_descriptor, @@ -850,7 +1005,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "StartTime", "EndTime", "Recurrence", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(33); internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_descriptor, @@ -898,7 +1053,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Count", "Cpu", "MemoryGb", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_RecoveryConfig_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(34); internal_static_google_cloud_orchestration_airflow_service_v1beta1_RecoveryConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_RecoveryConfig_descriptor, @@ -906,7 +1061,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ScheduledSnapshotsConfig", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_ScheduledSnapshotsConfig_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(35); internal_static_google_cloud_orchestration_airflow_service_v1beta1_ScheduledSnapshotsConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_ScheduledSnapshotsConfig_descriptor, @@ -914,7 +1069,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Enabled", "SnapshotLocation", "SnapshotCreationSchedule", "TimeZone", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_MasterAuthorizedNetworksConfig_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(36); internal_static_google_cloud_orchestration_airflow_service_v1beta1_MasterAuthorizedNetworksConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_MasterAuthorizedNetworksConfig_descriptor, @@ -932,7 +1087,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DisplayName", "CidrBlock", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_CloudDataLineageIntegration_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(37); internal_static_google_cloud_orchestration_airflow_service_v1beta1_CloudDataLineageIntegration_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_CloudDataLineageIntegration_descriptor, @@ -940,7 +1095,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Enabled", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(38); internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_descriptor, @@ -958,7 +1113,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeRequest_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(39); internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeRequest_descriptor, @@ -966,7 +1121,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Environment", "ImageVersion", }); internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(40); internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_descriptor, @@ -995,6 +1150,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ClientProto.methodSignature); registry.add(com.google.api.ClientProto.oauthScopes); registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); registry.add(com.google.longrunning.OperationsProto.operationInfo); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ExecuteAirflowCommandRequest.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ExecuteAirflowCommandRequest.java new file mode 100644 index 000000000000..c43c63fef57d --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ExecuteAirflowCommandRequest.java @@ -0,0 +1,1347 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Execute Airflow Command request.
+ * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest} + */ +public final class ExecuteAirflowCommandRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest) + ExecuteAirflowCommandRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExecuteAirflowCommandRequest.newBuilder() to construct. + private ExecuteAirflowCommandRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExecuteAirflowCommandRequest() { + environment_ = ""; + command_ = ""; + subcommand_ = ""; + parameters_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExecuteAirflowCommandRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ExecuteAirflowCommandRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ExecuteAirflowCommandRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + .class, + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + .Builder.class); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object environment_ = ""; + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMMAND_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object command_ = ""; + /** + * + * + *
+   * Airflow command.
+   * 
+ * + * string command = 2; + * + * @return The command. + */ + @java.lang.Override + public java.lang.String getCommand() { + java.lang.Object ref = command_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + command_ = s; + return s; + } + } + /** + * + * + *
+   * Airflow command.
+   * 
+ * + * string command = 2; + * + * @return The bytes for command. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCommandBytes() { + java.lang.Object ref = command_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + command_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBCOMMAND_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object subcommand_ = ""; + /** + * + * + *
+   * Airflow subcommand.
+   * 
+ * + * string subcommand = 3; + * + * @return The subcommand. + */ + @java.lang.Override + public java.lang.String getSubcommand() { + java.lang.Object ref = subcommand_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subcommand_ = s; + return s; + } + } + /** + * + * + *
+   * Airflow subcommand.
+   * 
+ * + * string subcommand = 3; + * + * @return The bytes for subcommand. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubcommandBytes() { + java.lang.Object ref = subcommand_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subcommand_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAMETERS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList parameters_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Parameters for the Airflow command/subcommand as an array of arguments.
+   * It may contain positional arguments like `["my-dag-id"]`, key-value
+   * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+   * or other flags like `["-f"]`.
+   * 
+ * + * repeated string parameters = 4; + * + * @return A list containing the parameters. + */ + public com.google.protobuf.ProtocolStringList getParametersList() { + return parameters_; + } + /** + * + * + *
+   * Parameters for the Airflow command/subcommand as an array of arguments.
+   * It may contain positional arguments like `["my-dag-id"]`, key-value
+   * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+   * or other flags like `["-f"]`.
+   * 
+ * + * repeated string parameters = 4; + * + * @return The count of parameters. + */ + public int getParametersCount() { + return parameters_.size(); + } + /** + * + * + *
+   * Parameters for the Airflow command/subcommand as an array of arguments.
+   * It may contain positional arguments like `["my-dag-id"]`, key-value
+   * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+   * or other flags like `["-f"]`.
+   * 
+ * + * repeated string parameters = 4; + * + * @param index The index of the element to return. + * @return The parameters at the given index. + */ + public java.lang.String getParameters(int index) { + return parameters_.get(index); + } + /** + * + * + *
+   * Parameters for the Airflow command/subcommand as an array of arguments.
+   * It may contain positional arguments like `["my-dag-id"]`, key-value
+   * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+   * or other flags like `["-f"]`.
+   * 
+ * + * repeated string parameters = 4; + * + * @param index The index of the value to return. + * @return The bytes of the parameters at the given index. + */ + public com.google.protobuf.ByteString getParametersBytes(int index) { + return parameters_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, environment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(command_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, command_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subcommand_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, subcommand_); + } + for (int i = 0; i < parameters_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parameters_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, environment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(command_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, command_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subcommand_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, subcommand_); + } + { + int dataSize = 0; + for (int i = 0; i < parameters_.size(); i++) { + dataSize += computeStringSizeNoTag(parameters_.getRaw(i)); + } + size += dataSize; + size += 1 * getParametersList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest other = + (com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest) obj; + + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!getCommand().equals(other.getCommand())) return false; + if (!getSubcommand().equals(other.getSubcommand())) return false; + if (!getParametersList().equals(other.getParametersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + hash = (37 * hash) + COMMAND_FIELD_NUMBER; + hash = (53 * hash) + getCommand().hashCode(); + hash = (37 * hash) + SUBCOMMAND_FIELD_NUMBER; + hash = (53 * hash) + getSubcommand().hashCode(); + if (getParametersCount() > 0) { + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParametersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Execute Airflow Command request.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest) + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ExecuteAirflowCommandRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ExecuteAirflowCommandRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + .class, + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + environment_ = ""; + command_ = ""; + subcommand_ = ""; + parameters_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ExecuteAirflowCommandRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + build() { + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest result = + new com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.environment_ = environment_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.command_ = command_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.subcommand_ = subcommand_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + parameters_.makeImmutable(); + result.parameters_ = parameters_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + .getDefaultInstance()) return this; + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCommand().isEmpty()) { + command_ = other.command_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSubcommand().isEmpty()) { + subcommand_ = other.subcommand_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.parameters_.isEmpty()) { + if (parameters_.isEmpty()) { + parameters_ = other.parameters_; + bitField0_ |= 0x00000008; + } else { + ensureParametersIsMutable(); + parameters_.addAll(other.parameters_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + environment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + command_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + subcommand_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureParametersIsMutable(); + parameters_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + environment_ = getDefaultInstance().getEnvironment(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object command_ = ""; + /** + * + * + *
+     * Airflow command.
+     * 
+ * + * string command = 2; + * + * @return The command. + */ + public java.lang.String getCommand() { + java.lang.Object ref = command_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + command_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Airflow command.
+     * 
+ * + * string command = 2; + * + * @return The bytes for command. + */ + public com.google.protobuf.ByteString getCommandBytes() { + java.lang.Object ref = command_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + command_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Airflow command.
+     * 
+ * + * string command = 2; + * + * @param value The command to set. + * @return This builder for chaining. + */ + public Builder setCommand(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + command_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Airflow command.
+     * 
+ * + * string command = 2; + * + * @return This builder for chaining. + */ + public Builder clearCommand() { + command_ = getDefaultInstance().getCommand(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Airflow command.
+     * 
+ * + * string command = 2; + * + * @param value The bytes for command to set. + * @return This builder for chaining. + */ + public Builder setCommandBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + command_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object subcommand_ = ""; + /** + * + * + *
+     * Airflow subcommand.
+     * 
+ * + * string subcommand = 3; + * + * @return The subcommand. + */ + public java.lang.String getSubcommand() { + java.lang.Object ref = subcommand_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subcommand_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Airflow subcommand.
+     * 
+ * + * string subcommand = 3; + * + * @return The bytes for subcommand. + */ + public com.google.protobuf.ByteString getSubcommandBytes() { + java.lang.Object ref = subcommand_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subcommand_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Airflow subcommand.
+     * 
+ * + * string subcommand = 3; + * + * @param value The subcommand to set. + * @return This builder for chaining. + */ + public Builder setSubcommand(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + subcommand_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Airflow subcommand.
+     * 
+ * + * string subcommand = 3; + * + * @return This builder for chaining. + */ + public Builder clearSubcommand() { + subcommand_ = getDefaultInstance().getSubcommand(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Airflow subcommand.
+     * 
+ * + * string subcommand = 3; + * + * @param value The bytes for subcommand to set. + * @return This builder for chaining. + */ + public Builder setSubcommandBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + subcommand_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList parameters_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureParametersIsMutable() { + if (!parameters_.isModifiable()) { + parameters_ = new com.google.protobuf.LazyStringArrayList(parameters_); + } + bitField0_ |= 0x00000008; + } + /** + * + * + *
+     * Parameters for the Airflow command/subcommand as an array of arguments.
+     * It may contain positional arguments like `["my-dag-id"]`, key-value
+     * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+     * or other flags like `["-f"]`.
+     * 
+ * + * repeated string parameters = 4; + * + * @return A list containing the parameters. + */ + public com.google.protobuf.ProtocolStringList getParametersList() { + parameters_.makeImmutable(); + return parameters_; + } + /** + * + * + *
+     * Parameters for the Airflow command/subcommand as an array of arguments.
+     * It may contain positional arguments like `["my-dag-id"]`, key-value
+     * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+     * or other flags like `["-f"]`.
+     * 
+ * + * repeated string parameters = 4; + * + * @return The count of parameters. + */ + public int getParametersCount() { + return parameters_.size(); + } + /** + * + * + *
+     * Parameters for the Airflow command/subcommand as an array of arguments.
+     * It may contain positional arguments like `["my-dag-id"]`, key-value
+     * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+     * or other flags like `["-f"]`.
+     * 
+ * + * repeated string parameters = 4; + * + * @param index The index of the element to return. + * @return The parameters at the given index. + */ + public java.lang.String getParameters(int index) { + return parameters_.get(index); + } + /** + * + * + *
+     * Parameters for the Airflow command/subcommand as an array of arguments.
+     * It may contain positional arguments like `["my-dag-id"]`, key-value
+     * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+     * or other flags like `["-f"]`.
+     * 
+ * + * repeated string parameters = 4; + * + * @param index The index of the value to return. + * @return The bytes of the parameters at the given index. + */ + public com.google.protobuf.ByteString getParametersBytes(int index) { + return parameters_.getByteString(index); + } + /** + * + * + *
+     * Parameters for the Airflow command/subcommand as an array of arguments.
+     * It may contain positional arguments like `["my-dag-id"]`, key-value
+     * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+     * or other flags like `["-f"]`.
+     * 
+ * + * repeated string parameters = 4; + * + * @param index The index to set the value at. + * @param value The parameters to set. + * @return This builder for chaining. + */ + public Builder setParameters(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters for the Airflow command/subcommand as an array of arguments.
+     * It may contain positional arguments like `["my-dag-id"]`, key-value
+     * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+     * or other flags like `["-f"]`.
+     * 
+ * + * repeated string parameters = 4; + * + * @param value The parameters to add. + * @return This builder for chaining. + */ + public Builder addParameters(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters for the Airflow command/subcommand as an array of arguments.
+     * It may contain positional arguments like `["my-dag-id"]`, key-value
+     * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+     * or other flags like `["-f"]`.
+     * 
+ * + * repeated string parameters = 4; + * + * @param values The parameters to add. + * @return This builder for chaining. + */ + public Builder addAllParameters(java.lang.Iterable values) { + ensureParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parameters_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters for the Airflow command/subcommand as an array of arguments.
+     * It may contain positional arguments like `["my-dag-id"]`, key-value
+     * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+     * or other flags like `["-f"]`.
+     * 
+ * + * repeated string parameters = 4; + * + * @return This builder for chaining. + */ + public Builder clearParameters() { + parameters_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Parameters for the Airflow command/subcommand as an array of arguments.
+     * It may contain positional arguments like `["my-dag-id"]`, key-value
+     * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+     * or other flags like `["-f"]`.
+     * 
+ * + * repeated string parameters = 4; + * + * @param value The bytes of the parameters to add. + * @return This builder for chaining. + */ + public Builder addParametersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureParametersIsMutable(); + parameters_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest) + private static final com.google.cloud.orchestration.airflow.service.v1beta1 + .ExecuteAirflowCommandRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecuteAirflowCommandRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ExecuteAirflowCommandRequestOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ExecuteAirflowCommandRequestOrBuilder.java new file mode 100644 index 000000000000..a04e16e976c6 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ExecuteAirflowCommandRequestOrBuilder.java @@ -0,0 +1,165 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface ExecuteAirflowCommandRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); + + /** + * + * + *
+   * Airflow command.
+   * 
+ * + * string command = 2; + * + * @return The command. + */ + java.lang.String getCommand(); + /** + * + * + *
+   * Airflow command.
+   * 
+ * + * string command = 2; + * + * @return The bytes for command. + */ + com.google.protobuf.ByteString getCommandBytes(); + + /** + * + * + *
+   * Airflow subcommand.
+   * 
+ * + * string subcommand = 3; + * + * @return The subcommand. + */ + java.lang.String getSubcommand(); + /** + * + * + *
+   * Airflow subcommand.
+   * 
+ * + * string subcommand = 3; + * + * @return The bytes for subcommand. + */ + com.google.protobuf.ByteString getSubcommandBytes(); + + /** + * + * + *
+   * Parameters for the Airflow command/subcommand as an array of arguments.
+   * It may contain positional arguments like `["my-dag-id"]`, key-value
+   * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+   * or other flags like `["-f"]`.
+   * 
+ * + * repeated string parameters = 4; + * + * @return A list containing the parameters. + */ + java.util.List getParametersList(); + /** + * + * + *
+   * Parameters for the Airflow command/subcommand as an array of arguments.
+   * It may contain positional arguments like `["my-dag-id"]`, key-value
+   * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+   * or other flags like `["-f"]`.
+   * 
+ * + * repeated string parameters = 4; + * + * @return The count of parameters. + */ + int getParametersCount(); + /** + * + * + *
+   * Parameters for the Airflow command/subcommand as an array of arguments.
+   * It may contain positional arguments like `["my-dag-id"]`, key-value
+   * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+   * or other flags like `["-f"]`.
+   * 
+ * + * repeated string parameters = 4; + * + * @param index The index of the element to return. + * @return The parameters at the given index. + */ + java.lang.String getParameters(int index); + /** + * + * + *
+   * Parameters for the Airflow command/subcommand as an array of arguments.
+   * It may contain positional arguments like `["my-dag-id"]`, key-value
+   * parameters like `["--foo=bar"]` or `["--foo","bar"]`,
+   * or other flags like `["-f"]`.
+   * 
+ * + * repeated string parameters = 4; + * + * @param index The index of the value to return. + * @return The bytes of the parameters at the given index. + */ + com.google.protobuf.ByteString getParametersBytes(int index); +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/FetchDatabasePropertiesRequest.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/FetchDatabasePropertiesRequest.java new file mode 100644 index 000000000000..06059e327910 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/FetchDatabasePropertiesRequest.java @@ -0,0 +1,697 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Request to fetch properties of environment's database.
+ * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest} + */ +public final class FetchDatabasePropertiesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest) + FetchDatabasePropertiesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use FetchDatabasePropertiesRequest.newBuilder() to construct. + private FetchDatabasePropertiesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FetchDatabasePropertiesRequest() { + environment_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FetchDatabasePropertiesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + .class, + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + .Builder.class); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object environment_ = ""; + /** + * + * + *
+   * Required. The resource name of the environment, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the environment, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, environment_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, environment_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest other = + (com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest) obj; + + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request to fetch properties of environment's database.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest) + com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + .class, + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + environment_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + build() { + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest result = + new com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.environment_ = environment_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + .getDefaultInstance()) return this; + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + environment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * Required. The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + environment_ = getDefaultInstance().getEnvironment(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest) + private static final com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FetchDatabasePropertiesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/FetchDatabasePropertiesRequestOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/FetchDatabasePropertiesRequestOrBuilder.java new file mode 100644 index 000000000000..eb440e15f393 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/FetchDatabasePropertiesRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface FetchDatabasePropertiesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the environment, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * Required. The resource name of the environment, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * + * string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/FetchDatabasePropertiesResponse.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/FetchDatabasePropertiesResponse.java new file mode 100644 index 000000000000..c70efac14d29 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/FetchDatabasePropertiesResponse.java @@ -0,0 +1,969 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Response for FetchDatabasePropertiesRequest.
+ * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse} + */ +public final class FetchDatabasePropertiesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse) + FetchDatabasePropertiesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use FetchDatabasePropertiesResponse.newBuilder() to construct. + private FetchDatabasePropertiesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FetchDatabasePropertiesResponse() { + primaryGceZone_ = ""; + secondaryGceZone_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FetchDatabasePropertiesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + .class, + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + .Builder.class); + } + + public static final int PRIMARY_GCE_ZONE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object primaryGceZone_ = ""; + /** + * + * + *
+   * The Compute Engine zone that the instance is currently serving from.
+   * 
+ * + * string primary_gce_zone = 1; + * + * @return The primaryGceZone. + */ + @java.lang.Override + public java.lang.String getPrimaryGceZone() { + java.lang.Object ref = primaryGceZone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + primaryGceZone_ = s; + return s; + } + } + /** + * + * + *
+   * The Compute Engine zone that the instance is currently serving from.
+   * 
+ * + * string primary_gce_zone = 1; + * + * @return The bytes for primaryGceZone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrimaryGceZoneBytes() { + java.lang.Object ref = primaryGceZone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + primaryGceZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SECONDARY_GCE_ZONE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object secondaryGceZone_ = ""; + /** + * + * + *
+   * The Compute Engine zone that the failover instance is currently serving
+   * from for a regional Cloud SQL instance.
+   * 
+ * + * string secondary_gce_zone = 2; + * + * @return The secondaryGceZone. + */ + @java.lang.Override + public java.lang.String getSecondaryGceZone() { + java.lang.Object ref = secondaryGceZone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secondaryGceZone_ = s; + return s; + } + } + /** + * + * + *
+   * The Compute Engine zone that the failover instance is currently serving
+   * from for a regional Cloud SQL instance.
+   * 
+ * + * string secondary_gce_zone = 2; + * + * @return The bytes for secondaryGceZone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecondaryGceZoneBytes() { + java.lang.Object ref = secondaryGceZone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secondaryGceZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_FAILOVER_REPLICA_AVAILABLE_FIELD_NUMBER = 3; + private boolean isFailoverReplicaAvailable_ = false; + /** + * + * + *
+   * The availability status of the failover replica. A false status indicates
+   * that the failover replica is out of sync. The primary instance can only
+   * fail over to the failover replica when the status is true.
+   * 
+ * + * bool is_failover_replica_available = 3; + * + * @return The isFailoverReplicaAvailable. + */ + @java.lang.Override + public boolean getIsFailoverReplicaAvailable() { + return isFailoverReplicaAvailable_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryGceZone_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, primaryGceZone_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secondaryGceZone_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, secondaryGceZone_); + } + if (isFailoverReplicaAvailable_ != false) { + output.writeBool(3, isFailoverReplicaAvailable_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(primaryGceZone_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, primaryGceZone_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secondaryGceZone_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, secondaryGceZone_); + } + if (isFailoverReplicaAvailable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isFailoverReplicaAvailable_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse other = + (com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse) + obj; + + if (!getPrimaryGceZone().equals(other.getPrimaryGceZone())) return false; + if (!getSecondaryGceZone().equals(other.getSecondaryGceZone())) return false; + if (getIsFailoverReplicaAvailable() != other.getIsFailoverReplicaAvailable()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PRIMARY_GCE_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getPrimaryGceZone().hashCode(); + hash = (37 * hash) + SECONDARY_GCE_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getSecondaryGceZone().hashCode(); + hash = (37 * hash) + IS_FAILOVER_REPLICA_AVAILABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsFailoverReplicaAvailable()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response for FetchDatabasePropertiesRequest.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse) + com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + .class, + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + primaryGceZone_ = ""; + secondaryGceZone_ = ""; + isFailoverReplicaAvailable_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_FetchDatabasePropertiesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + build() { + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + result = + new com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.primaryGceZone_ = primaryGceZone_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.secondaryGceZone_ = secondaryGceZone_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.isFailoverReplicaAvailable_ = isFailoverReplicaAvailable_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + .getDefaultInstance()) return this; + if (!other.getPrimaryGceZone().isEmpty()) { + primaryGceZone_ = other.primaryGceZone_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSecondaryGceZone().isEmpty()) { + secondaryGceZone_ = other.secondaryGceZone_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getIsFailoverReplicaAvailable() != false) { + setIsFailoverReplicaAvailable(other.getIsFailoverReplicaAvailable()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + primaryGceZone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + secondaryGceZone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + isFailoverReplicaAvailable_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object primaryGceZone_ = ""; + /** + * + * + *
+     * The Compute Engine zone that the instance is currently serving from.
+     * 
+ * + * string primary_gce_zone = 1; + * + * @return The primaryGceZone. + */ + public java.lang.String getPrimaryGceZone() { + java.lang.Object ref = primaryGceZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + primaryGceZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Compute Engine zone that the instance is currently serving from.
+     * 
+ * + * string primary_gce_zone = 1; + * + * @return The bytes for primaryGceZone. + */ + public com.google.protobuf.ByteString getPrimaryGceZoneBytes() { + java.lang.Object ref = primaryGceZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + primaryGceZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Compute Engine zone that the instance is currently serving from.
+     * 
+ * + * string primary_gce_zone = 1; + * + * @param value The primaryGceZone to set. + * @return This builder for chaining. + */ + public Builder setPrimaryGceZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + primaryGceZone_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The Compute Engine zone that the instance is currently serving from.
+     * 
+ * + * string primary_gce_zone = 1; + * + * @return This builder for chaining. + */ + public Builder clearPrimaryGceZone() { + primaryGceZone_ = getDefaultInstance().getPrimaryGceZone(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The Compute Engine zone that the instance is currently serving from.
+     * 
+ * + * string primary_gce_zone = 1; + * + * @param value The bytes for primaryGceZone to set. + * @return This builder for chaining. + */ + public Builder setPrimaryGceZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + primaryGceZone_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object secondaryGceZone_ = ""; + /** + * + * + *
+     * The Compute Engine zone that the failover instance is currently serving
+     * from for a regional Cloud SQL instance.
+     * 
+ * + * string secondary_gce_zone = 2; + * + * @return The secondaryGceZone. + */ + public java.lang.String getSecondaryGceZone() { + java.lang.Object ref = secondaryGceZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secondaryGceZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The Compute Engine zone that the failover instance is currently serving
+     * from for a regional Cloud SQL instance.
+     * 
+ * + * string secondary_gce_zone = 2; + * + * @return The bytes for secondaryGceZone. + */ + public com.google.protobuf.ByteString getSecondaryGceZoneBytes() { + java.lang.Object ref = secondaryGceZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secondaryGceZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The Compute Engine zone that the failover instance is currently serving
+     * from for a regional Cloud SQL instance.
+     * 
+ * + * string secondary_gce_zone = 2; + * + * @param value The secondaryGceZone to set. + * @return This builder for chaining. + */ + public Builder setSecondaryGceZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + secondaryGceZone_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The Compute Engine zone that the failover instance is currently serving
+     * from for a regional Cloud SQL instance.
+     * 
+ * + * string secondary_gce_zone = 2; + * + * @return This builder for chaining. + */ + public Builder clearSecondaryGceZone() { + secondaryGceZone_ = getDefaultInstance().getSecondaryGceZone(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The Compute Engine zone that the failover instance is currently serving
+     * from for a regional Cloud SQL instance.
+     * 
+ * + * string secondary_gce_zone = 2; + * + * @param value The bytes for secondaryGceZone to set. + * @return This builder for chaining. + */ + public Builder setSecondaryGceZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + secondaryGceZone_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean isFailoverReplicaAvailable_; + /** + * + * + *
+     * The availability status of the failover replica. A false status indicates
+     * that the failover replica is out of sync. The primary instance can only
+     * fail over to the failover replica when the status is true.
+     * 
+ * + * bool is_failover_replica_available = 3; + * + * @return The isFailoverReplicaAvailable. + */ + @java.lang.Override + public boolean getIsFailoverReplicaAvailable() { + return isFailoverReplicaAvailable_; + } + /** + * + * + *
+     * The availability status of the failover replica. A false status indicates
+     * that the failover replica is out of sync. The primary instance can only
+     * fail over to the failover replica when the status is true.
+     * 
+ * + * bool is_failover_replica_available = 3; + * + * @param value The isFailoverReplicaAvailable to set. + * @return This builder for chaining. + */ + public Builder setIsFailoverReplicaAvailable(boolean value) { + + isFailoverReplicaAvailable_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The availability status of the failover replica. A false status indicates
+     * that the failover replica is out of sync. The primary instance can only
+     * fail over to the failover replica when the status is true.
+     * 
+ * + * bool is_failover_replica_available = 3; + * + * @return This builder for chaining. + */ + public Builder clearIsFailoverReplicaAvailable() { + bitField0_ = (bitField0_ & ~0x00000004); + isFailoverReplicaAvailable_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse) + private static final com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .FetchDatabasePropertiesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FetchDatabasePropertiesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/FetchDatabasePropertiesResponseOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/FetchDatabasePropertiesResponseOrBuilder.java new file mode 100644 index 000000000000..18b361429453 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/FetchDatabasePropertiesResponseOrBuilder.java @@ -0,0 +1,92 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface FetchDatabasePropertiesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Compute Engine zone that the instance is currently serving from.
+   * 
+ * + * string primary_gce_zone = 1; + * + * @return The primaryGceZone. + */ + java.lang.String getPrimaryGceZone(); + /** + * + * + *
+   * The Compute Engine zone that the instance is currently serving from.
+   * 
+ * + * string primary_gce_zone = 1; + * + * @return The bytes for primaryGceZone. + */ + com.google.protobuf.ByteString getPrimaryGceZoneBytes(); + + /** + * + * + *
+   * The Compute Engine zone that the failover instance is currently serving
+   * from for a regional Cloud SQL instance.
+   * 
+ * + * string secondary_gce_zone = 2; + * + * @return The secondaryGceZone. + */ + java.lang.String getSecondaryGceZone(); + /** + * + * + *
+   * The Compute Engine zone that the failover instance is currently serving
+   * from for a regional Cloud SQL instance.
+   * 
+ * + * string secondary_gce_zone = 2; + * + * @return The bytes for secondaryGceZone. + */ + com.google.protobuf.ByteString getSecondaryGceZoneBytes(); + + /** + * + * + *
+   * The availability status of the failover replica. A false status indicates
+   * that the failover replica is out of sync. The primary instance can only
+   * fail over to the failover replica when the status is true.
+   * 
+ * + * bool is_failover_replica_available = 3; + * + * @return The isFailoverReplicaAvailable. + */ + boolean getIsFailoverReplicaAvailable(); +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/OperationMetadata.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/OperationMetadata.java index eb4b89b6ba21..2995ef54549a 100644 --- a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/OperationMetadata.java +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/OperationMetadata.java @@ -350,6 +350,17 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * LOAD_SNAPSHOT = 6; */ LOAD_SNAPSHOT(6), + /** + * + * + *
+     * Triggers failover of environment's Cloud SQL instance (only for highly
+     * resilient environments).
+     * 
+ * + * DATABASE_FAILOVER = 7; + */ + DATABASE_FAILOVER(7), UNRECOGNIZED(-1), ; @@ -423,6 +434,17 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * LOAD_SNAPSHOT = 6; */ public static final int LOAD_SNAPSHOT_VALUE = 6; + /** + * + * + *
+     * Triggers failover of environment's Cloud SQL instance (only for highly
+     * resilient environments).
+     * 
+ * + * DATABASE_FAILOVER = 7; + */ + public static final int DATABASE_FAILOVER_VALUE = 7; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -462,6 +484,8 @@ public static Type forNumber(int value) { return SAVE_SNAPSHOT; case 6: return LOAD_SNAPSHOT; + case 7: + return DATABASE_FAILOVER; default: return null; } diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/OperationsProto.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/OperationsProto.java index c8d553f1e959..2e0e30c5c62b 100644 --- a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/OperationsProto.java +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/OperationsProto.java @@ -43,7 +43,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\nCgoogle/cloud/orchestration/airflow/ser" + "vice/v1beta1/operations.proto\0222google.cl" + "oud.orchestration.airflow.service.v1beta" - + "1\032\037google/protobuf/timestamp.proto\"\244\004\n\021O" + + "1\032\037google/protobuf/timestamp.proto\"\274\004\n\021O" + "perationMetadata\022Z\n\005state\030\001 \001(\0162K.google" + ".cloud.orchestration.airflow.service.v1b" + "eta1.OperationMetadata.State\022b\n\016operatio" @@ -54,14 +54,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "protobuf.Timestamp\022,\n\010end_time\030\006 \001(\0132\032.g" + "oogle.protobuf.Timestamp\"T\n\005State\022\025\n\021STA" + "TE_UNSPECIFIED\020\000\022\013\n\007PENDING\020\001\022\013\n\007RUNNING" - + "\020\002\022\016\n\nSUCCESSFUL\020\003\022\n\n\006FAILED\020\004\"q\n\004Type\022\024" - + "\n\020TYPE_UNSPECIFIED\020\000\022\n\n\006CREATE\020\001\022\n\n\006DELE" - + "TE\020\002\022\n\n\006UPDATE\020\003\022\t\n\005CHECK\020\004\022\021\n\rSAVE_SNAP" - + "SHOT\020\005\022\021\n\rLOAD_SNAPSHOT\020\006B\235\001\n6com.google" - + ".cloud.orchestration.airflow.service.v1b" - + "eta1B\017OperationsProtoP\001ZPcloud.google.co" - + "m/go/orchestration/airflow/service/apiv1" - + "beta1/servicepb;servicepbb\006proto3" + + "\020\002\022\016\n\nSUCCESSFUL\020\003\022\n\n\006FAILED\020\004\"\210\001\n\004Type\022" + + "\024\n\020TYPE_UNSPECIFIED\020\000\022\n\n\006CREATE\020\001\022\n\n\006DEL" + + "ETE\020\002\022\n\n\006UPDATE\020\003\022\t\n\005CHECK\020\004\022\021\n\rSAVE_SNA" + + "PSHOT\020\005\022\021\n\rLOAD_SNAPSHOT\020\006\022\025\n\021DATABASE_F" + + "AILOVER\020\007B\235\001\n6com.google.cloud.orchestra" + + "tion.airflow.service.v1beta1B\017Operations" + + "ProtoP\001ZPcloud.google.com/go/orchestrati" + + "on/airflow/service/apiv1beta1/servicepb;" + + "servicepbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PollAirflowCommandRequest.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PollAirflowCommandRequest.java new file mode 100644 index 000000000000..5a6605cff649 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PollAirflowCommandRequest.java @@ -0,0 +1,1303 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Poll Airflow Command request.
+ * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest} + */ +public final class PollAirflowCommandRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest) + PollAirflowCommandRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use PollAirflowCommandRequest.newBuilder() to construct. + private PollAirflowCommandRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PollAirflowCommandRequest() { + environment_ = ""; + executionId_ = ""; + pod_ = ""; + podNamespace_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PollAirflowCommandRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_PollAirflowCommandRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_PollAirflowCommandRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest.Builder + .class); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object environment_ = ""; + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXECUTION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object executionId_ = ""; + /** + * + * + *
+   * The unique ID of the command execution.
+   * 
+ * + * string execution_id = 2; + * + * @return The executionId. + */ + @java.lang.Override + public java.lang.String getExecutionId() { + java.lang.Object ref = executionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + executionId_ = s; + return s; + } + } + /** + * + * + *
+   * The unique ID of the command execution.
+   * 
+ * + * string execution_id = 2; + * + * @return The bytes for executionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExecutionIdBytes() { + java.lang.Object ref = executionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + executionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POD_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pod_ = ""; + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 3; + * + * @return The pod. + */ + @java.lang.Override + public java.lang.String getPod() { + java.lang.Object ref = pod_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pod_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 3; + * + * @return The bytes for pod. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPodBytes() { + java.lang.Object ref = pod_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pod_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POD_NAMESPACE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object podNamespace_ = ""; + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 4; + * + * @return The podNamespace. + */ + @java.lang.Override + public java.lang.String getPodNamespace() { + java.lang.Object ref = podNamespace_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + podNamespace_ = s; + return s; + } + } + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 4; + * + * @return The bytes for podNamespace. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPodNamespaceBytes() { + java.lang.Object ref = podNamespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + podNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NEXT_LINE_NUMBER_FIELD_NUMBER = 5; + private int nextLineNumber_ = 0; + /** + * + * + *
+   * Line number from which new logs should be fetched.
+   * 
+ * + * int32 next_line_number = 5; + * + * @return The nextLineNumber. + */ + @java.lang.Override + public int getNextLineNumber() { + return nextLineNumber_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, environment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, executionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pod_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(podNamespace_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, podNamespace_); + } + if (nextLineNumber_ != 0) { + output.writeInt32(5, nextLineNumber_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, environment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, executionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pod_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(podNamespace_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, podNamespace_); + } + if (nextLineNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, nextLineNumber_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest other = + (com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest) obj; + + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!getExecutionId().equals(other.getExecutionId())) return false; + if (!getPod().equals(other.getPod())) return false; + if (!getPodNamespace().equals(other.getPodNamespace())) return false; + if (getNextLineNumber() != other.getNextLineNumber()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + hash = (37 * hash) + EXECUTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getExecutionId().hashCode(); + hash = (37 * hash) + POD_FIELD_NUMBER; + hash = (53 * hash) + getPod().hashCode(); + hash = (37 * hash) + POD_NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getPodNamespace().hashCode(); + hash = (37 * hash) + NEXT_LINE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getNextLineNumber(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Poll Airflow Command request.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest) + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_PollAirflowCommandRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_PollAirflowCommandRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + .class, + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + environment_ = ""; + executionId_ = ""; + pod_ = ""; + podNamespace_ = ""; + nextLineNumber_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_PollAirflowCommandRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + build() { + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest result = + new com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.environment_ = environment_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.executionId_ = executionId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pod_ = pod_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.podNamespace_ = podNamespace_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.nextLineNumber_ = nextLineNumber_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + .getDefaultInstance()) return this; + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getExecutionId().isEmpty()) { + executionId_ = other.executionId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPod().isEmpty()) { + pod_ = other.pod_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getPodNamespace().isEmpty()) { + podNamespace_ = other.podNamespace_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getNextLineNumber() != 0) { + setNextLineNumber(other.getNextLineNumber()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + environment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + executionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + pod_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + podNamespace_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + nextLineNumber_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + environment_ = getDefaultInstance().getEnvironment(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object executionId_ = ""; + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @return The executionId. + */ + public java.lang.String getExecutionId() { + java.lang.Object ref = executionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + executionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @return The bytes for executionId. + */ + public com.google.protobuf.ByteString getExecutionIdBytes() { + java.lang.Object ref = executionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + executionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @param value The executionId to set. + * @return This builder for chaining. + */ + public Builder setExecutionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + executionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearExecutionId() { + executionId_ = getDefaultInstance().getExecutionId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @param value The bytes for executionId to set. + * @return This builder for chaining. + */ + public Builder setExecutionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + executionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object pod_ = ""; + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @return The pod. + */ + public java.lang.String getPod() { + java.lang.Object ref = pod_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pod_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @return The bytes for pod. + */ + public com.google.protobuf.ByteString getPodBytes() { + java.lang.Object ref = pod_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pod_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @param value The pod to set. + * @return This builder for chaining. + */ + public Builder setPod(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pod_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @return This builder for chaining. + */ + public Builder clearPod() { + pod_ = getDefaultInstance().getPod(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @param value The bytes for pod to set. + * @return This builder for chaining. + */ + public Builder setPodBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pod_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object podNamespace_ = ""; + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @return The podNamespace. + */ + public java.lang.String getPodNamespace() { + java.lang.Object ref = podNamespace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + podNamespace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @return The bytes for podNamespace. + */ + public com.google.protobuf.ByteString getPodNamespaceBytes() { + java.lang.Object ref = podNamespace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + podNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @param value The podNamespace to set. + * @return This builder for chaining. + */ + public Builder setPodNamespace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + podNamespace_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @return This builder for chaining. + */ + public Builder clearPodNamespace() { + podNamespace_ = getDefaultInstance().getPodNamespace(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @param value The bytes for podNamespace to set. + * @return This builder for chaining. + */ + public Builder setPodNamespaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + podNamespace_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int nextLineNumber_; + /** + * + * + *
+     * Line number from which new logs should be fetched.
+     * 
+ * + * int32 next_line_number = 5; + * + * @return The nextLineNumber. + */ + @java.lang.Override + public int getNextLineNumber() { + return nextLineNumber_; + } + /** + * + * + *
+     * Line number from which new logs should be fetched.
+     * 
+ * + * int32 next_line_number = 5; + * + * @param value The nextLineNumber to set. + * @return This builder for chaining. + */ + public Builder setNextLineNumber(int value) { + + nextLineNumber_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Line number from which new logs should be fetched.
+     * 
+ * + * int32 next_line_number = 5; + * + * @return This builder for chaining. + */ + public Builder clearNextLineNumber() { + bitField0_ = (bitField0_ & ~0x00000010); + nextLineNumber_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest) + private static final com.google.cloud.orchestration.airflow.service.v1beta1 + .PollAirflowCommandRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PollAirflowCommandRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PollAirflowCommandRequestOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PollAirflowCommandRequestOrBuilder.java new file mode 100644 index 000000000000..6d1eae177ac7 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PollAirflowCommandRequestOrBuilder.java @@ -0,0 +1,140 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface PollAirflowCommandRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); + + /** + * + * + *
+   * The unique ID of the command execution.
+   * 
+ * + * string execution_id = 2; + * + * @return The executionId. + */ + java.lang.String getExecutionId(); + /** + * + * + *
+   * The unique ID of the command execution.
+   * 
+ * + * string execution_id = 2; + * + * @return The bytes for executionId. + */ + com.google.protobuf.ByteString getExecutionIdBytes(); + + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 3; + * + * @return The pod. + */ + java.lang.String getPod(); + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 3; + * + * @return The bytes for pod. + */ + com.google.protobuf.ByteString getPodBytes(); + + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 4; + * + * @return The podNamespace. + */ + java.lang.String getPodNamespace(); + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 4; + * + * @return The bytes for podNamespace. + */ + com.google.protobuf.ByteString getPodNamespaceBytes(); + + /** + * + * + *
+   * Line number from which new logs should be fetched.
+   * 
+ * + * int32 next_line_number = 5; + * + * @return The nextLineNumber. + */ + int getNextLineNumber(); +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/StopAirflowCommandRequest.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/StopAirflowCommandRequest.java new file mode 100644 index 000000000000..735671d019b5 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/StopAirflowCommandRequest.java @@ -0,0 +1,1307 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Stop Airflow Command request.
+ * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest} + */ +public final class StopAirflowCommandRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest) + StopAirflowCommandRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StopAirflowCommandRequest.newBuilder() to construct. + private StopAirflowCommandRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StopAirflowCommandRequest() { + environment_ = ""; + executionId_ = ""; + pod_ = ""; + podNamespace_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StopAirflowCommandRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest.Builder + .class); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object environment_ = ""; + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXECUTION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object executionId_ = ""; + /** + * + * + *
+   * The unique ID of the command execution.
+   * 
+ * + * string execution_id = 2; + * + * @return The executionId. + */ + @java.lang.Override + public java.lang.String getExecutionId() { + java.lang.Object ref = executionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + executionId_ = s; + return s; + } + } + /** + * + * + *
+   * The unique ID of the command execution.
+   * 
+ * + * string execution_id = 2; + * + * @return The bytes for executionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExecutionIdBytes() { + java.lang.Object ref = executionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + executionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POD_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pod_ = ""; + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 3; + * + * @return The pod. + */ + @java.lang.Override + public java.lang.String getPod() { + java.lang.Object ref = pod_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pod_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 3; + * + * @return The bytes for pod. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPodBytes() { + java.lang.Object ref = pod_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pod_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POD_NAMESPACE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object podNamespace_ = ""; + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 4; + * + * @return The podNamespace. + */ + @java.lang.Override + public java.lang.String getPodNamespace() { + java.lang.Object ref = podNamespace_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + podNamespace_ = s; + return s; + } + } + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 4; + * + * @return The bytes for podNamespace. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPodNamespaceBytes() { + java.lang.Object ref = podNamespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + podNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 5; + private boolean force_ = false; + /** + * + * + *
+   * If true, the execution is terminated forcefully (SIGKILL). If false, the
+   * execution is stopped gracefully, giving it time for cleanup.
+   * 
+ * + * bool force = 5; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, environment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, executionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pod_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(podNamespace_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, podNamespace_); + } + if (force_ != false) { + output.writeBool(5, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(environment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, environment_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, executionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pod_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(podNamespace_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, podNamespace_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, force_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest other = + (com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest) obj; + + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!getExecutionId().equals(other.getExecutionId())) return false; + if (!getPod().equals(other.getPod())) return false; + if (!getPodNamespace().equals(other.getPodNamespace())) return false; + if (getForce() != other.getForce()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + hash = (37 * hash) + EXECUTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getExecutionId().hashCode(); + hash = (37 * hash) + POD_FIELD_NUMBER; + hash = (53 * hash) + getPod().hashCode(); + hash = (37 * hash) + POD_NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getPodNamespace().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Stop Airflow Command request.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest) + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + .class, + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + environment_ = ""; + executionId_ = ""; + pod_ = ""; + podNamespace_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + build() { + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest result = + new com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.environment_ = environment_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.executionId_ = executionId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pod_ = pod_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.podNamespace_ = podNamespace_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + .getDefaultInstance()) return this; + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getExecutionId().isEmpty()) { + executionId_ = other.executionId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getPod().isEmpty()) { + pod_ = other.pod_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getPodNamespace().isEmpty()) { + podNamespace_ = other.podNamespace_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + environment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + executionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + pod_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + podNamespace_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + force_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + environment_ = getDefaultInstance().getEnvironment(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+     * 
+ * + * string environment = 1; + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + environment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object executionId_ = ""; + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @return The executionId. + */ + public java.lang.String getExecutionId() { + java.lang.Object ref = executionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + executionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @return The bytes for executionId. + */ + public com.google.protobuf.ByteString getExecutionIdBytes() { + java.lang.Object ref = executionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + executionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @param value The executionId to set. + * @return This builder for chaining. + */ + public Builder setExecutionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + executionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearExecutionId() { + executionId_ = getDefaultInstance().getExecutionId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique ID of the command execution.
+     * 
+ * + * string execution_id = 2; + * + * @param value The bytes for executionId to set. + * @return This builder for chaining. + */ + public Builder setExecutionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + executionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object pod_ = ""; + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @return The pod. + */ + public java.lang.String getPod() { + java.lang.Object ref = pod_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pod_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @return The bytes for pod. + */ + public com.google.protobuf.ByteString getPodBytes() { + java.lang.Object ref = pod_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pod_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @param value The pod to set. + * @return This builder for chaining. + */ + public Builder setPod(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pod_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @return This builder for chaining. + */ + public Builder clearPod() { + pod_ = getDefaultInstance().getPod(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the pod where the command is executed.
+     * 
+ * + * string pod = 3; + * + * @param value The bytes for pod to set. + * @return This builder for chaining. + */ + public Builder setPodBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pod_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object podNamespace_ = ""; + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @return The podNamespace. + */ + public java.lang.String getPodNamespace() { + java.lang.Object ref = podNamespace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + podNamespace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @return The bytes for podNamespace. + */ + public com.google.protobuf.ByteString getPodNamespaceBytes() { + java.lang.Object ref = podNamespace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + podNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @param value The podNamespace to set. + * @return This builder for chaining. + */ + public Builder setPodNamespace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + podNamespace_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @return This builder for chaining. + */ + public Builder clearPodNamespace() { + podNamespace_ = getDefaultInstance().getPodNamespace(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The namespace of the pod where the command is executed.
+     * 
+ * + * string pod_namespace = 4; + * + * @param value The bytes for podNamespace to set. + * @return This builder for chaining. + */ + public Builder setPodNamespaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + podNamespace_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private boolean force_; + /** + * + * + *
+     * If true, the execution is terminated forcefully (SIGKILL). If false, the
+     * execution is stopped gracefully, giving it time for cleanup.
+     * 
+ * + * bool force = 5; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * If true, the execution is terminated forcefully (SIGKILL). If false, the
+     * execution is stopped gracefully, giving it time for cleanup.
+     * 
+ * + * bool force = 5; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, the execution is terminated forcefully (SIGKILL). If false, the
+     * execution is stopped gracefully, giving it time for cleanup.
+     * 
+ * + * bool force = 5; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000010); + force_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest) + private static final com.google.cloud.orchestration.airflow.service.v1beta1 + .StopAirflowCommandRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StopAirflowCommandRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/StopAirflowCommandRequestOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/StopAirflowCommandRequestOrBuilder.java new file mode 100644 index 000000000000..4b63b57e486c --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/StopAirflowCommandRequestOrBuilder.java @@ -0,0 +1,141 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface StopAirflowCommandRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * The resource name of the environment in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}".
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); + + /** + * + * + *
+   * The unique ID of the command execution.
+   * 
+ * + * string execution_id = 2; + * + * @return The executionId. + */ + java.lang.String getExecutionId(); + /** + * + * + *
+   * The unique ID of the command execution.
+   * 
+ * + * string execution_id = 2; + * + * @return The bytes for executionId. + */ + com.google.protobuf.ByteString getExecutionIdBytes(); + + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 3; + * + * @return The pod. + */ + java.lang.String getPod(); + /** + * + * + *
+   * The name of the pod where the command is executed.
+   * 
+ * + * string pod = 3; + * + * @return The bytes for pod. + */ + com.google.protobuf.ByteString getPodBytes(); + + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 4; + * + * @return The podNamespace. + */ + java.lang.String getPodNamespace(); + /** + * + * + *
+   * The namespace of the pod where the command is executed.
+   * 
+ * + * string pod_namespace = 4; + * + * @return The bytes for podNamespace. + */ + com.google.protobuf.ByteString getPodNamespaceBytes(); + + /** + * + * + *
+   * If true, the execution is terminated forcefully (SIGKILL). If false, the
+   * execution is stopped gracefully, giving it time for cleanup.
+   * 
+ * + * bool force = 5; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/StopAirflowCommandResponse.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/StopAirflowCommandResponse.java new file mode 100644 index 000000000000..fc024a4fcf59 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/StopAirflowCommandResponse.java @@ -0,0 +1,845 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Response to StopAirflowCommandRequest.
+ * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse} + */ +public final class StopAirflowCommandResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse) + StopAirflowCommandResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StopAirflowCommandResponse.newBuilder() to construct. + private StopAirflowCommandResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StopAirflowCommandResponse() { + output_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StopAirflowCommandResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse.class, + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + .Builder.class); + } + + public static final int IS_DONE_FIELD_NUMBER = 1; + private boolean isDone_ = false; + /** + * + * + *
+   * Whether the execution is still running.
+   * 
+ * + * bool is_done = 1; + * + * @return The isDone. + */ + @java.lang.Override + public boolean getIsDone() { + return isDone_; + } + + public static final int OUTPUT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList output_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Output message from stopping execution request.
+   * 
+ * + * repeated string output = 2; + * + * @return A list containing the output. + */ + public com.google.protobuf.ProtocolStringList getOutputList() { + return output_; + } + /** + * + * + *
+   * Output message from stopping execution request.
+   * 
+ * + * repeated string output = 2; + * + * @return The count of output. + */ + public int getOutputCount() { + return output_.size(); + } + /** + * + * + *
+   * Output message from stopping execution request.
+   * 
+ * + * repeated string output = 2; + * + * @param index The index of the element to return. + * @return The output at the given index. + */ + public java.lang.String getOutput(int index) { + return output_.get(index); + } + /** + * + * + *
+   * Output message from stopping execution request.
+   * 
+ * + * repeated string output = 2; + * + * @param index The index of the value to return. + * @return The bytes of the output at the given index. + */ + public com.google.protobuf.ByteString getOutputBytes(int index) { + return output_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (isDone_ != false) { + output.writeBool(1, isDone_); + } + for (int i = 0; i < output_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, output_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (isDone_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, isDone_); + } + { + int dataSize = 0; + for (int i = 0; i < output_.size(); i++) { + dataSize += computeStringSizeNoTag(output_.getRaw(i)); + } + size += dataSize; + size += 1 * getOutputList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse other = + (com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse) obj; + + if (getIsDone() != other.getIsDone()) return false; + if (!getOutputList().equals(other.getOutputList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IS_DONE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsDone()); + if (getOutputCount() > 0) { + hash = (37 * hash) + OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getOutputList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response to StopAirflowCommandRequest.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse) + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + .class, + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + isDone_ = false; + output_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_StopAirflowCommandResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + build() { + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse result = + new com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.isDone_ = isDone_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + output_.makeImmutable(); + result.output_ = output_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + .getDefaultInstance()) return this; + if (other.getIsDone() != false) { + setIsDone(other.getIsDone()); + } + if (!other.output_.isEmpty()) { + if (output_.isEmpty()) { + output_ = other.output_; + bitField0_ |= 0x00000002; + } else { + ensureOutputIsMutable(); + output_.addAll(other.output_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + isDone_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureOutputIsMutable(); + output_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean isDone_; + /** + * + * + *
+     * Whether the execution is still running.
+     * 
+ * + * bool is_done = 1; + * + * @return The isDone. + */ + @java.lang.Override + public boolean getIsDone() { + return isDone_; + } + /** + * + * + *
+     * Whether the execution is still running.
+     * 
+ * + * bool is_done = 1; + * + * @param value The isDone to set. + * @return This builder for chaining. + */ + public Builder setIsDone(boolean value) { + + isDone_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the execution is still running.
+     * 
+ * + * bool is_done = 1; + * + * @return This builder for chaining. + */ + public Builder clearIsDone() { + bitField0_ = (bitField0_ & ~0x00000001); + isDone_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList output_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureOutputIsMutable() { + if (!output_.isModifiable()) { + output_ = new com.google.protobuf.LazyStringArrayList(output_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Output message from stopping execution request.
+     * 
+ * + * repeated string output = 2; + * + * @return A list containing the output. + */ + public com.google.protobuf.ProtocolStringList getOutputList() { + output_.makeImmutable(); + return output_; + } + /** + * + * + *
+     * Output message from stopping execution request.
+     * 
+ * + * repeated string output = 2; + * + * @return The count of output. + */ + public int getOutputCount() { + return output_.size(); + } + /** + * + * + *
+     * Output message from stopping execution request.
+     * 
+ * + * repeated string output = 2; + * + * @param index The index of the element to return. + * @return The output at the given index. + */ + public java.lang.String getOutput(int index) { + return output_.get(index); + } + /** + * + * + *
+     * Output message from stopping execution request.
+     * 
+ * + * repeated string output = 2; + * + * @param index The index of the value to return. + * @return The bytes of the output at the given index. + */ + public com.google.protobuf.ByteString getOutputBytes(int index) { + return output_.getByteString(index); + } + /** + * + * + *
+     * Output message from stopping execution request.
+     * 
+ * + * repeated string output = 2; + * + * @param index The index to set the value at. + * @param value The output to set. + * @return This builder for chaining. + */ + public Builder setOutput(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputIsMutable(); + output_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output message from stopping execution request.
+     * 
+ * + * repeated string output = 2; + * + * @param value The output to add. + * @return This builder for chaining. + */ + public Builder addOutput(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputIsMutable(); + output_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output message from stopping execution request.
+     * 
+ * + * repeated string output = 2; + * + * @param values The output to add. + * @return This builder for chaining. + */ + public Builder addAllOutput(java.lang.Iterable values) { + ensureOutputIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, output_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output message from stopping execution request.
+     * 
+ * + * repeated string output = 2; + * + * @return This builder for chaining. + */ + public Builder clearOutput() { + output_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Output message from stopping execution request.
+     * 
+ * + * repeated string output = 2; + * + * @param value The bytes of the output to add. + * @return This builder for chaining. + */ + public Builder addOutputBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureOutputIsMutable(); + output_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse) + private static final com.google.cloud.orchestration.airflow.service.v1beta1 + .StopAirflowCommandResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StopAirflowCommandResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/StopAirflowCommandResponseOrBuilder.java b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/StopAirflowCommandResponseOrBuilder.java new file mode 100644 index 000000000000..0f474e62c051 --- /dev/null +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/StopAirflowCommandResponseOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface StopAirflowCommandResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Whether the execution is still running.
+   * 
+ * + * bool is_done = 1; + * + * @return The isDone. + */ + boolean getIsDone(); + + /** + * + * + *
+   * Output message from stopping execution request.
+   * 
+ * + * repeated string output = 2; + * + * @return A list containing the output. + */ + java.util.List getOutputList(); + /** + * + * + *
+   * Output message from stopping execution request.
+   * 
+ * + * repeated string output = 2; + * + * @return The count of output. + */ + int getOutputCount(); + /** + * + * + *
+   * Output message from stopping execution request.
+   * 
+ * + * repeated string output = 2; + * + * @param index The index of the element to return. + * @return The output at the given index. + */ + java.lang.String getOutput(int index); + /** + * + * + *
+   * Output message from stopping execution request.
+   * 
+ * + * repeated string output = 2; + * + * @param index The index of the value to return. + * @return The bytes of the output at the given index. + */ + com.google.protobuf.ByteString getOutputBytes(int index); +} diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/proto/google/cloud/orchestration/airflow/service/v1beta1/environments.proto b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/proto/google/cloud/orchestration/airflow/service/v1beta1/environments.proto index a47958ad8b01..51da9f3c152c 100644 --- a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/proto/google/cloud/orchestration/airflow/service/v1beta1/environments.proto +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/proto/google/cloud/orchestration/airflow/service/v1beta1/environments.proto @@ -121,6 +121,33 @@ service Environments { }; } + // Executes Airflow CLI command. + rpc ExecuteAirflowCommand(ExecuteAirflowCommandRequest) + returns (ExecuteAirflowCommandResponse) { + option (google.api.http) = { + post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:executeAirflowCommand" + body: "*" + }; + } + + // Stops Airflow CLI command execution. + rpc StopAirflowCommand(StopAirflowCommandRequest) + returns (StopAirflowCommandResponse) { + option (google.api.http) = { + post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:stopAirflowCommand" + body: "*" + }; + } + + // Polls Airflow CLI command execution and fetches logs. + rpc PollAirflowCommand(PollAirflowCommandRequest) + returns (PollAirflowCommandResponse) { + option (google.api.http) = { + post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:pollAirflowCommand" + body: "*" + }; + } + // Creates a snapshots of a Cloud Composer environment. // // As a result of this operation, snapshot of environment's state is stored @@ -150,6 +177,27 @@ service Environments { metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" }; } + + // Triggers database failover (only for highly resilient environments). + rpc DatabaseFailover(DatabaseFailoverRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:databaseFailover" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse" + metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }; + } + + // Fetches database properties. + rpc FetchDatabaseProperties(FetchDatabasePropertiesRequest) + returns (FetchDatabasePropertiesResponse) { + option (google.api.http) = { + get: "/v1beta1/{environment=projects/*/locations/*/environments/*}:fetchDatabaseProperties" + }; + } } // Create a new environment. @@ -364,6 +412,25 @@ message RestartWebServerRequest { string name = 1; } +// Execute Airflow Command request. +message ExecuteAirflowCommandRequest { + // The resource name of the environment in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + string environment = 1; + + // Airflow command. + string command = 2; + + // Airflow subcommand. + string subcommand = 3; + + // Parameters for the Airflow command/subcommand as an array of arguments. + // It may contain positional arguments like `["my-dag-id"]`, key-value + // parameters like `["--foo=bar"]` or `["--foo","bar"]`, + // or other flags like `["-f"]`. + repeated string parameters = 4; +} + // Response to ExecuteAirflowCommandRequest. message ExecuteAirflowCommandResponse { // The unique ID of the command execution for polling. @@ -379,6 +446,54 @@ message ExecuteAirflowCommandResponse { string error = 4; } +// Stop Airflow Command request. +message StopAirflowCommandRequest { + // The resource name of the environment in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + string environment = 1; + + // The unique ID of the command execution. + string execution_id = 2; + + // The name of the pod where the command is executed. + string pod = 3; + + // The namespace of the pod where the command is executed. + string pod_namespace = 4; + + // If true, the execution is terminated forcefully (SIGKILL). If false, the + // execution is stopped gracefully, giving it time for cleanup. + bool force = 5; +} + +// Response to StopAirflowCommandRequest. +message StopAirflowCommandResponse { + // Whether the execution is still running. + bool is_done = 1; + + // Output message from stopping execution request. + repeated string output = 2; +} + +// Poll Airflow Command request. +message PollAirflowCommandRequest { + // The resource name of the environment in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1; + + // The unique ID of the command execution. + string execution_id = 2; + + // The name of the pod where the command is executed. + string pod = 3; + + // The namespace of the pod where the command is executed. + string pod_namespace = 4; + + // Line number from which new logs should be fetched. + int32 next_line_number = 5; +} + // Response to PollAirflowCommandRequest. message PollAirflowCommandResponse { // Contains information about a single line from logs. @@ -460,6 +575,44 @@ message LoadSnapshotRequest { // Response to LoadSnapshotRequest. message LoadSnapshotResponse {} +// Request to trigger database failover (only for highly resilient +// environments). +message DatabaseFailoverRequest { + // Target environment: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1; +} + +// Response for DatabaseFailoverRequest. +message DatabaseFailoverResponse {} + +// Request to fetch properties of environment's database. +message FetchDatabasePropertiesRequest { + // Required. The resource name of the environment, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/Environment" + } + ]; +} + +// Response for FetchDatabasePropertiesRequest. +message FetchDatabasePropertiesResponse { + // The Compute Engine zone that the instance is currently serving from. + string primary_gce_zone = 1; + + // The Compute Engine zone that the failover instance is currently serving + // from for a regional Cloud SQL instance. + string secondary_gce_zone = 2; + + // The availability status of the failover replica. A false status indicates + // that the failover replica is out of sync. The primary instance can only + // fail over to the failover replica when the status is true. + bool is_failover_replica_available = 3; +} + // Configuration information for an environment. message EnvironmentConfig { // The size of the Cloud Composer environment. @@ -477,6 +630,15 @@ message EnvironmentConfig { ENVIRONMENT_SIZE_LARGE = 3; } + // Resilience mode of the Cloud Composer Environment. + enum ResilienceMode { + // Default mode doesn't change environment parameters. + RESILIENCE_MODE_UNSPECIFIED = 0; + + // Enabled High Resilience mode, including Cloud SQL HA. + HIGH_RESILIENCE = 1; + } + // Output only. The Kubernetes Engine cluster used to run this environment. string gke_cluster = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -584,6 +746,12 @@ message EnvironmentConfig { // This field is supported for Cloud Composer environments in versions // composer-2.*.*-airflow-*.*.* and newer. RecoveryConfig recovery_config = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resilience mode of the Cloud Composer Environment. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.2.0-airflow-*.*.* and newer. + ResilienceMode resilience_mode = 20 [(google.api.field_behavior) = OPTIONAL]; } // Network-level access control policy for the Airflow web server. diff --git a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/proto/google/cloud/orchestration/airflow/service/v1beta1/operations.proto b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/proto/google/cloud/orchestration/airflow/service/v1beta1/operations.proto index 75663268a4eb..6596658a0be3 100644 --- a/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/proto/google/cloud/orchestration/airflow/service/v1beta1/operations.proto +++ b/java-orchestration-airflow/proto-google-cloud-orchestration-airflow-v1beta1/src/main/proto/google/cloud/orchestration/airflow/service/v1beta1/operations.proto @@ -65,6 +65,10 @@ message OperationMetadata { // Loads snapshot of the resource operation. LOAD_SNAPSHOT = 6; + + // Triggers failover of environment's Cloud SQL instance (only for highly + // resilient environments). + DATABASE_FAILOVER = 7; } // Output only. The current operation state. diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/databasefailover/AsyncDatabaseFailover.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/databasefailover/AsyncDatabaseFailover.java new file mode 100644 index 000000000000..15fca8a996c1 --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/databasefailover/AsyncDatabaseFailover.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1.samples; + +// [START composer_v1_generated_Environments_DatabaseFailover_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest; +import com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient; +import com.google.longrunning.Operation; + +public class AsyncDatabaseFailover { + + public static void main(String[] args) throws Exception { + asyncDatabaseFailover(); + } + + public static void asyncDatabaseFailover() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + DatabaseFailoverRequest request = + DatabaseFailoverRequest.newBuilder().setEnvironment("environment-85904877").build(); + ApiFuture future = + environmentsClient.databaseFailoverCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END composer_v1_generated_Environments_DatabaseFailover_async] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/databasefailover/AsyncDatabaseFailoverLRO.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/databasefailover/AsyncDatabaseFailoverLRO.java new file mode 100644 index 000000000000..6a3bbd059fab --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/databasefailover/AsyncDatabaseFailoverLRO.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1.samples; + +// [START composer_v1_generated_Environments_DatabaseFailover_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +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.EnvironmentsClient; +import com.google.cloud.orchestration.airflow.service.v1.OperationMetadata; + +public class AsyncDatabaseFailoverLRO { + + public static void main(String[] args) throws Exception { + asyncDatabaseFailoverLRO(); + } + + public static void asyncDatabaseFailoverLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + DatabaseFailoverRequest request = + DatabaseFailoverRequest.newBuilder().setEnvironment("environment-85904877").build(); + OperationFuture future = + environmentsClient.databaseFailoverOperationCallable().futureCall(request); + // Do something. + DatabaseFailoverResponse response = future.get(); + } + } +} +// [END composer_v1_generated_Environments_DatabaseFailover_LRO_async] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/databasefailover/SyncDatabaseFailover.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/databasefailover/SyncDatabaseFailover.java new file mode 100644 index 000000000000..6639ebbe48d9 --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/databasefailover/SyncDatabaseFailover.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1.samples; + +// [START composer_v1_generated_Environments_DatabaseFailover_sync] +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.EnvironmentsClient; + +public class SyncDatabaseFailover { + + public static void main(String[] args) throws Exception { + syncDatabaseFailover(); + } + + public static void syncDatabaseFailover() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + DatabaseFailoverRequest request = + DatabaseFailoverRequest.newBuilder().setEnvironment("environment-85904877").build(); + DatabaseFailoverResponse response = environmentsClient.databaseFailoverAsync(request).get(); + } + } +} +// [END composer_v1_generated_Environments_DatabaseFailover_sync] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/executeairflowcommand/AsyncExecuteAirflowCommand.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/executeairflowcommand/AsyncExecuteAirflowCommand.java new file mode 100644 index 000000000000..7b18cfd3a1e8 --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/executeairflowcommand/AsyncExecuteAirflowCommand.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1.samples; + +// [START composer_v1_generated_Environments_ExecuteAirflowCommand_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient; +import com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse; +import java.util.ArrayList; + +public class AsyncExecuteAirflowCommand { + + public static void main(String[] args) throws Exception { + asyncExecuteAirflowCommand(); + } + + public static void asyncExecuteAirflowCommand() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + ExecuteAirflowCommandRequest request = + ExecuteAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setCommand("command950394699") + .setSubcommand("subcommand2099091723") + .addAllParameters(new ArrayList()) + .build(); + ApiFuture future = + environmentsClient.executeAirflowCommandCallable().futureCall(request); + // Do something. + ExecuteAirflowCommandResponse response = future.get(); + } + } +} +// [END composer_v1_generated_Environments_ExecuteAirflowCommand_async] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/executeairflowcommand/SyncExecuteAirflowCommand.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/executeairflowcommand/SyncExecuteAirflowCommand.java new file mode 100644 index 000000000000..3f1bb4cae3cc --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/executeairflowcommand/SyncExecuteAirflowCommand.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1.samples; + +// [START composer_v1_generated_Environments_ExecuteAirflowCommand_sync] +import com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient; +import com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse; +import java.util.ArrayList; + +public class SyncExecuteAirflowCommand { + + public static void main(String[] args) throws Exception { + syncExecuteAirflowCommand(); + } + + public static void syncExecuteAirflowCommand() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + ExecuteAirflowCommandRequest request = + ExecuteAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setCommand("command950394699") + .setSubcommand("subcommand2099091723") + .addAllParameters(new ArrayList()) + .build(); + ExecuteAirflowCommandResponse response = environmentsClient.executeAirflowCommand(request); + } + } +} +// [END composer_v1_generated_Environments_ExecuteAirflowCommand_sync] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/fetchdatabaseproperties/AsyncFetchDatabaseProperties.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/fetchdatabaseproperties/AsyncFetchDatabaseProperties.java new file mode 100644 index 000000000000..724f44b9e234 --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/fetchdatabaseproperties/AsyncFetchDatabaseProperties.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1.samples; + +// [START composer_v1_generated_Environments_FetchDatabaseProperties_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.orchestration.airflow.service.v1.EnvironmentName; +import com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient; +import com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest; +import com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse; + +public class AsyncFetchDatabaseProperties { + + public static void main(String[] args) throws Exception { + asyncFetchDatabaseProperties(); + } + + public static void asyncFetchDatabaseProperties() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + FetchDatabasePropertiesRequest request = + FetchDatabasePropertiesRequest.newBuilder() + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) + .build(); + ApiFuture future = + environmentsClient.fetchDatabasePropertiesCallable().futureCall(request); + // Do something. + FetchDatabasePropertiesResponse response = future.get(); + } + } +} +// [END composer_v1_generated_Environments_FetchDatabaseProperties_async] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/fetchdatabaseproperties/SyncFetchDatabaseProperties.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/fetchdatabaseproperties/SyncFetchDatabaseProperties.java new file mode 100644 index 000000000000..b93370a86f10 --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/fetchdatabaseproperties/SyncFetchDatabaseProperties.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1.samples; + +// [START composer_v1_generated_Environments_FetchDatabaseProperties_sync] +import com.google.cloud.orchestration.airflow.service.v1.EnvironmentName; +import com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient; +import com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest; +import com.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse; + +public class SyncFetchDatabaseProperties { + + public static void main(String[] args) throws Exception { + syncFetchDatabaseProperties(); + } + + public static void syncFetchDatabaseProperties() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + FetchDatabasePropertiesRequest request = + FetchDatabasePropertiesRequest.newBuilder() + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) + .build(); + FetchDatabasePropertiesResponse response = + environmentsClient.fetchDatabaseProperties(request); + } + } +} +// [END composer_v1_generated_Environments_FetchDatabaseProperties_sync] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/pollairflowcommand/AsyncPollAirflowCommand.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/pollairflowcommand/AsyncPollAirflowCommand.java new file mode 100644 index 000000000000..9eefb6934e40 --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/pollairflowcommand/AsyncPollAirflowCommand.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1.samples; + +// [START composer_v1_generated_Environments_PollAirflowCommand_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient; +import com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse; + +public class AsyncPollAirflowCommand { + + public static void main(String[] args) throws Exception { + asyncPollAirflowCommand(); + } + + public static void asyncPollAirflowCommand() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + PollAirflowCommandRequest request = + PollAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setNextLineNumber(1176642216) + .build(); + ApiFuture future = + environmentsClient.pollAirflowCommandCallable().futureCall(request); + // Do something. + PollAirflowCommandResponse response = future.get(); + } + } +} +// [END composer_v1_generated_Environments_PollAirflowCommand_async] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/pollairflowcommand/SyncPollAirflowCommand.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/pollairflowcommand/SyncPollAirflowCommand.java new file mode 100644 index 000000000000..3801cbeee2ff --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/pollairflowcommand/SyncPollAirflowCommand.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1.samples; + +// [START composer_v1_generated_Environments_PollAirflowCommand_sync] +import com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient; +import com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse; + +public class SyncPollAirflowCommand { + + public static void main(String[] args) throws Exception { + syncPollAirflowCommand(); + } + + public static void syncPollAirflowCommand() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + PollAirflowCommandRequest request = + PollAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setNextLineNumber(1176642216) + .build(); + PollAirflowCommandResponse response = environmentsClient.pollAirflowCommand(request); + } + } +} +// [END composer_v1_generated_Environments_PollAirflowCommand_sync] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/stopairflowcommand/AsyncStopAirflowCommand.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/stopairflowcommand/AsyncStopAirflowCommand.java new file mode 100644 index 000000000000..dcb12ddc1649 --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/stopairflowcommand/AsyncStopAirflowCommand.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1.samples; + +// [START composer_v1_generated_Environments_StopAirflowCommand_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient; +import com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse; + +public class AsyncStopAirflowCommand { + + public static void main(String[] args) throws Exception { + asyncStopAirflowCommand(); + } + + public static void asyncStopAirflowCommand() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + StopAirflowCommandRequest request = + StopAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setForce(true) + .build(); + ApiFuture future = + environmentsClient.stopAirflowCommandCallable().futureCall(request); + // Do something. + StopAirflowCommandResponse response = future.get(); + } + } +} +// [END composer_v1_generated_Environments_StopAirflowCommand_async] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/stopairflowcommand/SyncStopAirflowCommand.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/stopairflowcommand/SyncStopAirflowCommand.java new file mode 100644 index 000000000000..92b1f2058f7f --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1/environments/stopairflowcommand/SyncStopAirflowCommand.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1.samples; + +// [START composer_v1_generated_Environments_StopAirflowCommand_sync] +import com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient; +import com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse; + +public class SyncStopAirflowCommand { + + public static void main(String[] args) throws Exception { + syncStopAirflowCommand(); + } + + public static void syncStopAirflowCommand() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + StopAirflowCommandRequest request = + StopAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setForce(true) + .build(); + StopAirflowCommandResponse response = environmentsClient.stopAirflowCommand(request); + } + } +} +// [END composer_v1_generated_Environments_StopAirflowCommand_sync] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/databasefailover/AsyncDatabaseFailover.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/databasefailover/AsyncDatabaseFailover.java new file mode 100644 index 000000000000..146e4d031df4 --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/databasefailover/AsyncDatabaseFailover.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1.samples; + +// [START composer_v1beta1_generated_Environments_DatabaseFailover_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient; +import com.google.longrunning.Operation; + +public class AsyncDatabaseFailover { + + public static void main(String[] args) throws Exception { + asyncDatabaseFailover(); + } + + public static void asyncDatabaseFailover() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + DatabaseFailoverRequest request = + DatabaseFailoverRequest.newBuilder().setEnvironment("environment-85904877").build(); + ApiFuture future = + environmentsClient.databaseFailoverCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END composer_v1beta1_generated_Environments_DatabaseFailover_async] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/databasefailover/AsyncDatabaseFailoverLRO.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/databasefailover/AsyncDatabaseFailoverLRO.java new file mode 100644 index 000000000000..4a14c172515f --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/databasefailover/AsyncDatabaseFailoverLRO.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1.samples; + +// [START composer_v1beta1_generated_Environments_DatabaseFailover_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse; +import com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient; +import com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata; + +public class AsyncDatabaseFailoverLRO { + + public static void main(String[] args) throws Exception { + asyncDatabaseFailoverLRO(); + } + + public static void asyncDatabaseFailoverLRO() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + DatabaseFailoverRequest request = + DatabaseFailoverRequest.newBuilder().setEnvironment("environment-85904877").build(); + OperationFuture future = + environmentsClient.databaseFailoverOperationCallable().futureCall(request); + // Do something. + DatabaseFailoverResponse response = future.get(); + } + } +} +// [END composer_v1beta1_generated_Environments_DatabaseFailover_LRO_async] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/databasefailover/SyncDatabaseFailover.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/databasefailover/SyncDatabaseFailover.java new file mode 100644 index 000000000000..d63a3675c9e8 --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/databasefailover/SyncDatabaseFailover.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1.samples; + +// [START composer_v1beta1_generated_Environments_DatabaseFailover_sync] +import com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse; +import com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient; + +public class SyncDatabaseFailover { + + public static void main(String[] args) throws Exception { + syncDatabaseFailover(); + } + + public static void syncDatabaseFailover() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + DatabaseFailoverRequest request = + DatabaseFailoverRequest.newBuilder().setEnvironment("environment-85904877").build(); + DatabaseFailoverResponse response = environmentsClient.databaseFailoverAsync(request).get(); + } + } +} +// [END composer_v1beta1_generated_Environments_DatabaseFailover_sync] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/executeairflowcommand/AsyncExecuteAirflowCommand.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/executeairflowcommand/AsyncExecuteAirflowCommand.java new file mode 100644 index 000000000000..a807c9135c18 --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/executeairflowcommand/AsyncExecuteAirflowCommand.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1.samples; + +// [START composer_v1beta1_generated_Environments_ExecuteAirflowCommand_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient; +import com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse; +import java.util.ArrayList; + +public class AsyncExecuteAirflowCommand { + + public static void main(String[] args) throws Exception { + asyncExecuteAirflowCommand(); + } + + public static void asyncExecuteAirflowCommand() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + ExecuteAirflowCommandRequest request = + ExecuteAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setCommand("command950394699") + .setSubcommand("subcommand2099091723") + .addAllParameters(new ArrayList()) + .build(); + ApiFuture future = + environmentsClient.executeAirflowCommandCallable().futureCall(request); + // Do something. + ExecuteAirflowCommandResponse response = future.get(); + } + } +} +// [END composer_v1beta1_generated_Environments_ExecuteAirflowCommand_async] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/executeairflowcommand/SyncExecuteAirflowCommand.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/executeairflowcommand/SyncExecuteAirflowCommand.java new file mode 100644 index 000000000000..21a88a316c16 --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/executeairflowcommand/SyncExecuteAirflowCommand.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1.samples; + +// [START composer_v1beta1_generated_Environments_ExecuteAirflowCommand_sync] +import com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient; +import com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse; +import java.util.ArrayList; + +public class SyncExecuteAirflowCommand { + + public static void main(String[] args) throws Exception { + syncExecuteAirflowCommand(); + } + + public static void syncExecuteAirflowCommand() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + ExecuteAirflowCommandRequest request = + ExecuteAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setCommand("command950394699") + .setSubcommand("subcommand2099091723") + .addAllParameters(new ArrayList()) + .build(); + ExecuteAirflowCommandResponse response = environmentsClient.executeAirflowCommand(request); + } + } +} +// [END composer_v1beta1_generated_Environments_ExecuteAirflowCommand_sync] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/fetchdatabaseproperties/AsyncFetchDatabaseProperties.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/fetchdatabaseproperties/AsyncFetchDatabaseProperties.java new file mode 100644 index 000000000000..0f4eced6c56c --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/fetchdatabaseproperties/AsyncFetchDatabaseProperties.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1.samples; + +// [START composer_v1beta1_generated_Environments_FetchDatabaseProperties_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentName; +import com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient; +import com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse; + +public class AsyncFetchDatabaseProperties { + + public static void main(String[] args) throws Exception { + asyncFetchDatabaseProperties(); + } + + public static void asyncFetchDatabaseProperties() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + FetchDatabasePropertiesRequest request = + FetchDatabasePropertiesRequest.newBuilder() + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) + .build(); + ApiFuture future = + environmentsClient.fetchDatabasePropertiesCallable().futureCall(request); + // Do something. + FetchDatabasePropertiesResponse response = future.get(); + } + } +} +// [END composer_v1beta1_generated_Environments_FetchDatabaseProperties_async] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/fetchdatabaseproperties/SyncFetchDatabaseProperties.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/fetchdatabaseproperties/SyncFetchDatabaseProperties.java new file mode 100644 index 000000000000..407a34fdcba4 --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/fetchdatabaseproperties/SyncFetchDatabaseProperties.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1.samples; + +// [START composer_v1beta1_generated_Environments_FetchDatabaseProperties_sync] +import com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentName; +import com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient; +import com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse; + +public class SyncFetchDatabaseProperties { + + public static void main(String[] args) throws Exception { + syncFetchDatabaseProperties(); + } + + public static void syncFetchDatabaseProperties() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + FetchDatabasePropertiesRequest request = + FetchDatabasePropertiesRequest.newBuilder() + .setEnvironment( + EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) + .build(); + FetchDatabasePropertiesResponse response = + environmentsClient.fetchDatabaseProperties(request); + } + } +} +// [END composer_v1beta1_generated_Environments_FetchDatabaseProperties_sync] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/pollairflowcommand/AsyncPollAirflowCommand.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/pollairflowcommand/AsyncPollAirflowCommand.java new file mode 100644 index 000000000000..84a9a2b9f931 --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/pollairflowcommand/AsyncPollAirflowCommand.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1.samples; + +// [START composer_v1beta1_generated_Environments_PollAirflowCommand_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient; +import com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse; + +public class AsyncPollAirflowCommand { + + public static void main(String[] args) throws Exception { + asyncPollAirflowCommand(); + } + + public static void asyncPollAirflowCommand() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + PollAirflowCommandRequest request = + PollAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setNextLineNumber(1176642216) + .build(); + ApiFuture future = + environmentsClient.pollAirflowCommandCallable().futureCall(request); + // Do something. + PollAirflowCommandResponse response = future.get(); + } + } +} +// [END composer_v1beta1_generated_Environments_PollAirflowCommand_async] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/pollairflowcommand/SyncPollAirflowCommand.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/pollairflowcommand/SyncPollAirflowCommand.java new file mode 100644 index 000000000000..0c2456a1afe9 --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/pollairflowcommand/SyncPollAirflowCommand.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1.samples; + +// [START composer_v1beta1_generated_Environments_PollAirflowCommand_sync] +import com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient; +import com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse; + +public class SyncPollAirflowCommand { + + public static void main(String[] args) throws Exception { + syncPollAirflowCommand(); + } + + public static void syncPollAirflowCommand() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + PollAirflowCommandRequest request = + PollAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setNextLineNumber(1176642216) + .build(); + PollAirflowCommandResponse response = environmentsClient.pollAirflowCommand(request); + } + } +} +// [END composer_v1beta1_generated_Environments_PollAirflowCommand_sync] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/stopairflowcommand/AsyncStopAirflowCommand.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/stopairflowcommand/AsyncStopAirflowCommand.java new file mode 100644 index 000000000000..c26d2b980178 --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/stopairflowcommand/AsyncStopAirflowCommand.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1.samples; + +// [START composer_v1beta1_generated_Environments_StopAirflowCommand_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient; +import com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse; + +public class AsyncStopAirflowCommand { + + public static void main(String[] args) throws Exception { + asyncStopAirflowCommand(); + } + + public static void asyncStopAirflowCommand() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + StopAirflowCommandRequest request = + StopAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setForce(true) + .build(); + ApiFuture future = + environmentsClient.stopAirflowCommandCallable().futureCall(request); + // Do something. + StopAirflowCommandResponse response = future.get(); + } + } +} +// [END composer_v1beta1_generated_Environments_StopAirflowCommand_async] diff --git a/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/stopairflowcommand/SyncStopAirflowCommand.java b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/stopairflowcommand/SyncStopAirflowCommand.java new file mode 100644 index 000000000000..15b9f652f904 --- /dev/null +++ b/java-orchestration-airflow/samples/snippets/generated/com/google/cloud/orchestration/airflow/service/v1beta1/environments/stopairflowcommand/SyncStopAirflowCommand.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1.samples; + +// [START composer_v1beta1_generated_Environments_StopAirflowCommand_sync] +import com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient; +import com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse; + +public class SyncStopAirflowCommand { + + public static void main(String[] args) throws Exception { + syncStopAirflowCommand(); + } + + public static void syncStopAirflowCommand() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) { + StopAirflowCommandRequest request = + StopAirflowCommandRequest.newBuilder() + .setEnvironment("environment-85904877") + .setExecutionId("executionId-454906285") + .setPod("pod111173") + .setPodNamespace("podNamespace463962262") + .setForce(true) + .build(); + StopAirflowCommandResponse response = environmentsClient.stopAirflowCommand(request); + } + } +} +// [END composer_v1beta1_generated_Environments_StopAirflowCommand_sync]