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-firebasedataconnect</artifactId>
<version>v1-rev20260726-2.0.0</version>
<version>v1-rev20260927-2.0.0</version>
</dependency>
</dependencies>
</project>
Expand All @@ -35,7 +35,7 @@ repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.apis:google-api-services-firebasedataconnect:v1-rev20260726-2.0.0'
implementation 'com.google.apis:google-api-services-firebasedataconnect:v1-rev20260927-2.0.0'
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5707,6 +5707,157 @@ public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Executes SQL migration steps against the active database schema. This operation compares
* submitted migration steps against the schema migration ledger (`firebasesql.schema_migrations`),
* executes unapplied DDL, and records applied steps. It does NOT persist the GraphQL schema to the
* control plane.
*
* Create a request for the method "schemas.migrate".
*
* This request holds the parameters needed by the firebasedataconnect server. After setting any
* optional parameters, call the {@link Migrate#execute()} method to invoke the remote operation.
*
* @param name Required. Resource name of the target schema:
* projects/{project}/locations/{location}/services/{service}/schemas/{schema} Note: Only
* `schemas/main` is supported (singleton schema per service).
* @param content the {@link com.google.api.services.firebasedataconnect.v1.model.MigrateSchemaRequest}
* @return the request
*/
public Migrate migrate(java.lang.String name, com.google.api.services.firebasedataconnect.v1.model.MigrateSchemaRequest content) throws java.io.IOException {
Migrate result = new Migrate(name, content);
initialize(result);
return result;
}

public class Migrate extends FirebaseDataConnectRequest<com.google.api.services.firebasedataconnect.v1.model.Operation> {

private static final String REST_PATH = "v1/{+name}:migrate";

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

/**
* Executes SQL migration steps against the active database schema. This operation compares
* submitted migration steps against the schema migration ledger
* (`firebasesql.schema_migrations`), executes unapplied DDL, and records applied steps. It does
* NOT persist the GraphQL schema to the control plane.
*
* Create a request for the method "schemas.migrate".
*
* This request holds the parameters needed by the the firebasedataconnect server. After setting
* any optional parameters, call the {@link Migrate#execute()} method to invoke the remote
* operation. <p> {@link
* Migrate#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param name Required. Resource name of the target schema:
* projects/{project}/locations/{location}/services/{service}/schemas/{schema} Note: Only
* `schemas/main` is supported (singleton schema per service).
* @param content the {@link com.google.api.services.firebasedataconnect.v1.model.MigrateSchemaRequest}
* @since 1.13
*/
protected Migrate(java.lang.String name, com.google.api.services.firebasedataconnect.v1.model.MigrateSchemaRequest content) {
super(FirebaseDataConnect.this, "POST", REST_PATH, content, com.google.api.services.firebasedataconnect.v1.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/[^/]+/services/[^/]+/schemas/[^/]+$");
}
}

@Override
public Migrate set$Xgafv(java.lang.String $Xgafv) {
return (Migrate) super.set$Xgafv($Xgafv);
}

@Override
public Migrate setAccessToken(java.lang.String accessToken) {
return (Migrate) super.setAccessToken(accessToken);
}

@Override
public Migrate setAlt(java.lang.String alt) {
return (Migrate) super.setAlt(alt);
}

@Override
public Migrate setCallback(java.lang.String callback) {
return (Migrate) super.setCallback(callback);
}

@Override
public Migrate setFields(java.lang.String fields) {
return (Migrate) super.setFields(fields);
}

@Override
public Migrate setKey(java.lang.String key) {
return (Migrate) super.setKey(key);
}

@Override
public Migrate setOauthToken(java.lang.String oauthToken) {
return (Migrate) super.setOauthToken(oauthToken);
}

@Override
public Migrate setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Migrate) super.setPrettyPrint(prettyPrint);
}

@Override
public Migrate setQuotaUser(java.lang.String quotaUser) {
return (Migrate) super.setQuotaUser(quotaUser);
}

@Override
public Migrate setUploadType(java.lang.String uploadType) {
return (Migrate) super.setUploadType(uploadType);
}

@Override
public Migrate setUploadProtocol(java.lang.String uploadProtocol) {
return (Migrate) super.setUploadProtocol(uploadProtocol);
}

/**
* Required. Resource name of the target schema:
* projects/{project}/locations/{location}/services/{service}/schemas/{schema} Note:
* Only `schemas/main` is supported (singleton schema per service).
*/
@com.google.api.client.util.Key
private java.lang.String name;

/** Required. Resource name of the target schema:
projects/{project}/locations/{location}/services/{service}/schemas/{schema} Note: Only
`schemas/main` is supported (singleton schema per service).
*/
public java.lang.String getName() {
return name;
}

/**
* Required. Resource name of the target schema:
* projects/{project}/locations/{location}/services/{service}/schemas/{schema} Note:
* Only `schemas/main` is supported (singleton schema per service).
*/
public Migrate 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/[^/]+/services/[^/]+/schemas/[^/]+$");
}
this.name = name;
return this;
}

@Override
public Migrate set(String parameterName, Object value) {
return (Migrate) super.set(parameterName, value);
}
}
/**
* Updates the parameters of a single Schema, and creates a new SchemaRevision with the updated
* Schema.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
/*
* 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.firebasedataconnect.v1.model;

/**
* Request message for `MigrateSchema`. Next tag: 7
*
* <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 Firebase SQL Connect 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 MigrateSchemaRequest extends com.google.api.client.json.GenericJson {

/**
* Optional. Execution mode controlling DDL execution and ledger recording. Defaults to
* EXECUTE_AND_RECORD.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String executionMode;

/**
* Required. Ordered migration steps from `./sql/migrations/` (or a single ad-hoc step). Backend
* compares submitted versions against `firebasesql.schema_migrations`: already-applied steps are
* verified for SQL immutability and skipped, while unapplied steps (`version >
* MAX(applied_version)`) are executed. All unapplied transactional steps in a single request
* execute atomically within one database transaction (BEGIN ... COMMIT): either every unapplied
* step commits and is recorded in the ledger, or the entire request rolls back. An unapplied step
* containing CREATE INDEX CONCURRENTLY or DROP INDEX CONCURRENTLY cannot be mixed with other
* unapplied steps and must be the sole unapplied step executed in the request.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List<MigrationStep> migrationSteps;

/**
* Optional. When true, runs preflight validation (syntax, applied-step immutability, sequence
* ordering, CONCURRENTLY isolation, and SAVEPOINT catalog checks) without committing mutations to
* the database.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean validateOnly;

/**
* Optional. Execution mode controlling DDL execution and ledger recording. Defaults to
* EXECUTE_AND_RECORD.
* @return value or {@code null} for none
*/
public java.lang.String getExecutionMode() {
return executionMode;
}

/**
* Optional. Execution mode controlling DDL execution and ledger recording. Defaults to
* EXECUTE_AND_RECORD.
* @param executionMode executionMode or {@code null} for none
*/
public MigrateSchemaRequest setExecutionMode(java.lang.String executionMode) {
this.executionMode = executionMode;
return this;
}

/**
* Required. Ordered migration steps from `./sql/migrations/` (or a single ad-hoc step). Backend
* compares submitted versions against `firebasesql.schema_migrations`: already-applied steps are
* verified for SQL immutability and skipped, while unapplied steps (`version >
* MAX(applied_version)`) are executed. All unapplied transactional steps in a single request
* execute atomically within one database transaction (BEGIN ... COMMIT): either every unapplied
* step commits and is recorded in the ledger, or the entire request rolls back. An unapplied step
* containing CREATE INDEX CONCURRENTLY or DROP INDEX CONCURRENTLY cannot be mixed with other
* unapplied steps and must be the sole unapplied step executed in the request.
* @return value or {@code null} for none
*/
public java.util.List<MigrationStep> getMigrationSteps() {
return migrationSteps;
}

/**
* Required. Ordered migration steps from `./sql/migrations/` (or a single ad-hoc step). Backend
* compares submitted versions against `firebasesql.schema_migrations`: already-applied steps are
* verified for SQL immutability and skipped, while unapplied steps (`version >
* MAX(applied_version)`) are executed. All unapplied transactional steps in a single request
* execute atomically within one database transaction (BEGIN ... COMMIT): either every unapplied
* step commits and is recorded in the ledger, or the entire request rolls back. An unapplied step
* containing CREATE INDEX CONCURRENTLY or DROP INDEX CONCURRENTLY cannot be mixed with other
* unapplied steps and must be the sole unapplied step executed in the request.
* @param migrationSteps migrationSteps or {@code null} for none
*/
public MigrateSchemaRequest setMigrationSteps(java.util.List<MigrationStep> migrationSteps) {
this.migrationSteps = migrationSteps;
return this;
}

/**
* Optional. When true, runs preflight validation (syntax, applied-step immutability, sequence
* ordering, CONCURRENTLY isolation, and SAVEPOINT catalog checks) without committing mutations to
* the database.
* @return value or {@code null} for none
*/
public java.lang.Boolean getValidateOnly() {
return validateOnly;
}

/**
* Optional. When true, runs preflight validation (syntax, applied-step immutability, sequence
* ordering, CONCURRENTLY isolation, and SAVEPOINT catalog checks) without committing mutations to
* the database.
* @param validateOnly validateOnly or {@code null} for none
*/
public MigrateSchemaRequest setValidateOnly(java.lang.Boolean validateOnly) {
this.validateOnly = validateOnly;
return this;
}

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

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

}
Loading
Loading