Skip to content

Commit 9de227c

Browse files
1 parent f6f218b commit 9de227c

11 files changed

Lines changed: 562 additions & 12 deletions

File tree

‎clients/google-api-services-composer/v1/2.0.0/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
2222
<dependency>
2323
<groupId>com.google.apis</groupId>
2424
<artifactId>google-api-services-composer</artifactId>
25-
<version>v1-rev20261015-2.9.2</version>
25+
<version>v1-rev20261106-2.9.2</version>
2626
</dependency>
2727
</dependencies>
2828
</project>
@@ -35,7 +35,7 @@ repositories {
3535
mavenCentral()
3636
}
3737
dependencies {
38-
implementation 'com.google.apis:google-api-services-composer:v1-rev20261015-2.9.2'
38+
implementation 'com.google.apis:google-api-services-composer:v1-rev20261106-2.9.2'
3939
}
4040
```
4141

‎clients/google-api-services-composer/v1/2.0.0/com/google/api/services/composer/v1/CloudComposer.java‎

Lines changed: 291 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,6 +1178,152 @@ public Get set(String parameterName, Object value) {
11781178
return (Get) super.set(parameterName, value);
11791179
}
11801180
}
1181+
/**
1182+
* Hibernates (pauses) a running environment. It requests the environment to switch to the
1183+
* `HIBERNATED` state, keeping its data and minimizing cost, but not running any DAGs. This method
1184+
* is supported for Cloud Composer environments in development mode in versions
1185+
* composer-3-airflow-*.*.*-build.* and newer.
1186+
*
1187+
* Create a request for the method "environments.hibernate".
1188+
*
1189+
* This request holds the parameters needed by the composer server. After setting any optional
1190+
* parameters, call the {@link Hibernate#execute()} method to invoke the remote operation.
1191+
*
1192+
* @param name Required. The resource name of the environment to hibernate, in the form:
1193+
* "projects/{project}/locations/{location}/environments/{environment}"
1194+
* @param content the {@link com.google.api.services.composer.v1.model.HibernateEnvironmentRequest}
1195+
* @return the request
1196+
*/
1197+
public Hibernate hibernate(java.lang.String name, com.google.api.services.composer.v1.model.HibernateEnvironmentRequest content) throws java.io.IOException {
1198+
Hibernate result = new Hibernate(name, content);
1199+
initialize(result);
1200+
return result;
1201+
}
1202+
1203+
public class Hibernate extends CloudComposerRequest<com.google.api.services.composer.v1.model.Operation> {
1204+
1205+
private static final String REST_PATH = "v1/{+name}:hibernate";
1206+
1207+
private final java.util.regex.Pattern NAME_PATTERN =
1208+
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/environments/[^/]+$");
1209+
1210+
/**
1211+
* Hibernates (pauses) a running environment. It requests the environment to switch to the
1212+
* `HIBERNATED` state, keeping its data and minimizing cost, but not running any DAGs. This method
1213+
* is supported for Cloud Composer environments in development mode in versions
1214+
* composer-3-airflow-*.*.*-build.* and newer.
1215+
*
1216+
* Create a request for the method "environments.hibernate".
1217+
*
1218+
* This request holds the parameters needed by the the composer server. After setting any
1219+
* optional parameters, call the {@link Hibernate#execute()} method to invoke the remote
1220+
* operation. <p> {@link
1221+
* Hibernate#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
1222+
* must be called to initialize this instance immediately after invoking the constructor. </p>
1223+
*
1224+
* @param name Required. The resource name of the environment to hibernate, in the form:
1225+
* "projects/{project}/locations/{location}/environments/{environment}"
1226+
* @param content the {@link com.google.api.services.composer.v1.model.HibernateEnvironmentRequest}
1227+
* @since 1.13
1228+
*/
1229+
protected Hibernate(java.lang.String name, com.google.api.services.composer.v1.model.HibernateEnvironmentRequest content) {
1230+
super(CloudComposer.this, "POST", REST_PATH, content, com.google.api.services.composer.v1.model.Operation.class);
1231+
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
1232+
if (!getSuppressPatternChecks()) {
1233+
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
1234+
"Parameter name must conform to the pattern " +
1235+
"^projects/[^/]+/locations/[^/]+/environments/[^/]+$");
1236+
}
1237+
}
1238+
1239+
@Override
1240+
public Hibernate set$Xgafv(java.lang.String $Xgafv) {
1241+
return (Hibernate) super.set$Xgafv($Xgafv);
1242+
}
1243+
1244+
@Override
1245+
public Hibernate setAccessToken(java.lang.String accessToken) {
1246+
return (Hibernate) super.setAccessToken(accessToken);
1247+
}
1248+
1249+
@Override
1250+
public Hibernate setAlt(java.lang.String alt) {
1251+
return (Hibernate) super.setAlt(alt);
1252+
}
1253+
1254+
@Override
1255+
public Hibernate setCallback(java.lang.String callback) {
1256+
return (Hibernate) super.setCallback(callback);
1257+
}
1258+
1259+
@Override
1260+
public Hibernate setFields(java.lang.String fields) {
1261+
return (Hibernate) super.setFields(fields);
1262+
}
1263+
1264+
@Override
1265+
public Hibernate setKey(java.lang.String key) {
1266+
return (Hibernate) super.setKey(key);
1267+
}
1268+
1269+
@Override
1270+
public Hibernate setOauthToken(java.lang.String oauthToken) {
1271+
return (Hibernate) super.setOauthToken(oauthToken);
1272+
}
1273+
1274+
@Override
1275+
public Hibernate setPrettyPrint(java.lang.Boolean prettyPrint) {
1276+
return (Hibernate) super.setPrettyPrint(prettyPrint);
1277+
}
1278+
1279+
@Override
1280+
public Hibernate setQuotaUser(java.lang.String quotaUser) {
1281+
return (Hibernate) super.setQuotaUser(quotaUser);
1282+
}
1283+
1284+
@Override
1285+
public Hibernate setUploadType(java.lang.String uploadType) {
1286+
return (Hibernate) super.setUploadType(uploadType);
1287+
}
1288+
1289+
@Override
1290+
public Hibernate setUploadProtocol(java.lang.String uploadProtocol) {
1291+
return (Hibernate) super.setUploadProtocol(uploadProtocol);
1292+
}
1293+
1294+
/**
1295+
* Required. The resource name of the environment to hibernate, in the form:
1296+
* "projects/{project}/locations/{location}/environments/{environment}"
1297+
*/
1298+
@com.google.api.client.util.Key
1299+
private java.lang.String name;
1300+
1301+
/** Required. The resource name of the environment to hibernate, in the form:
1302+
"projects/{project}/locations/{location}/environments/{environment}"
1303+
*/
1304+
public java.lang.String getName() {
1305+
return name;
1306+
}
1307+
1308+
/**
1309+
* Required. The resource name of the environment to hibernate, in the form:
1310+
* "projects/{project}/locations/{location}/environments/{environment}"
1311+
*/
1312+
public Hibernate setName(java.lang.String name) {
1313+
if (!getSuppressPatternChecks()) {
1314+
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
1315+
"Parameter name must conform to the pattern " +
1316+
"^projects/[^/]+/locations/[^/]+/environments/[^/]+$");
1317+
}
1318+
this.name = name;
1319+
return this;
1320+
}
1321+
1322+
@Override
1323+
public Hibernate set(String parameterName, Object value) {
1324+
return (Hibernate) super.set(parameterName, value);
1325+
}
1326+
}
11811327
/**
11821328
* List environments.
11831329
*
@@ -2122,6 +2268,151 @@ public RestartWebServer set(String parameterName, Object value) {
21222268
return (RestartWebServer) super.set(parameterName, value);
21232269
}
21242270
}
2271+
/**
2272+
* Resumes (unpauses) a hibernated environment. It requests the environment to switch to the
2273+
* `RUNNING` state, so that it is ready to use and run DAGs. This method is supported for Cloud
2274+
* Composer environments in development mode in versions composer-3-airflow-*.*.*-build.* and newer.
2275+
*
2276+
* Create a request for the method "environments.resume".
2277+
*
2278+
* This request holds the parameters needed by the composer server. After setting any optional
2279+
* parameters, call the {@link Resume#execute()} method to invoke the remote operation.
2280+
*
2281+
* @param name Required. The resource name of the environment to resume, in the form:
2282+
* "projects/{project}/locations/{location}/environments/{environment}"
2283+
* @param content the {@link com.google.api.services.composer.v1.model.ResumeEnvironmentRequest}
2284+
* @return the request
2285+
*/
2286+
public Resume resume(java.lang.String name, com.google.api.services.composer.v1.model.ResumeEnvironmentRequest content) throws java.io.IOException {
2287+
Resume result = new Resume(name, content);
2288+
initialize(result);
2289+
return result;
2290+
}
2291+
2292+
public class Resume extends CloudComposerRequest<com.google.api.services.composer.v1.model.Operation> {
2293+
2294+
private static final String REST_PATH = "v1/{+name}:resume";
2295+
2296+
private final java.util.regex.Pattern NAME_PATTERN =
2297+
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+/environments/[^/]+$");
2298+
2299+
/**
2300+
* Resumes (unpauses) a hibernated environment. It requests the environment to switch to the
2301+
* `RUNNING` state, so that it is ready to use and run DAGs. This method is supported for Cloud
2302+
* Composer environments in development mode in versions composer-3-airflow-*.*.*-build.* and
2303+
* newer.
2304+
*
2305+
* Create a request for the method "environments.resume".
2306+
*
2307+
* This request holds the parameters needed by the the composer server. After setting any
2308+
* optional parameters, call the {@link Resume#execute()} method to invoke the remote operation.
2309+
* <p> {@link
2310+
* Resume#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
2311+
* be called to initialize this instance immediately after invoking the constructor. </p>
2312+
*
2313+
* @param name Required. The resource name of the environment to resume, in the form:
2314+
* "projects/{project}/locations/{location}/environments/{environment}"
2315+
* @param content the {@link com.google.api.services.composer.v1.model.ResumeEnvironmentRequest}
2316+
* @since 1.13
2317+
*/
2318+
protected Resume(java.lang.String name, com.google.api.services.composer.v1.model.ResumeEnvironmentRequest content) {
2319+
super(CloudComposer.this, "POST", REST_PATH, content, com.google.api.services.composer.v1.model.Operation.class);
2320+
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
2321+
if (!getSuppressPatternChecks()) {
2322+
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
2323+
"Parameter name must conform to the pattern " +
2324+
"^projects/[^/]+/locations/[^/]+/environments/[^/]+$");
2325+
}
2326+
}
2327+
2328+
@Override
2329+
public Resume set$Xgafv(java.lang.String $Xgafv) {
2330+
return (Resume) super.set$Xgafv($Xgafv);
2331+
}
2332+
2333+
@Override
2334+
public Resume setAccessToken(java.lang.String accessToken) {
2335+
return (Resume) super.setAccessToken(accessToken);
2336+
}
2337+
2338+
@Override
2339+
public Resume setAlt(java.lang.String alt) {
2340+
return (Resume) super.setAlt(alt);
2341+
}
2342+
2343+
@Override
2344+
public Resume setCallback(java.lang.String callback) {
2345+
return (Resume) super.setCallback(callback);
2346+
}
2347+
2348+
@Override
2349+
public Resume setFields(java.lang.String fields) {
2350+
return (Resume) super.setFields(fields);
2351+
}
2352+
2353+
@Override
2354+
public Resume setKey(java.lang.String key) {
2355+
return (Resume) super.setKey(key);
2356+
}
2357+
2358+
@Override
2359+
public Resume setOauthToken(java.lang.String oauthToken) {
2360+
return (Resume) super.setOauthToken(oauthToken);
2361+
}
2362+
2363+
@Override
2364+
public Resume setPrettyPrint(java.lang.Boolean prettyPrint) {
2365+
return (Resume) super.setPrettyPrint(prettyPrint);
2366+
}
2367+
2368+
@Override
2369+
public Resume setQuotaUser(java.lang.String quotaUser) {
2370+
return (Resume) super.setQuotaUser(quotaUser);
2371+
}
2372+
2373+
@Override
2374+
public Resume setUploadType(java.lang.String uploadType) {
2375+
return (Resume) super.setUploadType(uploadType);
2376+
}
2377+
2378+
@Override
2379+
public Resume setUploadProtocol(java.lang.String uploadProtocol) {
2380+
return (Resume) super.setUploadProtocol(uploadProtocol);
2381+
}
2382+
2383+
/**
2384+
* Required. The resource name of the environment to resume, in the form:
2385+
* "projects/{project}/locations/{location}/environments/{environment}"
2386+
*/
2387+
@com.google.api.client.util.Key
2388+
private java.lang.String name;
2389+
2390+
/** Required. The resource name of the environment to resume, in the form:
2391+
"projects/{project}/locations/{location}/environments/{environment}"
2392+
*/
2393+
public java.lang.String getName() {
2394+
return name;
2395+
}
2396+
2397+
/**
2398+
* Required. The resource name of the environment to resume, in the form:
2399+
* "projects/{project}/locations/{location}/environments/{environment}"
2400+
*/
2401+
public Resume setName(java.lang.String name) {
2402+
if (!getSuppressPatternChecks()) {
2403+
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
2404+
"Parameter name must conform to the pattern " +
2405+
"^projects/[^/]+/locations/[^/]+/environments/[^/]+$");
2406+
}
2407+
this.name = name;
2408+
return this;
2409+
}
2410+
2411+
@Override
2412+
public Resume set(String parameterName, Object value) {
2413+
return (Resume) super.set(parameterName, value);
2414+
}
2415+
}
21252416
/**
21262417
* Creates a snapshots of a Cloud Composer environment. As a result of this operation, snapshot of
21272418
* environment's state is stored in a location specified in the SaveSnapshotRequest.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
3+
* in compliance with the License. You may obtain a copy of the License at
4+
*
5+
* http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under the License
8+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
9+
* or implied. See the License for the specific language governing permissions and limitations under
10+
* the License.
11+
*/
12+
/*
13+
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
14+
* Modify at your own risk.
15+
*/
16+
17+
package com.google.api.services.composer.v1.model;
18+
19+
/**
20+
* Request to hibernate a Composer environment.
21+
*
22+
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
23+
* transmitted over HTTP when working with the Cloud Composer API. For a detailed explanation see:
24+
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
25+
* </p>
26+
*
27+
* @author Google, Inc.
28+
*/
29+
@SuppressWarnings("javadoc")
30+
public final class HibernateEnvironmentRequest extends com.google.api.client.json.GenericJson {
31+
32+
@Override
33+
public HibernateEnvironmentRequest set(String fieldName, Object value) {
34+
return (HibernateEnvironmentRequest) super.set(fieldName, value);
35+
}
36+
37+
@Override
38+
public HibernateEnvironmentRequest clone() {
39+
return (HibernateEnvironmentRequest) super.clone();
40+
}
41+
42+
}

0 commit comments

Comments
 (0)