{@link + * Hibernate#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} + * must be called to initialize this instance immediately after invoking the constructor.
+ * + * @param name Required. The resource name of the environment to hibernate, in the form: + * "projects/{project}/locations/{location}/environments/{environment}" + * @param content the {@link com.google.api.services.composer.v1beta1.model.HibernateEnvironmentRequest} + * @since 1.13 + */ + protected Hibernate(java.lang.String name, com.google.api.services.composer.v1beta1.model.HibernateEnvironmentRequest content) { + super(CloudComposer.this, "POST", REST_PATH, content, com.google.api.services.composer.v1beta1.model.Operation.class); + this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/environments/[^/]+$"); + } + } + + @Override + public Hibernate set$Xgafv(java.lang.String $Xgafv) { + return (Hibernate) super.set$Xgafv($Xgafv); + } + + @Override + public Hibernate setAccessToken(java.lang.String accessToken) { + return (Hibernate) super.setAccessToken(accessToken); + } + + @Override + public Hibernate setAlt(java.lang.String alt) { + return (Hibernate) super.setAlt(alt); + } + + @Override + public Hibernate setCallback(java.lang.String callback) { + return (Hibernate) super.setCallback(callback); + } + + @Override + public Hibernate setFields(java.lang.String fields) { + return (Hibernate) super.setFields(fields); + } + + @Override + public Hibernate setKey(java.lang.String key) { + return (Hibernate) super.setKey(key); + } + + @Override + public Hibernate setOauthToken(java.lang.String oauthToken) { + return (Hibernate) super.setOauthToken(oauthToken); + } + + @Override + public Hibernate setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Hibernate) super.setPrettyPrint(prettyPrint); + } + + @Override + public Hibernate setQuotaUser(java.lang.String quotaUser) { + return (Hibernate) super.setQuotaUser(quotaUser); + } + + @Override + public Hibernate setUploadType(java.lang.String uploadType) { + return (Hibernate) super.setUploadType(uploadType); + } + + @Override + public Hibernate setUploadProtocol(java.lang.String uploadProtocol) { + return (Hibernate) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The resource name of the environment to hibernate, in the form: + * "projects/{project}/locations/{location}/environments/{environment}" + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Required. The resource name of the environment to hibernate, in the form: + "projects/{project}/locations/{location}/environments/{environment}" + */ + public java.lang.String getName() { + return name; + } + + /** + * Required. The resource name of the environment to hibernate, in the form: + * "projects/{project}/locations/{location}/environments/{environment}" + */ + public Hibernate setName(java.lang.String name) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/environments/[^/]+$"); + } + this.name = name; + return this; + } + + @Override + public Hibernate set(String parameterName, Object value) { + return (Hibernate) super.set(parameterName, value); + } + } /** * List environments. * @@ -2159,6 +2305,151 @@ public RestartWebServer set(String parameterName, Object value) { return (RestartWebServer) super.set(parameterName, value); } } + /** + * Resumes (unpauses) a hibernated environment. It requests the environment to switch to the RUNNING + * state, so that it is ready to use and run DAGs. This method is supported for Cloud Composer + * environments in development mode in versions composer-3-airflow-*.*.*-build.* and newer. + * + * Create a request for the method "environments.resume". + * + * This request holds the parameters needed by the composer server. After setting any optional + * parameters, call the {@link Resume#execute()} method to invoke the remote operation. + * + * @param name Required. The resource name of the environment to resume, in the form: + * "projects/{project}/locations/{location}/environments/{environment}" + * @param content the {@link com.google.api.services.composer.v1beta1.model.ResumeEnvironmentRequest} + * @return the request + */ + public Resume resume(java.lang.String name, com.google.api.services.composer.v1beta1.model.ResumeEnvironmentRequest content) throws java.io.IOException { + Resume result = new Resume(name, content); + initialize(result); + return result; + } + + public class Resume extends CloudComposerRequest{@link + * Resume#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must + * be called to initialize this instance immediately after invoking the constructor.
+ * + * @param name Required. The resource name of the environment to resume, in the form: + * "projects/{project}/locations/{location}/environments/{environment}" + * @param content the {@link com.google.api.services.composer.v1beta1.model.ResumeEnvironmentRequest} + * @since 1.13 + */ + protected Resume(java.lang.String name, com.google.api.services.composer.v1beta1.model.ResumeEnvironmentRequest content) { + super(CloudComposer.this, "POST", REST_PATH, content, com.google.api.services.composer.v1beta1.model.Operation.class); + this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/environments/[^/]+$"); + } + } + + @Override + public Resume set$Xgafv(java.lang.String $Xgafv) { + return (Resume) super.set$Xgafv($Xgafv); + } + + @Override + public Resume setAccessToken(java.lang.String accessToken) { + return (Resume) super.setAccessToken(accessToken); + } + + @Override + public Resume setAlt(java.lang.String alt) { + return (Resume) super.setAlt(alt); + } + + @Override + public Resume setCallback(java.lang.String callback) { + return (Resume) super.setCallback(callback); + } + + @Override + public Resume setFields(java.lang.String fields) { + return (Resume) super.setFields(fields); + } + + @Override + public Resume setKey(java.lang.String key) { + return (Resume) super.setKey(key); + } + + @Override + public Resume setOauthToken(java.lang.String oauthToken) { + return (Resume) super.setOauthToken(oauthToken); + } + + @Override + public Resume setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Resume) super.setPrettyPrint(prettyPrint); + } + + @Override + public Resume setQuotaUser(java.lang.String quotaUser) { + return (Resume) super.setQuotaUser(quotaUser); + } + + @Override + public Resume setUploadType(java.lang.String uploadType) { + return (Resume) super.setUploadType(uploadType); + } + + @Override + public Resume setUploadProtocol(java.lang.String uploadProtocol) { + return (Resume) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The resource name of the environment to resume, in the form: + * "projects/{project}/locations/{location}/environments/{environment}" + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Required. The resource name of the environment to resume, in the form: + "projects/{project}/locations/{location}/environments/{environment}" + */ + public java.lang.String getName() { + return name; + } + + /** + * Required. The resource name of the environment to resume, in the form: + * "projects/{project}/locations/{location}/environments/{environment}" + */ + public Resume setName(java.lang.String name) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(), + "Parameter name must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+/environments/[^/]+$"); + } + this.name = name; + return this; + } + + @Override + public Resume set(String parameterName, Object value) { + return (Resume) super.set(parameterName, value); + } + } /** * Creates a snapshots of a Cloud Composer environment. As a result of this operation, snapshot of * environment's state is stored in a location specified in the SaveSnapshotRequest. diff --git a/clients/google-api-services-composer/v1beta1/2.0.0/com/google/api/services/composer/v1beta1/model/Environment.java b/clients/google-api-services-composer/v1beta1/2.0.0/com/google/api/services/composer/v1beta1/model/Environment.java index e4684be3ac4..cb5fa38e2fa 100644 --- a/clients/google-api-services-composer/v1beta1/2.0.0/com/google/api/services/composer/v1beta1/model/Environment.java +++ b/clients/google-api-services-composer/v1beta1/2.0.0/com/google/api/services/composer/v1beta1/model/Environment.java @@ -54,6 +54,14 @@ public final class Environment extends com.google.api.client.json.GenericJson { @com.google.api.client.util.Key private java.util.MapThis is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Composer API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *
+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class HibernateEnvironmentRequest extends com.google.api.client.json.GenericJson { + + @Override + public HibernateEnvironmentRequest set(String fieldName, Object value) { + return (HibernateEnvironmentRequest) super.set(fieldName, value); + } + + @Override + public HibernateEnvironmentRequest clone() { + return (HibernateEnvironmentRequest) super.clone(); + } + +} diff --git a/clients/google-api-services-composer/v1beta1/2.0.0/com/google/api/services/composer/v1beta1/model/ResumeEnvironmentRequest.java b/clients/google-api-services-composer/v1beta1/2.0.0/com/google/api/services/composer/v1beta1/model/ResumeEnvironmentRequest.java new file mode 100644 index 00000000000..89f4329e387 --- /dev/null +++ b/clients/google-api-services-composer/v1beta1/2.0.0/com/google/api/services/composer/v1beta1/model/ResumeEnvironmentRequest.java @@ -0,0 +1,42 @@ +/* + * 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 + * + * http://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. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.composer.v1beta1.model; + +/** + * Request to resume a Composer environment. + * + *This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the Cloud Composer API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *
+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class ResumeEnvironmentRequest extends com.google.api.client.json.GenericJson { + + @Override + public ResumeEnvironmentRequest set(String fieldName, Object value) { + return (ResumeEnvironmentRequest) super.set(fieldName, value); + } + + @Override + public ResumeEnvironmentRequest clone() { + return (ResumeEnvironmentRequest) super.clone(); + } + +} diff --git a/clients/google-api-services-composer/v1beta1/2.0.0/pom.xml b/clients/google-api-services-composer/v1beta1/2.0.0/pom.xml index c80de1f852c..619e83fc937 100644 --- a/clients/google-api-services-composer/v1beta1/2.0.0/pom.xml +++ b/clients/google-api-services-composer/v1beta1/2.0.0/pom.xml @@ -8,8 +8,8 @@