Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-bigqueryreservation</artifactId>
<version>v1-rev20261024-2.9.2</version>
<version>v1-rev20261102-2.9.2</version>
</dependency>
</dependencies>
</project>
Expand All @@ -35,7 +35,7 @@ repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.apis:google-api-services-bigqueryreservation:v1-rev20261024-2.9.2'
implementation 'com.google.apis:google-api-services-bigqueryreservation:v1-rev20261102-2.9.2'
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,167 @@ public UpdateBiReservation set(String parameterName, Object value) {
return (UpdateBiReservation) super.set(parameterName, value);
}
}
/**
* Upgrades the edition for a list of reservations and capacity commitments. You can only upgrade to
* a higher edition (from `STANDARD` to `ENTERPRISE` or `ENTERPRISE_PLUS`, from `ENTERPRISE` to
* `ENTERPRISE_PLUS`, or from `EDITION_UNSPECIFIED` to `ENTERPRISE` or `ENTERPRISE_PLUS`). You can't
* downgrade an edition. The upgrade must not cause an overall flexible slot increase across the
* original and target editions (for example, by upgrading a reservation without upgrading its
* corresponding capacity commitment). Otherwise, the method fails with a
* `google.rpc.Code.FAILED_PRECONDITION` error. Before the upgrade, the service validates that the
* resources meet the requirements of the target edition (for example, all reservations within a
* reservation group must be upgraded together).
*
* Create a request for the method "locations.upgradeEdition".
*
* This request holds the parameters needed by the bigqueryreservation server. After setting any
* optional parameters, call the {@link UpgradeEdition#execute()} method to invoke the remote
* operation.
*
* @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}
* @return the request
*/
public UpgradeEdition upgradeEdition(java.lang.String parent, com.google.api.services.bigqueryreservation.v1.model.UpgradeEditionRequest content) throws java.io.IOException {
UpgradeEdition result = new UpgradeEdition(parent, content);
initialize(result);
return result;
}

public class UpgradeEdition extends BigQueryReservationRequest<com.google.api.services.bigqueryreservation.v1.model.UpgradeEditionResponse> {

private static final String REST_PATH = "v1/{+parent}:upgradeEdition";

private final java.util.regex.Pattern PARENT_PATTERN =
java.util.regex.Pattern.compile("^projects/[^/]+/locations/[^/]+$");

/**
* Upgrades the edition for a list of reservations and capacity commitments. You can only upgrade
* to a higher edition (from `STANDARD` to `ENTERPRISE` or `ENTERPRISE_PLUS`, from `ENTERPRISE` to
* `ENTERPRISE_PLUS`, or from `EDITION_UNSPECIFIED` to `ENTERPRISE` or `ENTERPRISE_PLUS`). You
* can't downgrade an edition. The upgrade must not cause an overall flexible slot increase across
* the original and target editions (for example, by upgrading a reservation without upgrading its
* corresponding capacity commitment). Otherwise, the method fails with a
* `google.rpc.Code.FAILED_PRECONDITION` error. Before the upgrade, the service validates that the
* resources meet the requirements of the target edition (for example, all reservations within a
* reservation group must be upgraded together).
*
* Create a request for the method "locations.upgradeEdition".
*
* This request holds the parameters needed by the the bigqueryreservation server. After setting
* any optional parameters, call the {@link UpgradeEdition#execute()} method to invoke the remote
* operation. <p> {@link UpgradeEdition#initialize(com.google.api.client.googleapis.services.Abstr
* actGoogleClientRequest)} must be called to initialize this instance immediately after invoking
* the constructor. </p>
*
* @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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
*
* <p> 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:
* <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>
* </p>
*
* @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.List<java.lang.String> capacityCommitments;

/**
* Optional. The resource names of the reservations to upgrade, in the format
* `projects/{project}/locations/{location}/reservations/{reservation}`. For example,
* `projects/myproject/locations/us-west1/reservations/team1-prod`. These reservations must exist
* under the specified `parent`.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List<java.lang.String> reservations;

/**
* The edition to upgrade the capacity commitments and reservations to. Supported values are
* `ENTERPRISE` and `ENTERPRISE_PLUS`.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String targetEdition;

/**
* 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.
* @return value or {@code null} for none
*/
public java.util.List<java.lang.String> getCapacityCommitments() {
return capacityCommitments;
}

/**
* 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.
* @param capacityCommitments capacityCommitments or {@code null} for none
*/
public UpgradeEditionRequest setCapacityCommitments(java.util.List<java.lang.String> capacityCommitments) {
this.capacityCommitments = capacityCommitments;
return this;
}

/**
* Optional. The resource names of the reservations to upgrade, in the format
* `projects/{project}/locations/{location}/reservations/{reservation}`. For example,
* `projects/myproject/locations/us-west1/reservations/team1-prod`. These reservations must exist
* under the specified `parent`.
* @return value or {@code null} for none
*/
public java.util.List<java.lang.String> getReservations() {
return reservations;
}

/**
* Optional. The resource names of the reservations to upgrade, in the format
* `projects/{project}/locations/{location}/reservations/{reservation}`. For example,
* `projects/myproject/locations/us-west1/reservations/team1-prod`. These reservations must exist
* under the specified `parent`.
* @param reservations reservations or {@code null} for none
*/
public UpgradeEditionRequest setReservations(java.util.List<java.lang.String> reservations) {
this.reservations = reservations;
return this;
}

/**
* The edition to upgrade the capacity commitments and reservations to. Supported values are
* `ENTERPRISE` and `ENTERPRISE_PLUS`.
* @return value or {@code null} for none
*/
public java.lang.String getTargetEdition() {
return targetEdition;
}

/**
* The edition to upgrade the capacity commitments and reservations to. Supported values are
* `ENTERPRISE` and `ENTERPRISE_PLUS`.
* @param targetEdition targetEdition or {@code null} for none
*/
public UpgradeEditionRequest setTargetEdition(java.lang.String targetEdition) {
this.targetEdition = targetEdition;
return this;
}

@Override
public UpgradeEditionRequest set(String fieldName, Object value) {
return (UpgradeEditionRequest) super.set(fieldName, value);
}

@Override
public UpgradeEditionRequest clone() {
return (UpgradeEditionRequest) super.clone();
}

}
Loading
Loading