Debian Codegraph @

spanner/apiv1/spannerpb/commit_response.pb.go

raw
1 // Copyright 2025 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 // Code generated by protoc-gen-go. DO NOT EDIT.
16 // versions:
17 // protoc-gen-go v1.35.2
18 // protoc v4.25.7
19 // source: google/spanner/v1/commit_response.proto
20
21 package spannerpb
22
23 import (
24 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
25 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
26 timestamppb "google.golang.org/protobuf/types/known/timestamppb"
27 reflect "reflect"
28 sync "sync"
29 )
30
31 const (
32 // Verify that this generated code is sufficiently up-to-date.
33 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
34 // Verify that runtime/protoimpl is sufficiently up-to-date.
35 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
36 )
37
38 // The response for [Commit][google.spanner.v1.Spanner.Commit].
39 type CommitResponse struct {
40 state protoimpl.MessageState
41 sizeCache protoimpl.SizeCache
42 unknownFields protoimpl.UnknownFields
43
44 // The Cloud Spanner timestamp at which the transaction committed.
45 CommitTimestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=commit_timestamp,json=commitTimestamp,proto3" json:"commit_timestamp,omitempty"`
46 // The statistics about this `Commit`. Not returned by default.
47 // For more information, see
48 // [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
49 CommitStats *CommitResponse_CommitStats `protobuf:"bytes,2,opt,name=commit_stats,json=commitStats,proto3" json:"commit_stats,omitempty"`
50 // You must examine and retry the commit if the following is populated.
51 //
52 // Types that are assignable to MultiplexedSessionRetry:
53 //
54 // *CommitResponse_PrecommitToken
55 MultiplexedSessionRetry isCommitResponse_MultiplexedSessionRetry `protobuf_oneof:"MultiplexedSessionRetry"`
56 // If `TransactionOptions.isolation_level` is set to
57 // `IsolationLevel.REPEATABLE_READ`, then the snapshot timestamp is the
58 // timestamp at which all reads in the transaction ran. This timestamp is
59 // never returned.
60 SnapshotTimestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=snapshot_timestamp,json=snapshotTimestamp,proto3" json:"snapshot_timestamp,omitempty"`
61 }
62
63 func (x *CommitResponse) Reset() {
64 *x = CommitResponse{}
65 mi := &file_google_spanner_v1_commit_response_proto_msgTypes[0]
66 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
67 ms.StoreMessageInfo(mi)
68 }
69
70 func (x *CommitResponse) String() string {
71 return protoimpl.X.MessageStringOf(x)
72 }
73
74 func (*CommitResponse) ProtoMessage() {}
75
76 func (x *CommitResponse) ProtoReflect() protoreflect.Message {
77 mi := &file_google_spanner_v1_commit_response_proto_msgTypes[0]
78 if x != nil {
79 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
80 if ms.LoadMessageInfo() == nil {
81 ms.StoreMessageInfo(mi)
82 }
83 return ms
84 }
85 return mi.MessageOf(x)
86 }
87
88 // Deprecated: Use CommitResponse.ProtoReflect.Descriptor instead.
89 func (*CommitResponse) Descriptor() ([]byte, []int) {
90 return file_google_spanner_v1_commit_response_proto_rawDescGZIP(), []int{0}
91 }
92
93 func (x *CommitResponse) GetCommitTimestamp() *timestamppb.Timestamp {
94 if x != nil {
95 return x.CommitTimestamp
96 }
97 return nil
98 }
99
100 func (x *CommitResponse) GetCommitStats() *CommitResponse_CommitStats {
101 if x != nil {
102 return x.CommitStats
103 }
104 return nil
105 }
106
107 func (m *CommitResponse) GetMultiplexedSessionRetry() isCommitResponse_MultiplexedSessionRetry {
108 if m != nil {
109 return m.MultiplexedSessionRetry
110 }
111 return nil
112 }
113
114 func (x *CommitResponse) GetPrecommitToken() *MultiplexedSessionPrecommitToken {
115 if x, ok := x.GetMultiplexedSessionRetry().(*CommitResponse_PrecommitToken); ok {
116 return x.PrecommitToken
117 }
118 return nil
119 }
120
121 func (x *CommitResponse) GetSnapshotTimestamp() *timestamppb.Timestamp {
122 if x != nil {
123 return x.SnapshotTimestamp
124 }
125 return nil
126 }
127
128 type isCommitResponse_MultiplexedSessionRetry interface {
129 isCommitResponse_MultiplexedSessionRetry()
130 }
131
132 type CommitResponse_PrecommitToken struct {
133 // If specified, transaction has not committed yet.
134 // You must retry the commit with the new precommit token.
135 PrecommitToken *MultiplexedSessionPrecommitToken `protobuf:"bytes,4,opt,name=precommit_token,json=precommitToken,proto3,oneof"`
136 }
137
138 func (*CommitResponse_PrecommitToken) isCommitResponse_MultiplexedSessionRetry() {}
139
140 // Additional statistics about a commit.
141 type CommitResponse_CommitStats struct {
142 state protoimpl.MessageState
143 sizeCache protoimpl.SizeCache
144 unknownFields protoimpl.UnknownFields
145
146 // The total number of mutations for the transaction. Knowing the
147 // `mutation_count` value can help you maximize the number of mutations
148 // in a transaction and minimize the number of API round trips. You can
149 // also monitor this value to prevent transactions from exceeding the system
150 // [limit](https://cloud.google.com/spanner/quotas#limits_for_creating_reading_updating_and_deleting_data).
151 // If the number of mutations exceeds the limit, the server returns
152 // [INVALID_ARGUMENT](https://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT).
153 MutationCount int64 `protobuf:"varint,1,opt,name=mutation_count,json=mutationCount,proto3" json:"mutation_count,omitempty"`
154 }
155
156 func (x *CommitResponse_CommitStats) Reset() {
157 *x = CommitResponse_CommitStats{}
158 mi := &file_google_spanner_v1_commit_response_proto_msgTypes[1]
159 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
160 ms.StoreMessageInfo(mi)
161 }
162
163 func (x *CommitResponse_CommitStats) String() string {
164 return protoimpl.X.MessageStringOf(x)
165 }
166
167 func (*CommitResponse_CommitStats) ProtoMessage() {}
168
169 func (x *CommitResponse_CommitStats) ProtoReflect() protoreflect.Message {
170 mi := &file_google_spanner_v1_commit_response_proto_msgTypes[1]
171 if x != nil {
172 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
173 if ms.LoadMessageInfo() == nil {
174 ms.StoreMessageInfo(mi)
175 }
176 return ms
177 }
178 return mi.MessageOf(x)
179 }
180
181 // Deprecated: Use CommitResponse_CommitStats.ProtoReflect.Descriptor instead.
182 func (*CommitResponse_CommitStats) Descriptor() ([]byte, []int) {
183 return file_google_spanner_v1_commit_response_proto_rawDescGZIP(), []int{0, 0}
184 }
185
186 func (x *CommitResponse_CommitStats) GetMutationCount() int64 {
187 if x != nil {
188 return x.MutationCount
189 }
190 return 0
191 }
192
193 var File_google_spanner_v1_commit_response_proto protoreflect.FileDescriptor
194
195 var file_google_spanner_v1_commit_response_proto_rawDesc = []byte{
196 0x0a, 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72,
197 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f,
198 0x6e, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
199 0x65, 0x2e, 0x73, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f,
200 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69,
201 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x67,
202 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x2f, 0x76, 0x31,
203 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
204 0x74, 0x6f, 0x22, 0xa5, 0x03, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73,
205 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f,
206 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
207 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
208 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x63, 0x6f, 0x6d,
209 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x50, 0x0a, 0x0c,
210 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01,
211 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x70, 0x61, 0x6e,
212 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73,
213 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74,
214 0x73, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x5e,
215 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65,
216 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
217 0x2e, 0x73, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x75, 0x6c, 0x74,
218 0x69, 0x70, 0x6c, 0x65, 0x78, 0x65, 0x64, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72,
219 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x48, 0x00, 0x52, 0x0e,
220 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x49,
221 0x0a, 0x12, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73,
222 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
223 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
224 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74,
225 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x1a, 0x34, 0x0a, 0x0b, 0x43, 0x6f, 0x6d,
226 0x6d, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x75, 0x74, 0x61,
227 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
228 0x52, 0x0d, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42,
229 0x19, 0x0a, 0x17, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x78, 0x65, 0x64, 0x53, 0x65,
230 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x42, 0xb6, 0x01, 0x0a, 0x15, 0x63,
231 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x70, 0x61, 0x6e, 0x6e, 0x65,
232 0x72, 0x2e, 0x76, 0x31, 0x42, 0x13, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70,
233 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x63, 0x6c, 0x6f,
234 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f,
235 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x73,
236 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x70, 0x62, 0x3b, 0x73, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72,
237 0x70, 0x62, 0xaa, 0x02, 0x17, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75,
238 0x64, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x17, 0x47,
239 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x53, 0x70, 0x61, 0x6e,
240 0x6e, 0x65, 0x72, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a,
241 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x53, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x3a,
242 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
243 }
244
245 var (
246 file_google_spanner_v1_commit_response_proto_rawDescOnce sync.Once
247 file_google_spanner_v1_commit_response_proto_rawDescData = file_google_spanner_v1_commit_response_proto_rawDesc
248 )
249
250 func file_google_spanner_v1_commit_response_proto_rawDescGZIP() []byte {
251 file_google_spanner_v1_commit_response_proto_rawDescOnce.Do(func() {
252 file_google_spanner_v1_commit_response_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_spanner_v1_commit_response_proto_rawDescData)
253 })
254 return file_google_spanner_v1_commit_response_proto_rawDescData
255 }
256
257 var file_google_spanner_v1_commit_response_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
258 var file_google_spanner_v1_commit_response_proto_goTypes = []any{
259 (*CommitResponse)(nil), // 0: google.spanner.v1.CommitResponse
260 (*CommitResponse_CommitStats)(nil), // 1: google.spanner.v1.CommitResponse.CommitStats
261 (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
262 (*MultiplexedSessionPrecommitToken)(nil), // 3: google.spanner.v1.MultiplexedSessionPrecommitToken
263 }
264 var file_google_spanner_v1_commit_response_proto_depIdxs = []int32{
265 2, // 0: google.spanner.v1.CommitResponse.commit_timestamp:type_name -> google.protobuf.Timestamp
266 1, // 1: google.spanner.v1.CommitResponse.commit_stats:type_name -> google.spanner.v1.CommitResponse.CommitStats
267 3, // 2: google.spanner.v1.CommitResponse.precommit_token:type_name -> google.spanner.v1.MultiplexedSessionPrecommitToken
268 2, // 3: google.spanner.v1.CommitResponse.snapshot_timestamp:type_name -> google.protobuf.Timestamp
269 4, // [4:4] is the sub-list for method output_type
270 4, // [4:4] is the sub-list for method input_type
271 4, // [4:4] is the sub-list for extension type_name
272 4, // [4:4] is the sub-list for extension extendee
273 0, // [0:4] is the sub-list for field type_name
274 }
275
276 func init() { file_google_spanner_v1_commit_response_proto_init() }
277 func file_google_spanner_v1_commit_response_proto_init() {
278 if File_google_spanner_v1_commit_response_proto != nil {
279 return
280 }
281 file_google_spanner_v1_transaction_proto_init()
282 file_google_spanner_v1_commit_response_proto_msgTypes[0].OneofWrappers = []any{
283 (*CommitResponse_PrecommitToken)(nil),
284 }
285 type x struct{}
286 out := protoimpl.TypeBuilder{
287 File: protoimpl.DescBuilder{
288 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
289 RawDescriptor: file_google_spanner_v1_commit_response_proto_rawDesc,
290 NumEnums: 0,
291 NumMessages: 2,
292 NumExtensions: 0,
293 NumServices: 0,
294 },
295 GoTypes: file_google_spanner_v1_commit_response_proto_goTypes,
296 DependencyIndexes: file_google_spanner_v1_commit_response_proto_depIdxs,
297 MessageInfos: file_google_spanner_v1_commit_response_proto_msgTypes,
298 }.Build()
299 File_google_spanner_v1_commit_response_proto = out.File
300 file_google_spanner_v1_commit_response_proto_rawDesc = nil
301 file_google_spanner_v1_commit_response_proto_goTypes = nil
302 file_google_spanner_v1_commit_response_proto_depIdxs = nil
303 }