{@link UpgradeEdition#initialize(com.google.api.client.googleapis.services.Abstr + * actGoogleClientRequest)} must be called to initialize this instance immediately after invoking + * the constructor.
+ * + * @param parent The parent resource name that identifies the admin project and location, in the format + * `projects/{project}/locations/{location}`. For example, `projects/myproject/locations/us- + * west1`. + * @param content the {@link com.google.api.services.bigqueryreservation.v1.model.UpgradeEditionRequest} + * @since 1.13 + */ + protected UpgradeEdition(java.lang.String parent, com.google.api.services.bigqueryreservation.v1.model.UpgradeEditionRequest content) { + super(BigQueryReservation.this, "POST", REST_PATH, content, com.google.api.services.bigqueryreservation.v1.model.UpgradeEditionResponse.class); + this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+$"); + } + } + + @Override + public UpgradeEdition set$Xgafv(java.lang.String $Xgafv) { + return (UpgradeEdition) super.set$Xgafv($Xgafv); + } + + @Override + public UpgradeEdition setAccessToken(java.lang.String accessToken) { + return (UpgradeEdition) super.setAccessToken(accessToken); + } + + @Override + public UpgradeEdition setAlt(java.lang.String alt) { + return (UpgradeEdition) super.setAlt(alt); + } + + @Override + public UpgradeEdition setCallback(java.lang.String callback) { + return (UpgradeEdition) super.setCallback(callback); + } + + @Override + public UpgradeEdition setFields(java.lang.String fields) { + return (UpgradeEdition) super.setFields(fields); + } + + @Override + public UpgradeEdition setKey(java.lang.String key) { + return (UpgradeEdition) super.setKey(key); + } + + @Override + public UpgradeEdition setOauthToken(java.lang.String oauthToken) { + return (UpgradeEdition) super.setOauthToken(oauthToken); + } + + @Override + public UpgradeEdition setPrettyPrint(java.lang.Boolean prettyPrint) { + return (UpgradeEdition) super.setPrettyPrint(prettyPrint); + } + + @Override + public UpgradeEdition setQuotaUser(java.lang.String quotaUser) { + return (UpgradeEdition) super.setQuotaUser(quotaUser); + } + + @Override + public UpgradeEdition setUploadType(java.lang.String uploadType) { + return (UpgradeEdition) super.setUploadType(uploadType); + } + + @Override + public UpgradeEdition setUploadProtocol(java.lang.String uploadProtocol) { + return (UpgradeEdition) super.setUploadProtocol(uploadProtocol); + } + + /** + * The parent resource name that identifies the admin project and location, in the format + * `projects/{project}/locations/{location}`. For example, `projects/myproject/locations/us- + * west1`. + */ + @com.google.api.client.util.Key + private java.lang.String parent; + + /** The parent resource name that identifies the admin project and location, in the format + `projects/{project}/locations/{location}`. For example, `projects/myproject/locations/us-west1`. + */ + public java.lang.String getParent() { + return parent; + } + + /** + * The parent resource name that identifies the admin project and location, in the format + * `projects/{project}/locations/{location}`. For example, `projects/myproject/locations/us- + * west1`. + */ + public UpgradeEdition setParent(java.lang.String parent) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(), + "Parameter parent must conform to the pattern " + + "^projects/[^/]+/locations/[^/]+$"); + } + this.parent = parent; + return this; + } + + @Override + public UpgradeEdition set(String parameterName, Object value) { + return (UpgradeEdition) super.set(parameterName, value); + } + } /** * An accessor for creating requests from the CapacityCommitments collection. diff --git a/clients/google-api-services-bigqueryreservation/v1/2.0.0/com/google/api/services/bigqueryreservation/v1/model/UpgradeEditionRequest.java b/clients/google-api-services-bigqueryreservation/v1/2.0.0/com/google/api/services/bigqueryreservation/v1/model/UpgradeEditionRequest.java new file mode 100644 index 00000000000..f020ebbd465 --- /dev/null +++ b/clients/google-api-services-bigqueryreservation/v1/2.0.0/com/google/api/services/bigqueryreservation/v1/model/UpgradeEditionRequest.java @@ -0,0 +1,140 @@ +/* + * 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.bigqueryreservation.v1.model; + +/** + * The request for ReservationService.UpgradeEdition. You must specify at least one reservation or + * capacity commitment. + * + *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 BigQuery Reservation 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 UpgradeEditionRequest extends com.google.api.client.json.GenericJson { + + /** + * Optional. The resource names of the capacity commitments to upgrade, in the format + * `projects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}`. For + * example, `projects/myproject/locations/us-west1/capacityCommitments/123`. These capacity + * commitments must be in the `ACTIVE` state and must exist under the specified `parent`. The + * `commitment_start_time` and `commitment_end_time` fields don't change after the upgrade. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.ListThis is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the BigQuery Reservation 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 UpgradeEditionResponse extends com.google.api.client.json.GenericJson { + + /** + * The updated capacity commitments after the upgrade. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List