Skip to content

Commit 3611db7

Browse files
1 parent 85531f0 commit 3611db7

File tree

5 files changed

+165
-6
lines changed

5 files changed

+165
-6
lines changed

clients/google-api-services-spanner/v1/2.0.0/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
2222
<dependency>
2323
<groupId>com.google.apis</groupId>
2424
<artifactId>google-api-services-spanner</artifactId>
25-
<version>v1-rev20240831-2.0.0</version>
25+
<version>v1-rev20240910-2.0.0</version>
2626
</dependency>
2727
</dependencies>
2828
</project>
@@ -35,7 +35,7 @@ repositories {
3535
mavenCentral()
3636
}
3737
dependencies {
38-
implementation 'com.google.apis:google-api-services-spanner:v1-rev20240831-2.0.0'
38+
implementation 'com.google.apis:google-api-services-spanner:v1-rev20240910-2.0.0'
3939
}
4040
```
4141

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
3+
* in compliance with the License. You may obtain a copy of the License at
4+
*
5+
* http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under the License
8+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
9+
* or implied. See the License for the specific language governing permissions and limitations under
10+
* the License.
11+
*/
12+
/*
13+
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
14+
* Modify at your own risk.
15+
*/
16+
17+
package com.google.api.services.spanner.v1.model;
18+
19+
/**
20+
* When a read-write transaction is executed on a multiplexed session, this precommit token is sent
21+
* back to the client as a part of the [Transaction] message in the BeginTransaction response and
22+
* also as a part of the [ResultSet] and [PartialResultSet] responses.
23+
*
24+
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
25+
* transmitted over HTTP when working with the Cloud Spanner API. For a detailed explanation see:
26+
* <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>
27+
* </p>
28+
*
29+
* @author Google, Inc.
30+
*/
31+
@SuppressWarnings("javadoc")
32+
public final class MultiplexedSessionPrecommitToken extends com.google.api.client.json.GenericJson {
33+
34+
/**
35+
* Opaque precommit token.
36+
* The value may be {@code null}.
37+
*/
38+
@com.google.api.client.util.Key
39+
private java.lang.String precommitToken;
40+
41+
/**
42+
* An incrementing seq number is generated on every precommit token that is returned. Clients
43+
* should remember the precommit token with the highest sequence number from the current
44+
* transaction attempt.
45+
* The value may be {@code null}.
46+
*/
47+
@com.google.api.client.util.Key
48+
private java.lang.Integer seqNum;
49+
50+
/**
51+
* Opaque precommit token.
52+
* @see #decodePrecommitToken()
53+
* @return value or {@code null} for none
54+
*/
55+
public java.lang.String getPrecommitToken() {
56+
return precommitToken;
57+
}
58+
59+
/**
60+
* Opaque precommit token.
61+
* @see #getPrecommitToken()
62+
* @return Base64 decoded value or {@code null} for none
63+
*
64+
* @since 1.14
65+
*/
66+
public byte[] decodePrecommitToken() {
67+
return com.google.api.client.util.Base64.decodeBase64(precommitToken);
68+
}
69+
70+
/**
71+
* Opaque precommit token.
72+
* @see #encodePrecommitToken()
73+
* @param precommitToken precommitToken or {@code null} for none
74+
*/
75+
public MultiplexedSessionPrecommitToken setPrecommitToken(java.lang.String precommitToken) {
76+
this.precommitToken = precommitToken;
77+
return this;
78+
}
79+
80+
/**
81+
* Opaque precommit token.
82+
* @see #setPrecommitToken()
83+
*
84+
* <p>
85+
* The value is encoded Base64 or {@code null} for none.
86+
* </p>
87+
*
88+
* @since 1.14
89+
*/
90+
public MultiplexedSessionPrecommitToken encodePrecommitToken(byte[] precommitToken) {
91+
this.precommitToken = com.google.api.client.util.Base64.encodeBase64URLSafeString(precommitToken);
92+
return this;
93+
}
94+
95+
/**
96+
* An incrementing seq number is generated on every precommit token that is returned. Clients
97+
* should remember the precommit token with the highest sequence number from the current
98+
* transaction attempt.
99+
* @return value or {@code null} for none
100+
*/
101+
public java.lang.Integer getSeqNum() {
102+
return seqNum;
103+
}
104+
105+
/**
106+
* An incrementing seq number is generated on every precommit token that is returned. Clients
107+
* should remember the precommit token with the highest sequence number from the current
108+
* transaction attempt.
109+
* @param seqNum seqNum or {@code null} for none
110+
*/
111+
public MultiplexedSessionPrecommitToken setSeqNum(java.lang.Integer seqNum) {
112+
this.seqNum = seqNum;
113+
return this;
114+
}
115+
116+
@Override
117+
public MultiplexedSessionPrecommitToken set(String fieldName, Object value) {
118+
return (MultiplexedSessionPrecommitToken) super.set(fieldName, value);
119+
}
120+
121+
@Override
122+
public MultiplexedSessionPrecommitToken clone() {
123+
return (MultiplexedSessionPrecommitToken) super.clone();
124+
}
125+
126+
}

clients/google-api-services-spanner/v1/2.0.0/com/google/api/services/spanner/v1/model/Transaction.java

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ public final class Transaction extends com.google.api.client.json.GenericJson {
3838
@com.google.api.client.util.Key
3939
private java.lang.String id;
4040

41+
/**
42+
* A precommit token will be included in the response of a BeginTransaction request if the read-
43+
* write transaction is on a multiplexed session and a mutation_key was specified in the
44+
* BeginTransaction. The precommit token with the highest sequence number from this transaction
45+
* attempt should be passed to the Commit request for this transaction.
46+
* The value may be {@code null}.
47+
*/
48+
@com.google.api.client.util.Key
49+
private MultiplexedSessionPrecommitToken precommitToken;
50+
4151
/**
4252
* For snapshot read-only transactions, the read timestamp chosen for the transaction. Not
4353
* returned by default: see TransactionOptions.ReadOnly.return_read_timestamp. A timestamp in
@@ -101,6 +111,29 @@ public Transaction encodeId(byte[] id) {
101111
return this;
102112
}
103113

114+
/**
115+
* A precommit token will be included in the response of a BeginTransaction request if the read-
116+
* write transaction is on a multiplexed session and a mutation_key was specified in the
117+
* BeginTransaction. The precommit token with the highest sequence number from this transaction
118+
* attempt should be passed to the Commit request for this transaction.
119+
* @return value or {@code null} for none
120+
*/
121+
public MultiplexedSessionPrecommitToken getPrecommitToken() {
122+
return precommitToken;
123+
}
124+
125+
/**
126+
* A precommit token will be included in the response of a BeginTransaction request if the read-
127+
* write transaction is on a multiplexed session and a mutation_key was specified in the
128+
* BeginTransaction. The precommit token with the highest sequence number from this transaction
129+
* attempt should be passed to the Commit request for this transaction.
130+
* @param precommitToken precommitToken or {@code null} for none
131+
*/
132+
public Transaction setPrecommitToken(MultiplexedSessionPrecommitToken precommitToken) {
133+
this.precommitToken = precommitToken;
134+
return this;
135+
}
136+
104137
/**
105138
* For snapshot read-only transactions, the read timestamp chosen for the transaction. Not
106139
* returned by default: see TransactionOptions.ReadOnly.return_read_timestamp. A timestamp in

clients/google-api-services-spanner/v1/2.0.0/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
<groupId>com.google.apis</groupId>
1010
<artifactId>google-api-services-spanner</artifactId>
11-
<version>v1-rev20240831-2.0.0</version>
12-
<name>Cloud Spanner API v1-rev20240831-2.0.0</name>
11+
<version>v1-rev20240910-2.0.0</version>
12+
<name>Cloud Spanner API v1-rev20240910-2.0.0</name>
1313
<packaging>jar</packaging>
1414

1515
<inceptionYear>2011</inceptionYear>

clients/google-api-services-spanner/v1/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
2222
<dependency>
2323
<groupId>com.google.apis</groupId>
2424
<artifactId>google-api-services-spanner</artifactId>
25-
<version>v1-rev20240831-2.0.0</version>
25+
<version>v1-rev20240910-2.0.0</version>
2626
</dependency>
2727
</dependencies>
2828
</project>
@@ -35,7 +35,7 @@ repositories {
3535
mavenCentral()
3636
}
3737
dependencies {
38-
implementation 'com.google.apis:google-api-services-spanner:v1-rev20240831-2.0.0'
38+
implementation 'com.google.apis:google-api-services-spanner:v1-rev20240910-2.0.0'
3939
}
4040
```
4141

0 commit comments

Comments
 (0)