@@ -847,6 +847,200 @@ public final UnaryCallable<DeleteEnvironmentRequest, Operation> deleteEnvironmen
847
847
return stub .deleteEnvironmentCallable ();
848
848
}
849
849
850
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
851
+ /**
852
+ * Executes Airflow CLI command.
853
+ *
854
+ * <p>Sample code:
855
+ *
856
+ * <pre>{@code
857
+ * // This snippet has been automatically generated and should be regarded as a code template only.
858
+ * // It will require modifications to work:
859
+ * // - It may require correct/in-range values for request initialization.
860
+ * // - It may require specifying regional endpoints when creating the service client as shown in
861
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
862
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
863
+ * ExecuteAirflowCommandRequest request =
864
+ * ExecuteAirflowCommandRequest.newBuilder()
865
+ * .setEnvironment("environment-85904877")
866
+ * .setCommand("command950394699")
867
+ * .setSubcommand("subcommand2099091723")
868
+ * .addAllParameters(new ArrayList<String>())
869
+ * .build();
870
+ * ExecuteAirflowCommandResponse response = environmentsClient.executeAirflowCommand(request);
871
+ * }
872
+ * }</pre>
873
+ *
874
+ * @param request The request object containing all of the parameters for the API call.
875
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
876
+ */
877
+ public final ExecuteAirflowCommandResponse executeAirflowCommand (
878
+ ExecuteAirflowCommandRequest request ) {
879
+ return executeAirflowCommandCallable ().call (request );
880
+ }
881
+
882
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
883
+ /**
884
+ * Executes Airflow CLI command.
885
+ *
886
+ * <p>Sample code:
887
+ *
888
+ * <pre>{@code
889
+ * // This snippet has been automatically generated and should be regarded as a code template only.
890
+ * // It will require modifications to work:
891
+ * // - It may require correct/in-range values for request initialization.
892
+ * // - It may require specifying regional endpoints when creating the service client as shown in
893
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
894
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
895
+ * ExecuteAirflowCommandRequest request =
896
+ * ExecuteAirflowCommandRequest.newBuilder()
897
+ * .setEnvironment("environment-85904877")
898
+ * .setCommand("command950394699")
899
+ * .setSubcommand("subcommand2099091723")
900
+ * .addAllParameters(new ArrayList<String>())
901
+ * .build();
902
+ * ApiFuture<ExecuteAirflowCommandResponse> future =
903
+ * environmentsClient.executeAirflowCommandCallable().futureCall(request);
904
+ * // Do something.
905
+ * ExecuteAirflowCommandResponse response = future.get();
906
+ * }
907
+ * }</pre>
908
+ */
909
+ public final UnaryCallable <ExecuteAirflowCommandRequest , ExecuteAirflowCommandResponse >
910
+ executeAirflowCommandCallable () {
911
+ return stub .executeAirflowCommandCallable ();
912
+ }
913
+
914
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
915
+ /**
916
+ * Stops Airflow CLI command execution.
917
+ *
918
+ * <p>Sample code:
919
+ *
920
+ * <pre>{@code
921
+ * // This snippet has been automatically generated and should be regarded as a code template only.
922
+ * // It will require modifications to work:
923
+ * // - It may require correct/in-range values for request initialization.
924
+ * // - It may require specifying regional endpoints when creating the service client as shown in
925
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
926
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
927
+ * StopAirflowCommandRequest request =
928
+ * StopAirflowCommandRequest.newBuilder()
929
+ * .setEnvironment("environment-85904877")
930
+ * .setExecutionId("executionId-454906285")
931
+ * .setPod("pod111173")
932
+ * .setPodNamespace("podNamespace463962262")
933
+ * .setForce(true)
934
+ * .build();
935
+ * StopAirflowCommandResponse response = environmentsClient.stopAirflowCommand(request);
936
+ * }
937
+ * }</pre>
938
+ *
939
+ * @param request The request object containing all of the parameters for the API call.
940
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
941
+ */
942
+ public final StopAirflowCommandResponse stopAirflowCommand (StopAirflowCommandRequest request ) {
943
+ return stopAirflowCommandCallable ().call (request );
944
+ }
945
+
946
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
947
+ /**
948
+ * Stops Airflow CLI command execution.
949
+ *
950
+ * <p>Sample code:
951
+ *
952
+ * <pre>{@code
953
+ * // This snippet has been automatically generated and should be regarded as a code template only.
954
+ * // It will require modifications to work:
955
+ * // - It may require correct/in-range values for request initialization.
956
+ * // - It may require specifying regional endpoints when creating the service client as shown in
957
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
958
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
959
+ * StopAirflowCommandRequest request =
960
+ * StopAirflowCommandRequest.newBuilder()
961
+ * .setEnvironment("environment-85904877")
962
+ * .setExecutionId("executionId-454906285")
963
+ * .setPod("pod111173")
964
+ * .setPodNamespace("podNamespace463962262")
965
+ * .setForce(true)
966
+ * .build();
967
+ * ApiFuture<StopAirflowCommandResponse> future =
968
+ * environmentsClient.stopAirflowCommandCallable().futureCall(request);
969
+ * // Do something.
970
+ * StopAirflowCommandResponse response = future.get();
971
+ * }
972
+ * }</pre>
973
+ */
974
+ public final UnaryCallable <StopAirflowCommandRequest , StopAirflowCommandResponse >
975
+ stopAirflowCommandCallable () {
976
+ return stub .stopAirflowCommandCallable ();
977
+ }
978
+
979
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
980
+ /**
981
+ * Polls Airflow CLI command execution and fetches logs.
982
+ *
983
+ * <p>Sample code:
984
+ *
985
+ * <pre>{@code
986
+ * // This snippet has been automatically generated and should be regarded as a code template only.
987
+ * // It will require modifications to work:
988
+ * // - It may require correct/in-range values for request initialization.
989
+ * // - It may require specifying regional endpoints when creating the service client as shown in
990
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
991
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
992
+ * PollAirflowCommandRequest request =
993
+ * PollAirflowCommandRequest.newBuilder()
994
+ * .setEnvironment("environment-85904877")
995
+ * .setExecutionId("executionId-454906285")
996
+ * .setPod("pod111173")
997
+ * .setPodNamespace("podNamespace463962262")
998
+ * .setNextLineNumber(1176642216)
999
+ * .build();
1000
+ * PollAirflowCommandResponse response = environmentsClient.pollAirflowCommand(request);
1001
+ * }
1002
+ * }</pre>
1003
+ *
1004
+ * @param request The request object containing all of the parameters for the API call.
1005
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1006
+ */
1007
+ public final PollAirflowCommandResponse pollAirflowCommand (PollAirflowCommandRequest request ) {
1008
+ return pollAirflowCommandCallable ().call (request );
1009
+ }
1010
+
1011
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
1012
+ /**
1013
+ * Polls Airflow CLI command execution and fetches logs.
1014
+ *
1015
+ * <p>Sample code:
1016
+ *
1017
+ * <pre>{@code
1018
+ * // This snippet has been automatically generated and should be regarded as a code template only.
1019
+ * // It will require modifications to work:
1020
+ * // - It may require correct/in-range values for request initialization.
1021
+ * // - It may require specifying regional endpoints when creating the service client as shown in
1022
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1023
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
1024
+ * PollAirflowCommandRequest request =
1025
+ * PollAirflowCommandRequest.newBuilder()
1026
+ * .setEnvironment("environment-85904877")
1027
+ * .setExecutionId("executionId-454906285")
1028
+ * .setPod("pod111173")
1029
+ * .setPodNamespace("podNamespace463962262")
1030
+ * .setNextLineNumber(1176642216)
1031
+ * .build();
1032
+ * ApiFuture<PollAirflowCommandResponse> future =
1033
+ * environmentsClient.pollAirflowCommandCallable().futureCall(request);
1034
+ * // Do something.
1035
+ * PollAirflowCommandResponse response = future.get();
1036
+ * }
1037
+ * }</pre>
1038
+ */
1039
+ public final UnaryCallable <PollAirflowCommandRequest , PollAirflowCommandResponse >
1040
+ pollAirflowCommandCallable () {
1041
+ return stub .pollAirflowCommandCallable ();
1042
+ }
1043
+
850
1044
// AUTO-GENERATED DOCUMENTATION AND METHOD.
851
1045
/**
852
1046
* Creates a snapshots of a Cloud Composer environment.
@@ -1053,6 +1247,148 @@ public final UnaryCallable<LoadSnapshotRequest, Operation> loadSnapshotCallable(
1053
1247
return stub .loadSnapshotCallable ();
1054
1248
}
1055
1249
1250
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
1251
+ /**
1252
+ * Triggers database failover (only for highly resilient environments).
1253
+ *
1254
+ * <p>Sample code:
1255
+ *
1256
+ * <pre>{@code
1257
+ * // This snippet has been automatically generated and should be regarded as a code template only.
1258
+ * // It will require modifications to work:
1259
+ * // - It may require correct/in-range values for request initialization.
1260
+ * // - It may require specifying regional endpoints when creating the service client as shown in
1261
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1262
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
1263
+ * DatabaseFailoverRequest request =
1264
+ * DatabaseFailoverRequest.newBuilder().setEnvironment("environment-85904877").build();
1265
+ * DatabaseFailoverResponse response = environmentsClient.databaseFailoverAsync(request).get();
1266
+ * }
1267
+ * }</pre>
1268
+ *
1269
+ * @param request The request object containing all of the parameters for the API call.
1270
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1271
+ */
1272
+ public final OperationFuture <DatabaseFailoverResponse , OperationMetadata > databaseFailoverAsync (
1273
+ DatabaseFailoverRequest request ) {
1274
+ return databaseFailoverOperationCallable ().futureCall (request );
1275
+ }
1276
+
1277
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
1278
+ /**
1279
+ * Triggers database failover (only for highly resilient environments).
1280
+ *
1281
+ * <p>Sample code:
1282
+ *
1283
+ * <pre>{@code
1284
+ * // This snippet has been automatically generated and should be regarded as a code template only.
1285
+ * // It will require modifications to work:
1286
+ * // - It may require correct/in-range values for request initialization.
1287
+ * // - It may require specifying regional endpoints when creating the service client as shown in
1288
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1289
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
1290
+ * DatabaseFailoverRequest request =
1291
+ * DatabaseFailoverRequest.newBuilder().setEnvironment("environment-85904877").build();
1292
+ * OperationFuture<DatabaseFailoverResponse, OperationMetadata> future =
1293
+ * environmentsClient.databaseFailoverOperationCallable().futureCall(request);
1294
+ * // Do something.
1295
+ * DatabaseFailoverResponse response = future.get();
1296
+ * }
1297
+ * }</pre>
1298
+ */
1299
+ public final OperationCallable <
1300
+ DatabaseFailoverRequest , DatabaseFailoverResponse , OperationMetadata >
1301
+ databaseFailoverOperationCallable () {
1302
+ return stub .databaseFailoverOperationCallable ();
1303
+ }
1304
+
1305
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
1306
+ /**
1307
+ * Triggers database failover (only for highly resilient environments).
1308
+ *
1309
+ * <p>Sample code:
1310
+ *
1311
+ * <pre>{@code
1312
+ * // This snippet has been automatically generated and should be regarded as a code template only.
1313
+ * // It will require modifications to work:
1314
+ * // - It may require correct/in-range values for request initialization.
1315
+ * // - It may require specifying regional endpoints when creating the service client as shown in
1316
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1317
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
1318
+ * DatabaseFailoverRequest request =
1319
+ * DatabaseFailoverRequest.newBuilder().setEnvironment("environment-85904877").build();
1320
+ * ApiFuture<Operation> future =
1321
+ * environmentsClient.databaseFailoverCallable().futureCall(request);
1322
+ * // Do something.
1323
+ * Operation response = future.get();
1324
+ * }
1325
+ * }</pre>
1326
+ */
1327
+ public final UnaryCallable <DatabaseFailoverRequest , Operation > databaseFailoverCallable () {
1328
+ return stub .databaseFailoverCallable ();
1329
+ }
1330
+
1331
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
1332
+ /**
1333
+ * Fetches database properties.
1334
+ *
1335
+ * <p>Sample code:
1336
+ *
1337
+ * <pre>{@code
1338
+ * // This snippet has been automatically generated and should be regarded as a code template only.
1339
+ * // It will require modifications to work:
1340
+ * // - It may require correct/in-range values for request initialization.
1341
+ * // - It may require specifying regional endpoints when creating the service client as shown in
1342
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1343
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
1344
+ * FetchDatabasePropertiesRequest request =
1345
+ * FetchDatabasePropertiesRequest.newBuilder()
1346
+ * .setEnvironment(
1347
+ * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString())
1348
+ * .build();
1349
+ * FetchDatabasePropertiesResponse response =
1350
+ * environmentsClient.fetchDatabaseProperties(request);
1351
+ * }
1352
+ * }</pre>
1353
+ *
1354
+ * @param request The request object containing all of the parameters for the API call.
1355
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1356
+ */
1357
+ public final FetchDatabasePropertiesResponse fetchDatabaseProperties (
1358
+ FetchDatabasePropertiesRequest request ) {
1359
+ return fetchDatabasePropertiesCallable ().call (request );
1360
+ }
1361
+
1362
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
1363
+ /**
1364
+ * Fetches database properties.
1365
+ *
1366
+ * <p>Sample code:
1367
+ *
1368
+ * <pre>{@code
1369
+ * // This snippet has been automatically generated and should be regarded as a code template only.
1370
+ * // It will require modifications to work:
1371
+ * // - It may require correct/in-range values for request initialization.
1372
+ * // - It may require specifying regional endpoints when creating the service client as shown in
1373
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1374
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
1375
+ * FetchDatabasePropertiesRequest request =
1376
+ * FetchDatabasePropertiesRequest.newBuilder()
1377
+ * .setEnvironment(
1378
+ * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString())
1379
+ * .build();
1380
+ * ApiFuture<FetchDatabasePropertiesResponse> future =
1381
+ * environmentsClient.fetchDatabasePropertiesCallable().futureCall(request);
1382
+ * // Do something.
1383
+ * FetchDatabasePropertiesResponse response = future.get();
1384
+ * }
1385
+ * }</pre>
1386
+ */
1387
+ public final UnaryCallable <FetchDatabasePropertiesRequest , FetchDatabasePropertiesResponse >
1388
+ fetchDatabasePropertiesCallable () {
1389
+ return stub .fetchDatabasePropertiesCallable ();
1390
+ }
1391
+
1056
1392
@ Override
1057
1393
public final void close () {
1058
1394
stub .close ();
0 commit comments