{@link + * Cancel#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must + * be called to initialize this instance immediately after invoking the constructor.
+ * + * @param name Required. The name of the rollout to cancel. + * projects/{project}/locations/{location}/rollouts/{rollout} + * @param content the {@link com.google.api.services.gkehub.v1alpha.model.CancelRolloutRequest} + * @since 1.13 + */ + protected Cancel(java.lang.String name, com.google.api.services.gkehub.v1alpha.model.CancelRolloutRequest content) { + super(GKEHub.this, "POST", REST_PATH, content, com.google.api.services.gkehub.v1alpha.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/[^/]+/rollouts/[^/]+$"); + } + } + + @Override + public Cancel set$Xgafv(java.lang.String $Xgafv) { + return (Cancel) super.set$Xgafv($Xgafv); + } + + @Override + public Cancel setAccessToken(java.lang.String accessToken) { + return (Cancel) super.setAccessToken(accessToken); + } + + @Override + public Cancel setAlt(java.lang.String alt) { + return (Cancel) super.setAlt(alt); + } + + @Override + public Cancel setCallback(java.lang.String callback) { + return (Cancel) super.setCallback(callback); + } + + @Override + public Cancel setFields(java.lang.String fields) { + return (Cancel) super.setFields(fields); + } + + @Override + public Cancel setKey(java.lang.String key) { + return (Cancel) super.setKey(key); + } + + @Override + public Cancel setOauthToken(java.lang.String oauthToken) { + return (Cancel) super.setOauthToken(oauthToken); + } + + @Override + public Cancel setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Cancel) super.setPrettyPrint(prettyPrint); + } + + @Override + public Cancel setQuotaUser(java.lang.String quotaUser) { + return (Cancel) super.setQuotaUser(quotaUser); + } + + @Override + public Cancel setUploadType(java.lang.String uploadType) { + return (Cancel) super.setUploadType(uploadType); + } + + @Override + public Cancel setUploadProtocol(java.lang.String uploadProtocol) { + return (Cancel) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The name of the rollout to cancel. + * projects/{project}/locations/{location}/rollouts/{rollout} + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Required. The name of the rollout to cancel. + projects/{project}/locations/{location}/rollouts/{rollout} + */ + public java.lang.String getName() { + return name; + } + + /** + * Required. The name of the rollout to cancel. + * projects/{project}/locations/{location}/rollouts/{rollout} + */ + public Cancel 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/[^/]+/rollouts/[^/]+$"); + } + this.name = name; + return this; + } + + @Override + public Cancel set(String parameterName, Object value) { + return (Cancel) super.set(parameterName, value); + } + } /** * Force-completes a rollout stage. Only the active stage of an active rollout can be force- * completed. @@ -9602,6 +9745,286 @@ public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } + /** + * Pauses a running Rollout. The rollout will not be started on new clusters, however the rollout + * running on the cluster will be allowed to finish. + * + * Create a request for the method "rollouts.pause". + * + * This request holds the parameters needed by the gkehub server. After setting any optional + * parameters, call the {@link Pause#execute()} method to invoke the remote operation. + * + * @param name Required. The name of the rollout to pause. + * projects/{project}/locations/{location}/rollouts/{rollout} + * @param content the {@link com.google.api.services.gkehub.v1alpha.model.PauseRolloutRequest} + * @return the request + */ + public Pause pause(java.lang.String name, com.google.api.services.gkehub.v1alpha.model.PauseRolloutRequest content) throws java.io.IOException { + Pause result = new Pause(name, content); + initialize(result); + return result; + } + + public class Pause extends GKEHubRequest{@link + * Pause#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must + * be called to initialize this instance immediately after invoking the constructor.
+ * + * @param name Required. The name of the rollout to pause. + * projects/{project}/locations/{location}/rollouts/{rollout} + * @param content the {@link com.google.api.services.gkehub.v1alpha.model.PauseRolloutRequest} + * @since 1.13 + */ + protected Pause(java.lang.String name, com.google.api.services.gkehub.v1alpha.model.PauseRolloutRequest content) { + super(GKEHub.this, "POST", REST_PATH, content, com.google.api.services.gkehub.v1alpha.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/[^/]+/rollouts/[^/]+$"); + } + } + + @Override + public Pause set$Xgafv(java.lang.String $Xgafv) { + return (Pause) super.set$Xgafv($Xgafv); + } + + @Override + public Pause setAccessToken(java.lang.String accessToken) { + return (Pause) super.setAccessToken(accessToken); + } + + @Override + public Pause setAlt(java.lang.String alt) { + return (Pause) super.setAlt(alt); + } + + @Override + public Pause setCallback(java.lang.String callback) { + return (Pause) super.setCallback(callback); + } + + @Override + public Pause setFields(java.lang.String fields) { + return (Pause) super.setFields(fields); + } + + @Override + public Pause setKey(java.lang.String key) { + return (Pause) super.setKey(key); + } + + @Override + public Pause setOauthToken(java.lang.String oauthToken) { + return (Pause) super.setOauthToken(oauthToken); + } + + @Override + public Pause setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Pause) super.setPrettyPrint(prettyPrint); + } + + @Override + public Pause setQuotaUser(java.lang.String quotaUser) { + return (Pause) super.setQuotaUser(quotaUser); + } + + @Override + public Pause setUploadType(java.lang.String uploadType) { + return (Pause) super.setUploadType(uploadType); + } + + @Override + public Pause setUploadProtocol(java.lang.String uploadProtocol) { + return (Pause) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The name of the rollout to pause. + * projects/{project}/locations/{location}/rollouts/{rollout} + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Required. The name of the rollout to pause. + projects/{project}/locations/{location}/rollouts/{rollout} + */ + public java.lang.String getName() { + return name; + } + + /** + * Required. The name of the rollout to pause. + * projects/{project}/locations/{location}/rollouts/{rollout} + */ + public Pause 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/[^/]+/rollouts/[^/]+$"); + } + this.name = name; + return this; + } + + @Override + public Pause set(String parameterName, Object value) { + return (Pause) super.set(parameterName, value); + } + } + /** + * Resume a paused Rollout. The rollout will be resumed and allowed to be started on clusters. + * + * Create a request for the method "rollouts.resume". + * + * This request holds the parameters needed by the gkehub server. After setting any optional + * parameters, call the {@link Resume#execute()} method to invoke the remote operation. + * + * @param name Required. The name of the rollout to resume. + * projects/{project}/locations/{location}/rollouts/{rollout} + * @param content the {@link com.google.api.services.gkehub.v1alpha.model.ResumeRolloutRequest} + * @return the request + */ + public Resume resume(java.lang.String name, com.google.api.services.gkehub.v1alpha.model.ResumeRolloutRequest content) throws java.io.IOException { + Resume result = new Resume(name, content); + initialize(result); + return result; + } + + public class Resume extends GKEHubRequest{@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 name of the rollout to resume. + * projects/{project}/locations/{location}/rollouts/{rollout} + * @param content the {@link com.google.api.services.gkehub.v1alpha.model.ResumeRolloutRequest} + * @since 1.13 + */ + protected Resume(java.lang.String name, com.google.api.services.gkehub.v1alpha.model.ResumeRolloutRequest content) { + super(GKEHub.this, "POST", REST_PATH, content, com.google.api.services.gkehub.v1alpha.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/[^/]+/rollouts/[^/]+$"); + } + } + + @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 name of the rollout to resume. + * projects/{project}/locations/{location}/rollouts/{rollout} + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Required. The name of the rollout to resume. + projects/{project}/locations/{location}/rollouts/{rollout} + */ + public java.lang.String getName() { + return name; + } + + /** + * Required. The name of the rollout to resume. + * projects/{project}/locations/{location}/rollouts/{rollout} + */ + 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/[^/]+/rollouts/[^/]+$"); + } + this.name = name; + return this; + } + + @Override + public Resume set(String parameterName, Object value) { + return (Resume) super.set(parameterName, value); + } + } } /** diff --git a/clients/google-api-services-gkehub/v1alpha/2.0.0/com/google/api/services/gkehub/v1alpha/model/CancelRolloutRequest.java b/clients/google-api-services-gkehub/v1alpha/2.0.0/com/google/api/services/gkehub/v1alpha/model/CancelRolloutRequest.java new file mode 100644 index 00000000000..90418a93291 --- /dev/null +++ b/clients/google-api-services-gkehub/v1alpha/2.0.0/com/google/api/services/gkehub/v1alpha/model/CancelRolloutRequest.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.gkehub.v1alpha.model; + +/** + * Request message for cancelling a rollout. + * + *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 GKE Hub 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 CancelRolloutRequest extends com.google.api.client.json.GenericJson { + + @Override + public CancelRolloutRequest set(String fieldName, Object value) { + return (CancelRolloutRequest) super.set(fieldName, value); + } + + @Override + public CancelRolloutRequest clone() { + return (CancelRolloutRequest) super.clone(); + } + +} diff --git a/clients/google-api-services-gkehub/v1alpha/2.0.0/com/google/api/services/gkehub/v1alpha/model/PauseRolloutRequest.java b/clients/google-api-services-gkehub/v1alpha/2.0.0/com/google/api/services/gkehub/v1alpha/model/PauseRolloutRequest.java new file mode 100644 index 00000000000..1e2833205cc --- /dev/null +++ b/clients/google-api-services-gkehub/v1alpha/2.0.0/com/google/api/services/gkehub/v1alpha/model/PauseRolloutRequest.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.gkehub.v1alpha.model; + +/** + * Request message for pausing a rollout. + * + *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 GKE Hub 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 PauseRolloutRequest extends com.google.api.client.json.GenericJson { + + @Override + public PauseRolloutRequest set(String fieldName, Object value) { + return (PauseRolloutRequest) super.set(fieldName, value); + } + + @Override + public PauseRolloutRequest clone() { + return (PauseRolloutRequest) super.clone(); + } + +} diff --git a/clients/google-api-services-gkehub/v1alpha/2.0.0/com/google/api/services/gkehub/v1alpha/model/ResumeRolloutRequest.java b/clients/google-api-services-gkehub/v1alpha/2.0.0/com/google/api/services/gkehub/v1alpha/model/ResumeRolloutRequest.java new file mode 100644 index 00000000000..26344020424 --- /dev/null +++ b/clients/google-api-services-gkehub/v1alpha/2.0.0/com/google/api/services/gkehub/v1alpha/model/ResumeRolloutRequest.java @@ -0,0 +1,90 @@ +/* + * 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.gkehub.v1alpha.model; + +/** + * Request message for resuming a rollout. + * + *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 GKE Hub 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 ResumeRolloutRequest extends com.google.api.client.json.GenericJson { + + /** + * Optional. The duration to offset the Rollout schedule by. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private String scheduleOffset; + + /** + * Optional. If set, resume rollout will be executed in dry-run mode. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.Boolean validateOnly; + + /** + * Optional. The duration to offset the Rollout schedule by. + * @return value or {@code null} for none + */ + public String getScheduleOffset() { + return scheduleOffset; + } + + /** + * Optional. The duration to offset the Rollout schedule by. + * @param scheduleOffset scheduleOffset or {@code null} for none + */ + public ResumeRolloutRequest setScheduleOffset(String scheduleOffset) { + this.scheduleOffset = scheduleOffset; + return this; + } + + /** + * Optional. If set, resume rollout will be executed in dry-run mode. + * @return value or {@code null} for none + */ + public java.lang.Boolean getValidateOnly() { + return validateOnly; + } + + /** + * Optional. If set, resume rollout will be executed in dry-run mode. + * @param validateOnly validateOnly or {@code null} for none + */ + public ResumeRolloutRequest setValidateOnly(java.lang.Boolean validateOnly) { + this.validateOnly = validateOnly; + return this; + } + + @Override + public ResumeRolloutRequest set(String fieldName, Object value) { + return (ResumeRolloutRequest) super.set(fieldName, value); + } + + @Override + public ResumeRolloutRequest clone() { + return (ResumeRolloutRequest) super.clone(); + } + +} diff --git a/clients/google-api-services-gkehub/v1alpha/2.0.0/pom.xml b/clients/google-api-services-gkehub/v1alpha/2.0.0/pom.xml index 2cbca3d2553..9ac265c4775 100644 --- a/clients/google-api-services-gkehub/v1alpha/2.0.0/pom.xml +++ b/clients/google-api-services-gkehub/v1alpha/2.0.0/pom.xml @@ -8,8 +8,8 @@{@link + * Cancel#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must + * be called to initialize this instance immediately after invoking the constructor.
+ * + * @param name Required. The name of the rollout to cancel. + * projects/{project}/locations/{location}/rollouts/{rollout} + * @param content the {@link com.google.api.services.gkehub.v1beta.model.CancelRolloutRequest} + * @since 1.13 + */ + protected Cancel(java.lang.String name, com.google.api.services.gkehub.v1beta.model.CancelRolloutRequest content) { + super(GKEHub.this, "POST", REST_PATH, content, com.google.api.services.gkehub.v1beta.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/[^/]+/rollouts/[^/]+$"); + } + } + + @Override + public Cancel set$Xgafv(java.lang.String $Xgafv) { + return (Cancel) super.set$Xgafv($Xgafv); + } + + @Override + public Cancel setAccessToken(java.lang.String accessToken) { + return (Cancel) super.setAccessToken(accessToken); + } + + @Override + public Cancel setAlt(java.lang.String alt) { + return (Cancel) super.setAlt(alt); + } + + @Override + public Cancel setCallback(java.lang.String callback) { + return (Cancel) super.setCallback(callback); + } + + @Override + public Cancel setFields(java.lang.String fields) { + return (Cancel) super.setFields(fields); + } + + @Override + public Cancel setKey(java.lang.String key) { + return (Cancel) super.setKey(key); + } + + @Override + public Cancel setOauthToken(java.lang.String oauthToken) { + return (Cancel) super.setOauthToken(oauthToken); + } + + @Override + public Cancel setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Cancel) super.setPrettyPrint(prettyPrint); + } + + @Override + public Cancel setQuotaUser(java.lang.String quotaUser) { + return (Cancel) super.setQuotaUser(quotaUser); + } + + @Override + public Cancel setUploadType(java.lang.String uploadType) { + return (Cancel) super.setUploadType(uploadType); + } + + @Override + public Cancel setUploadProtocol(java.lang.String uploadProtocol) { + return (Cancel) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The name of the rollout to cancel. + * projects/{project}/locations/{location}/rollouts/{rollout} + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Required. The name of the rollout to cancel. + projects/{project}/locations/{location}/rollouts/{rollout} + */ + public java.lang.String getName() { + return name; + } + + /** + * Required. The name of the rollout to cancel. + * projects/{project}/locations/{location}/rollouts/{rollout} + */ + public Cancel 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/[^/]+/rollouts/[^/]+$"); + } + this.name = name; + return this; + } + + @Override + public Cancel set(String parameterName, Object value) { + return (Cancel) super.set(parameterName, value); + } + } /** * Force-completes a rollout stage. Only the active stage of an active rollout can be force- * completed. @@ -8826,6 +8969,286 @@ public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } + /** + * Pauses a running Rollout. The rollout will not be started on new clusters, however the rollout + * running on the cluster will be allowed to finish. + * + * Create a request for the method "rollouts.pause". + * + * This request holds the parameters needed by the gkehub server. After setting any optional + * parameters, call the {@link Pause#execute()} method to invoke the remote operation. + * + * @param name Required. The name of the rollout to pause. + * projects/{project}/locations/{location}/rollouts/{rollout} + * @param content the {@link com.google.api.services.gkehub.v1beta.model.PauseRolloutRequest} + * @return the request + */ + public Pause pause(java.lang.String name, com.google.api.services.gkehub.v1beta.model.PauseRolloutRequest content) throws java.io.IOException { + Pause result = new Pause(name, content); + initialize(result); + return result; + } + + public class Pause extends GKEHubRequest{@link + * Pause#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must + * be called to initialize this instance immediately after invoking the constructor.
+ * + * @param name Required. The name of the rollout to pause. + * projects/{project}/locations/{location}/rollouts/{rollout} + * @param content the {@link com.google.api.services.gkehub.v1beta.model.PauseRolloutRequest} + * @since 1.13 + */ + protected Pause(java.lang.String name, com.google.api.services.gkehub.v1beta.model.PauseRolloutRequest content) { + super(GKEHub.this, "POST", REST_PATH, content, com.google.api.services.gkehub.v1beta.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/[^/]+/rollouts/[^/]+$"); + } + } + + @Override + public Pause set$Xgafv(java.lang.String $Xgafv) { + return (Pause) super.set$Xgafv($Xgafv); + } + + @Override + public Pause setAccessToken(java.lang.String accessToken) { + return (Pause) super.setAccessToken(accessToken); + } + + @Override + public Pause setAlt(java.lang.String alt) { + return (Pause) super.setAlt(alt); + } + + @Override + public Pause setCallback(java.lang.String callback) { + return (Pause) super.setCallback(callback); + } + + @Override + public Pause setFields(java.lang.String fields) { + return (Pause) super.setFields(fields); + } + + @Override + public Pause setKey(java.lang.String key) { + return (Pause) super.setKey(key); + } + + @Override + public Pause setOauthToken(java.lang.String oauthToken) { + return (Pause) super.setOauthToken(oauthToken); + } + + @Override + public Pause setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Pause) super.setPrettyPrint(prettyPrint); + } + + @Override + public Pause setQuotaUser(java.lang.String quotaUser) { + return (Pause) super.setQuotaUser(quotaUser); + } + + @Override + public Pause setUploadType(java.lang.String uploadType) { + return (Pause) super.setUploadType(uploadType); + } + + @Override + public Pause setUploadProtocol(java.lang.String uploadProtocol) { + return (Pause) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. The name of the rollout to pause. + * projects/{project}/locations/{location}/rollouts/{rollout} + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Required. The name of the rollout to pause. + projects/{project}/locations/{location}/rollouts/{rollout} + */ + public java.lang.String getName() { + return name; + } + + /** + * Required. The name of the rollout to pause. + * projects/{project}/locations/{location}/rollouts/{rollout} + */ + public Pause 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/[^/]+/rollouts/[^/]+$"); + } + this.name = name; + return this; + } + + @Override + public Pause set(String parameterName, Object value) { + return (Pause) super.set(parameterName, value); + } + } + /** + * Resume a paused Rollout. The rollout will be resumed and allowed to be started on clusters. + * + * Create a request for the method "rollouts.resume". + * + * This request holds the parameters needed by the gkehub server. After setting any optional + * parameters, call the {@link Resume#execute()} method to invoke the remote operation. + * + * @param name Required. The name of the rollout to resume. + * projects/{project}/locations/{location}/rollouts/{rollout} + * @param content the {@link com.google.api.services.gkehub.v1beta.model.ResumeRolloutRequest} + * @return the request + */ + public Resume resume(java.lang.String name, com.google.api.services.gkehub.v1beta.model.ResumeRolloutRequest content) throws java.io.IOException { + Resume result = new Resume(name, content); + initialize(result); + return result; + } + + public class Resume extends GKEHubRequest{@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 name of the rollout to resume. + * projects/{project}/locations/{location}/rollouts/{rollout} + * @param content the {@link com.google.api.services.gkehub.v1beta.model.ResumeRolloutRequest} + * @since 1.13 + */ + protected Resume(java.lang.String name, com.google.api.services.gkehub.v1beta.model.ResumeRolloutRequest content) { + super(GKEHub.this, "POST", REST_PATH, content, com.google.api.services.gkehub.v1beta.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/[^/]+/rollouts/[^/]+$"); + } + } + + @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 name of the rollout to resume. + * projects/{project}/locations/{location}/rollouts/{rollout} + */ + @com.google.api.client.util.Key + private java.lang.String name; + + /** Required. The name of the rollout to resume. + projects/{project}/locations/{location}/rollouts/{rollout} + */ + public java.lang.String getName() { + return name; + } + + /** + * Required. The name of the rollout to resume. + * projects/{project}/locations/{location}/rollouts/{rollout} + */ + 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/[^/]+/rollouts/[^/]+$"); + } + this.name = name; + return this; + } + + @Override + public Resume set(String parameterName, Object value) { + return (Resume) super.set(parameterName, value); + } + } } /** diff --git a/clients/google-api-services-gkehub/v1beta/2.0.0/com/google/api/services/gkehub/v1beta/model/CancelRolloutRequest.java b/clients/google-api-services-gkehub/v1beta/2.0.0/com/google/api/services/gkehub/v1beta/model/CancelRolloutRequest.java new file mode 100644 index 00000000000..72a756804de --- /dev/null +++ b/clients/google-api-services-gkehub/v1beta/2.0.0/com/google/api/services/gkehub/v1beta/model/CancelRolloutRequest.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.gkehub.v1beta.model; + +/** + * Request message for cancelling a rollout. + * + *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 GKE Hub 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 CancelRolloutRequest extends com.google.api.client.json.GenericJson { + + @Override + public CancelRolloutRequest set(String fieldName, Object value) { + return (CancelRolloutRequest) super.set(fieldName, value); + } + + @Override + public CancelRolloutRequest clone() { + return (CancelRolloutRequest) super.clone(); + } + +} diff --git a/clients/google-api-services-gkehub/v1beta/2.0.0/com/google/api/services/gkehub/v1beta/model/PauseRolloutRequest.java b/clients/google-api-services-gkehub/v1beta/2.0.0/com/google/api/services/gkehub/v1beta/model/PauseRolloutRequest.java new file mode 100644 index 00000000000..656130a85f6 --- /dev/null +++ b/clients/google-api-services-gkehub/v1beta/2.0.0/com/google/api/services/gkehub/v1beta/model/PauseRolloutRequest.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.gkehub.v1beta.model; + +/** + * Request message for pausing a rollout. + * + *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 GKE Hub 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 PauseRolloutRequest extends com.google.api.client.json.GenericJson { + + @Override + public PauseRolloutRequest set(String fieldName, Object value) { + return (PauseRolloutRequest) super.set(fieldName, value); + } + + @Override + public PauseRolloutRequest clone() { + return (PauseRolloutRequest) super.clone(); + } + +} diff --git a/clients/google-api-services-gkehub/v1beta/2.0.0/com/google/api/services/gkehub/v1beta/model/ResumeRolloutRequest.java b/clients/google-api-services-gkehub/v1beta/2.0.0/com/google/api/services/gkehub/v1beta/model/ResumeRolloutRequest.java new file mode 100644 index 00000000000..aba432efd60 --- /dev/null +++ b/clients/google-api-services-gkehub/v1beta/2.0.0/com/google/api/services/gkehub/v1beta/model/ResumeRolloutRequest.java @@ -0,0 +1,90 @@ +/* + * 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.gkehub.v1beta.model; + +/** + * Request message for resuming a rollout. + * + *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 GKE Hub 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 ResumeRolloutRequest extends com.google.api.client.json.GenericJson { + + /** + * Optional. The duration to offset the Rollout schedule by. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private String scheduleOffset; + + /** + * Optional. If set, resume rollout will be executed in dry-run mode. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.Boolean validateOnly; + + /** + * Optional. The duration to offset the Rollout schedule by. + * @return value or {@code null} for none + */ + public String getScheduleOffset() { + return scheduleOffset; + } + + /** + * Optional. The duration to offset the Rollout schedule by. + * @param scheduleOffset scheduleOffset or {@code null} for none + */ + public ResumeRolloutRequest setScheduleOffset(String scheduleOffset) { + this.scheduleOffset = scheduleOffset; + return this; + } + + /** + * Optional. If set, resume rollout will be executed in dry-run mode. + * @return value or {@code null} for none + */ + public java.lang.Boolean getValidateOnly() { + return validateOnly; + } + + /** + * Optional. If set, resume rollout will be executed in dry-run mode. + * @param validateOnly validateOnly or {@code null} for none + */ + public ResumeRolloutRequest setValidateOnly(java.lang.Boolean validateOnly) { + this.validateOnly = validateOnly; + return this; + } + + @Override + public ResumeRolloutRequest set(String fieldName, Object value) { + return (ResumeRolloutRequest) super.set(fieldName, value); + } + + @Override + public ResumeRolloutRequest clone() { + return (ResumeRolloutRequest) super.clone(); + } + +} diff --git a/clients/google-api-services-gkehub/v1beta/2.0.0/pom.xml b/clients/google-api-services-gkehub/v1beta/2.0.0/pom.xml index ad43b3603a0..c0d9d2a8828 100644 --- a/clients/google-api-services-gkehub/v1beta/2.0.0/pom.xml +++ b/clients/google-api-services-gkehub/v1beta/2.0.0/pom.xml @@ -8,8 +8,8 @@