diff --git a/clients/google-api-services-spanner/v1/2.0.0/README.md b/clients/google-api-services-spanner/v1/2.0.0/README.md index 7019a88f52a..4650309db46 100644 --- a/clients/google-api-services-spanner/v1/2.0.0/README.md +++ b/clients/google-api-services-spanner/v1/2.0.0/README.md @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file: <dependency> <groupId>com.google.apis</groupId> <artifactId>google-api-services-spanner</artifactId> - <version>v1-rev20241010-2.0.0</version> + <version>v1-rev20241015-2.0.0</version> </dependency> </dependencies> </project> @@ -35,7 +35,7 @@ repositories { mavenCentral() } dependencies { - implementation 'com.google.apis:google-api-services-spanner:v1-rev20241010-2.0.0' + implementation 'com.google.apis:google-api-services-spanner:v1-rev20241015-2.0.0' } ``` diff --git a/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/Spanner.java b/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/Spanner.java index 233b68ce610..eee17fc1881 100644 --- a/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/Spanner.java +++ b/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/Spanner.java @@ -5229,7 +5229,8 @@ public Get set(String parameterName, Object value) { * Gets the access control policy for a database or backup resource. Returns an empty policy if a * database or backup exists but does not have a policy set. Authorization requires * `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires - * `spanner.backups.getIamPolicy` permission on resource. + * `spanner.backups.getIamPolicy` permission on resource. For backup schedules, authorization + * requires `spanner.backupSchedules.getIamPolicy` permission on resource. * * Create a request for the method "backups.getIamPolicy". * @@ -5259,7 +5260,8 @@ public class GetIamPolicy extends SpannerRequest<com.google.api.services.spanner * Gets the access control policy for a database or backup resource. Returns an empty policy if a * database or backup exists but does not have a policy set. Authorization requires * `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires - * `spanner.backups.getIamPolicy` permission on resource. + * `spanner.backups.getIamPolicy` permission on resource. For backup schedules, authorization + * requires `spanner.backupSchedules.getIamPolicy` permission on resource. * * Create a request for the method "backups.getIamPolicy". * @@ -5833,7 +5835,8 @@ public Patch set(String parameterName, Object value) { /** * Sets the access control policy on a database or backup resource. Replaces any existing policy. * Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, - * authorization requires `spanner.backups.setIamPolicy` permission on resource. + * authorization requires `spanner.backups.setIamPolicy` permission on resource. For backup + * schedules, authorization requires `spanner.backupSchedules.setIamPolicy` permission on resource. * * Create a request for the method "backups.setIamPolicy". * @@ -5862,7 +5865,9 @@ public class SetIamPolicy extends SpannerRequest<com.google.api.services.spanner /** * Sets the access control policy on a database or backup resource. Replaces any existing policy. * Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, - * authorization requires `spanner.backups.setIamPolicy` permission on resource. + * authorization requires `spanner.backups.setIamPolicy` permission on resource. For backup + * schedules, authorization requires `spanner.backupSchedules.setIamPolicy` permission on + * resource. * * Create a request for the method "backups.setIamPolicy". * @@ -5985,7 +5990,8 @@ public SetIamPolicy set(String parameterName, Object value) { * has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise * returns an empty set of permissions. Calling this method on a backup that does not exist will * result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing - * instance. + * instance. Calling this method on a backup schedule that does not exist will result in a NOT_FOUND + * error if the user has `spanner.backupSchedules.list` permission on the containing database. * * Create a request for the method "backups.testIamPermissions". * @@ -6017,7 +6023,9 @@ public class TestIamPermissions extends SpannerRequest<com.google.api.services.s * if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. * Otherwise returns an empty set of permissions. Calling this method on a backup that does not * exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the - * containing instance. + * containing instance. Calling this method on a backup schedule that does not exist will result + * in a NOT_FOUND error if the user has `spanner.backupSchedules.list` permission on the + * containing database. * * Create a request for the method "backups.testIamPermissions". * @@ -7808,7 +7816,8 @@ public GetDdl set(String parameterName, Object value) { * Gets the access control policy for a database or backup resource. Returns an empty policy if a * database or backup exists but does not have a policy set. Authorization requires * `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires - * `spanner.backups.getIamPolicy` permission on resource. + * `spanner.backups.getIamPolicy` permission on resource. For backup schedules, authorization + * requires `spanner.backupSchedules.getIamPolicy` permission on resource. * * Create a request for the method "databases.getIamPolicy". * @@ -7838,7 +7847,8 @@ public class GetIamPolicy extends SpannerRequest<com.google.api.services.spanner * Gets the access control policy for a database or backup resource. Returns an empty policy if a * database or backup exists but does not have a policy set. Authorization requires * `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires - * `spanner.backups.getIamPolicy` permission on resource. + * `spanner.backups.getIamPolicy` permission on resource. For backup schedules, authorization + * requires `spanner.backupSchedules.getIamPolicy` permission on resource. * * Create a request for the method "databases.getIamPolicy". * @@ -8717,7 +8727,8 @@ public Restore set(String parameterName, Object value) { /** * Sets the access control policy on a database or backup resource. Replaces any existing policy. * Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, - * authorization requires `spanner.backups.setIamPolicy` permission on resource. + * authorization requires `spanner.backups.setIamPolicy` permission on resource. For backup + * schedules, authorization requires `spanner.backupSchedules.setIamPolicy` permission on resource. * * Create a request for the method "databases.setIamPolicy". * @@ -8746,7 +8757,9 @@ public class SetIamPolicy extends SpannerRequest<com.google.api.services.spanner /** * Sets the access control policy on a database or backup resource. Replaces any existing policy. * Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, - * authorization requires `spanner.backups.setIamPolicy` permission on resource. + * authorization requires `spanner.backups.setIamPolicy` permission on resource. For backup + * schedules, authorization requires `spanner.backupSchedules.setIamPolicy` permission on + * resource. * * Create a request for the method "databases.setIamPolicy". * @@ -8869,7 +8882,8 @@ public SetIamPolicy set(String parameterName, Object value) { * has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise * returns an empty set of permissions. Calling this method on a backup that does not exist will * result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing - * instance. + * instance. Calling this method on a backup schedule that does not exist will result in a NOT_FOUND + * error if the user has `spanner.backupSchedules.list` permission on the containing database. * * Create a request for the method "databases.testIamPermissions". * @@ -8901,7 +8915,9 @@ public class TestIamPermissions extends SpannerRequest<com.google.api.services.s * if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. * Otherwise returns an empty set of permissions. Calling this method on a backup that does not * exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the - * containing instance. + * containing instance. Calling this method on a backup schedule that does not exist will result + * in a NOT_FOUND error if the user has `spanner.backupSchedules.list` permission on the + * containing database. * * Create a request for the method "databases.testIamPermissions". * @@ -9619,7 +9635,8 @@ public Get set(String parameterName, Object value) { * Gets the access control policy for a database or backup resource. Returns an empty policy if a * database or backup exists but does not have a policy set. Authorization requires * `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires - * `spanner.backups.getIamPolicy` permission on resource. + * `spanner.backups.getIamPolicy` permission on resource. For backup schedules, authorization + * requires `spanner.backupSchedules.getIamPolicy` permission on resource. * * Create a request for the method "backupSchedules.getIamPolicy". * @@ -9649,7 +9666,8 @@ public class GetIamPolicy extends SpannerRequest<com.google.api.services.spanner * Gets the access control policy for a database or backup resource. Returns an empty policy if a * database or backup exists but does not have a policy set. Authorization requires * `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires - * `spanner.backups.getIamPolicy` permission on resource. + * `spanner.backups.getIamPolicy` permission on resource. For backup schedules, authorization + * requires `spanner.backupSchedules.getIamPolicy` permission on resource. * * Create a request for the method "backupSchedules.getIamPolicy". * @@ -10143,7 +10161,8 @@ public Patch set(String parameterName, Object value) { /** * Sets the access control policy on a database or backup resource. Replaces any existing policy. * Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, - * authorization requires `spanner.backups.setIamPolicy` permission on resource. + * authorization requires `spanner.backups.setIamPolicy` permission on resource. For backup + * schedules, authorization requires `spanner.backupSchedules.setIamPolicy` permission on resource. * * Create a request for the method "backupSchedules.setIamPolicy". * @@ -10172,7 +10191,9 @@ public class SetIamPolicy extends SpannerRequest<com.google.api.services.spanner /** * Sets the access control policy on a database or backup resource. Replaces any existing policy. * Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, - * authorization requires `spanner.backups.setIamPolicy` permission on resource. + * authorization requires `spanner.backups.setIamPolicy` permission on resource. For backup + * schedules, authorization requires `spanner.backupSchedules.setIamPolicy` permission on + * resource. * * Create a request for the method "backupSchedules.setIamPolicy". * @@ -10295,7 +10316,8 @@ public SetIamPolicy set(String parameterName, Object value) { * has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise * returns an empty set of permissions. Calling this method on a backup that does not exist will * result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing - * instance. + * instance. Calling this method on a backup schedule that does not exist will result in a NOT_FOUND + * error if the user has `spanner.backupSchedules.list` permission on the containing database. * * Create a request for the method "backupSchedules.testIamPermissions". * @@ -10327,7 +10349,9 @@ public class TestIamPermissions extends SpannerRequest<com.google.api.services.s * if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. * Otherwise returns an empty set of permissions. Calling this method on a backup that does not * exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the - * containing instance. + * containing instance. Calling this method on a backup schedule that does not exist will result + * in a NOT_FOUND error if the user has `spanner.backupSchedules.list` permission on the + * containing database. * * Create a request for the method "backupSchedules.testIamPermissions". * @@ -10665,7 +10689,8 @@ public List set(String parameterName, Object value) { * has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise * returns an empty set of permissions. Calling this method on a backup that does not exist will * result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing - * instance. + * instance. Calling this method on a backup schedule that does not exist will result in a NOT_FOUND + * error if the user has `spanner.backupSchedules.list` permission on the containing database. * * Create a request for the method "databaseRoles.testIamPermissions". * @@ -10697,7 +10722,9 @@ public class TestIamPermissions extends SpannerRequest<com.google.api.services.s * if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. * Otherwise returns an empty set of permissions. Calling this method on a backup that does not * exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the - * containing instance. + * containing instance. Calling this method on a backup schedule that does not exist will result + * in a NOT_FOUND error if the user has `spanner.backupSchedules.list` permission on the + * containing database. * * Create a request for the method "databaseRoles.testIamPermissions". * diff --git a/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/BeginTransactionRequest.java b/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/BeginTransactionRequest.java index 7b382a3ed20..c0ef8b522ca 100644 --- a/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/BeginTransactionRequest.java +++ b/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/BeginTransactionRequest.java @@ -29,6 +29,15 @@ @SuppressWarnings("javadoc") public final class BeginTransactionRequest extends com.google.api.client.json.GenericJson { + /** + * Optional. Required for read-write transactions on a multiplexed session that commit mutations + * but do not perform any reads or queries. Clients should randomly select one of the mutations + * from the mutation set and send it as a part of this request. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private Mutation mutationKey; + /** * Required. Options for the new transaction. * The value may be {@code null}. @@ -45,6 +54,27 @@ public final class BeginTransactionRequest extends com.google.api.client.json.Ge @com.google.api.client.util.Key private RequestOptions requestOptions; + /** + * Optional. Required for read-write transactions on a multiplexed session that commit mutations + * but do not perform any reads or queries. Clients should randomly select one of the mutations + * from the mutation set and send it as a part of this request. + * @return value or {@code null} for none + */ + public Mutation getMutationKey() { + return mutationKey; + } + + /** + * Optional. Required for read-write transactions on a multiplexed session that commit mutations + * but do not perform any reads or queries. Clients should randomly select one of the mutations + * from the mutation set and send it as a part of this request. + * @param mutationKey mutationKey or {@code null} for none + */ + public BeginTransactionRequest setMutationKey(Mutation mutationKey) { + this.mutationKey = mutationKey; + return this; + } + /** * Required. Options for the new transaction. * @return value or {@code null} for none diff --git a/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/CommitRequest.java b/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/CommitRequest.java index 70def3d0c75..1aba3c06428 100644 --- a/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/CommitRequest.java +++ b/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/CommitRequest.java @@ -47,6 +47,15 @@ public final class CommitRequest extends com.google.api.client.json.GenericJson @com.google.api.client.util.Key private java.util.List<Mutation> mutations; + /** + * Optional. If the read-write transaction was executed on a multiplexed session, the precommit + * token with the highest sequence number received in this transaction attempt, should be included + * here. Failing to do so will result in a FailedPrecondition error. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private MultiplexedSessionPrecommitToken precommitToken; + /** * Common options for this request. * The value may be {@code null}. @@ -122,6 +131,27 @@ public CommitRequest setMutations(java.util.List<Mutation> mutations) { return this; } + /** + * Optional. If the read-write transaction was executed on a multiplexed session, the precommit + * token with the highest sequence number received in this transaction attempt, should be included + * here. Failing to do so will result in a FailedPrecondition error. + * @return value or {@code null} for none + */ + public MultiplexedSessionPrecommitToken getPrecommitToken() { + return precommitToken; + } + + /** + * Optional. If the read-write transaction was executed on a multiplexed session, the precommit + * token with the highest sequence number received in this transaction attempt, should be included + * here. Failing to do so will result in a FailedPrecondition error. + * @param precommitToken precommitToken or {@code null} for none + */ + public CommitRequest setPrecommitToken(MultiplexedSessionPrecommitToken precommitToken) { + this.precommitToken = precommitToken; + return this; + } + /** * Common options for this request. * @return value or {@code null} for none diff --git a/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/CommitResponse.java b/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/CommitResponse.java index 77c04332946..22c074704cc 100644 --- a/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/CommitResponse.java +++ b/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/CommitResponse.java @@ -44,6 +44,14 @@ public final class CommitResponse extends com.google.api.client.json.GenericJson @com.google.api.client.util.Key private String commitTimestamp; + /** + * If specified, transaction has not committed yet. Clients must retry the commit with the new + * precommit token. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private MultiplexedSessionPrecommitToken precommitToken; + /** * The statistics about this Commit. Not returned by default. For more information, see * CommitRequest.return_commit_stats. @@ -80,6 +88,25 @@ public CommitResponse setCommitTimestamp(String commitTimestamp) { return this; } + /** + * If specified, transaction has not committed yet. Clients must retry the commit with the new + * precommit token. + * @return value or {@code null} for none + */ + public MultiplexedSessionPrecommitToken getPrecommitToken() { + return precommitToken; + } + + /** + * If specified, transaction has not committed yet. Clients must retry the commit with the new + * precommit token. + * @param precommitToken precommitToken or {@code null} for none + */ + public CommitResponse setPrecommitToken(MultiplexedSessionPrecommitToken precommitToken) { + this.precommitToken = precommitToken; + return this; + } + @Override public CommitResponse set(String fieldName, Object value) { return (CommitResponse) super.set(fieldName, value); diff --git a/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/ExecuteBatchDmlResponse.java b/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/ExecuteBatchDmlResponse.java index cd64a852a82..91c8aaa43e1 100644 --- a/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/ExecuteBatchDmlResponse.java +++ b/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/ExecuteBatchDmlResponse.java @@ -40,6 +40,15 @@ @SuppressWarnings("javadoc") public final class ExecuteBatchDmlResponse extends com.google.api.client.json.GenericJson { + /** + * Optional. A precommit token will be included if the read-write transaction is on a multiplexed + * session. The precommit token with the highest sequence number from this transaction attempt + * should be passed to the Commit request for this transaction. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private MultiplexedSessionPrecommitToken precommitToken; + /** * One ResultSet for each statement in the request that ran successfully, in the same order as the * statements in the request. Each ResultSet does not contain any rows. The ResultSetStats in each @@ -58,6 +67,27 @@ public final class ExecuteBatchDmlResponse extends com.google.api.client.json.Ge @com.google.api.client.util.Key private Status status; + /** + * Optional. A precommit token will be included if the read-write transaction is on a multiplexed + * session. The precommit token with the highest sequence number from this transaction attempt + * should be passed to the Commit request for this transaction. + * @return value or {@code null} for none + */ + public MultiplexedSessionPrecommitToken getPrecommitToken() { + return precommitToken; + } + + /** + * Optional. A precommit token will be included if the read-write transaction is on a multiplexed + * session. The precommit token with the highest sequence number from this transaction attempt + * should be passed to the Commit request for this transaction. + * @param precommitToken precommitToken or {@code null} for none + */ + public ExecuteBatchDmlResponse setPrecommitToken(MultiplexedSessionPrecommitToken precommitToken) { + this.precommitToken = precommitToken; + return this; + } + /** * One ResultSet for each statement in the request that ran successfully, in the same order as the * statements in the request. Each ResultSet does not contain any rows. The ResultSetStats in each diff --git a/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/PartialResultSet.java b/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/PartialResultSet.java index 1dde5b20c61..96a9b907eec 100644 --- a/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/PartialResultSet.java +++ b/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/PartialResultSet.java @@ -46,6 +46,15 @@ public final class PartialResultSet extends com.google.api.client.json.GenericJs @com.google.api.client.util.Key private ResultSetMetadata metadata; + /** + * Optional. A precommit token will be included if the read-write transaction is on a multiplexed + * session. The precommit token with the highest sequence number from this transaction attempt + * should be passed to the Commit request for this transaction. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private MultiplexedSessionPrecommitToken precommitToken; + /** * Streaming calls might be interrupted for a variety of reasons, such as TCP connection loss. If * this occurs, the stream of results can be resumed by re-sending the original request and @@ -139,6 +148,27 @@ public PartialResultSet setMetadata(ResultSetMetadata metadata) { return this; } + /** + * Optional. A precommit token will be included if the read-write transaction is on a multiplexed + * session. The precommit token with the highest sequence number from this transaction attempt + * should be passed to the Commit request for this transaction. + * @return value or {@code null} for none + */ + public MultiplexedSessionPrecommitToken getPrecommitToken() { + return precommitToken; + } + + /** + * Optional. A precommit token will be included if the read-write transaction is on a multiplexed + * session. The precommit token with the highest sequence number from this transaction attempt + * should be passed to the Commit request for this transaction. + * @param precommitToken precommitToken or {@code null} for none + */ + public PartialResultSet setPrecommitToken(MultiplexedSessionPrecommitToken precommitToken) { + this.precommitToken = precommitToken; + return this; + } + /** * Streaming calls might be interrupted for a variety of reasons, such as TCP connection loss. If * this occurs, the stream of results can be resumed by re-sending the original request and diff --git a/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/ReadWrite.java b/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/ReadWrite.java index f6e3908cd18..1bd528803c8 100644 --- a/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/ReadWrite.java +++ b/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/ReadWrite.java @@ -30,6 +30,14 @@ @SuppressWarnings("javadoc") public final class ReadWrite extends com.google.api.client.json.GenericJson { + /** + * Optional. Clients should pass the transaction ID of the previous transaction attempt that was + * aborted if this transaction is being executed on a multiplexed session. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String multiplexedSessionPreviousTransactionId; + /** * Read lock mode for the transaction. * The value may be {@code null}. @@ -37,6 +45,55 @@ public final class ReadWrite extends com.google.api.client.json.GenericJson { @com.google.api.client.util.Key private java.lang.String readLockMode; + /** + * Optional. Clients should pass the transaction ID of the previous transaction attempt that was + * aborted if this transaction is being executed on a multiplexed session. + * @see #decodeMultiplexedSessionPreviousTransactionId() + * @return value or {@code null} for none + */ + public java.lang.String getMultiplexedSessionPreviousTransactionId() { + return multiplexedSessionPreviousTransactionId; + } + + /** + * Optional. Clients should pass the transaction ID of the previous transaction attempt that was + * aborted if this transaction is being executed on a multiplexed session. + * @see #getMultiplexedSessionPreviousTransactionId() + * @return Base64 decoded value or {@code null} for none + * + * @since 1.14 + */ + public byte[] decodeMultiplexedSessionPreviousTransactionId() { + return com.google.api.client.util.Base64.decodeBase64(multiplexedSessionPreviousTransactionId); + } + + /** + * Optional. Clients should pass the transaction ID of the previous transaction attempt that was + * aborted if this transaction is being executed on a multiplexed session. + * @see #encodeMultiplexedSessionPreviousTransactionId() + * @param multiplexedSessionPreviousTransactionId multiplexedSessionPreviousTransactionId or {@code null} for none + */ + public ReadWrite setMultiplexedSessionPreviousTransactionId(java.lang.String multiplexedSessionPreviousTransactionId) { + this.multiplexedSessionPreviousTransactionId = multiplexedSessionPreviousTransactionId; + return this; + } + + /** + * Optional. Clients should pass the transaction ID of the previous transaction attempt that was + * aborted if this transaction is being executed on a multiplexed session. + * @see #setMultiplexedSessionPreviousTransactionId() + * + * <p> + * The value is encoded Base64 or {@code null} for none. + * </p> + * + * @since 1.14 + */ + public ReadWrite encodeMultiplexedSessionPreviousTransactionId(byte[] multiplexedSessionPreviousTransactionId) { + this.multiplexedSessionPreviousTransactionId = com.google.api.client.util.Base64.encodeBase64URLSafeString(multiplexedSessionPreviousTransactionId); + return this; + } + /** * Read lock mode for the transaction. * @return value or {@code null} for none diff --git a/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/ResultSet.java b/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/ResultSet.java index 5f7cdef694f..22a49e78ab4 100644 --- a/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/ResultSet.java +++ b/clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/ResultSet.java @@ -36,6 +36,15 @@ public final class ResultSet extends com.google.api.client.json.GenericJson { @com.google.api.client.util.Key private ResultSetMetadata metadata; + /** + * Optional. A precommit token will be included if the read-write transaction is on a multiplexed + * session. The precommit token with the highest sequence number from this transaction attempt + * should be passed to the Commit request for this transaction. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private MultiplexedSessionPrecommitToken precommitToken; + /** * Each element in `rows` is a row whose format is defined by metadata.row_type. The ith element * in each row matches the ith field in metadata.row_type. Elements are encoded based on type as @@ -73,6 +82,27 @@ public ResultSet setMetadata(ResultSetMetadata metadata) { return this; } + /** + * Optional. A precommit token will be included if the read-write transaction is on a multiplexed + * session. The precommit token with the highest sequence number from this transaction attempt + * should be passed to the Commit request for this transaction. + * @return value or {@code null} for none + */ + public MultiplexedSessionPrecommitToken getPrecommitToken() { + return precommitToken; + } + + /** + * Optional. A precommit token will be included if the read-write transaction is on a multiplexed + * session. The precommit token with the highest sequence number from this transaction attempt + * should be passed to the Commit request for this transaction. + * @param precommitToken precommitToken or {@code null} for none + */ + public ResultSet setPrecommitToken(MultiplexedSessionPrecommitToken precommitToken) { + this.precommitToken = precommitToken; + return this; + } + /** * Each element in `rows` is a row whose format is defined by metadata.row_type. The ith element * in each row matches the ith field in metadata.row_type. Elements are encoded based on type as diff --git a/clients/google-api-services-spanner/v1/2.0.0/pom.xml b/clients/google-api-services-spanner/v1/2.0.0/pom.xml index 55d92ab14d2..cc4d42ce71a 100644 --- a/clients/google-api-services-spanner/v1/2.0.0/pom.xml +++ b/clients/google-api-services-spanner/v1/2.0.0/pom.xml @@ -8,8 +8,8 @@ <groupId>com.google.apis</groupId> <artifactId>google-api-services-spanner</artifactId> - <version>v1-rev20241010-2.0.0</version> - <name>Cloud Spanner API v1-rev20241010-2.0.0</name> + <version>v1-rev20241015-2.0.0</version> + <name>Cloud Spanner API v1-rev20241015-2.0.0</name> <packaging>jar</packaging> <inceptionYear>2011</inceptionYear> diff --git a/clients/google-api-services-spanner/v1/README.md b/clients/google-api-services-spanner/v1/README.md index 7019a88f52a..4650309db46 100644 --- a/clients/google-api-services-spanner/v1/README.md +++ b/clients/google-api-services-spanner/v1/README.md @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file: <dependency> <groupId>com.google.apis</groupId> <artifactId>google-api-services-spanner</artifactId> - <version>v1-rev20241010-2.0.0</version> + <version>v1-rev20241015-2.0.0</version> </dependency> </dependencies> </project> @@ -35,7 +35,7 @@ repositories { mavenCentral() } dependencies { - implementation 'com.google.apis:google-api-services-spanner:v1-rev20241010-2.0.0' + implementation 'com.google.apis:google-api-services-spanner:v1-rev20241015-2.0.0' } ```