1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
// This file is @generated by prost-build.
/// Request to executor service that start a new Spanner action.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpannerAsyncActionRequest {
    /// Action id to uniquely identify this action request.
    #[prost(int32, tag = "1")]
    pub action_id: i32,
    /// The actual SpannerAction to perform.
    #[prost(message, optional, tag = "2")]
    pub action: ::core::option::Option<SpannerAction>,
}
/// Response from executor service.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpannerAsyncActionResponse {
    /// Action id corresponds to the request.
    #[prost(int32, tag = "1")]
    pub action_id: i32,
    /// If action results are split into multiple responses, only the last response
    /// can and should contain status.
    #[prost(message, optional, tag = "2")]
    pub outcome: ::core::option::Option<SpannerActionOutcome>,
}
/// SpannerAction defines a primitive action that can be performed against
/// Spanner, such as begin or commit a transaction, or perform a read or
/// mutation.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpannerAction {
    /// Database against which to perform action.
    /// In a context where a series of actions take place, an action may omit
    /// database path if it applies to the same database as the previous action.
    #[prost(string, tag = "1")]
    pub database_path: ::prost::alloc::string::String,
    /// Configuration options for Spanner backend
    #[prost(message, optional, tag = "2")]
    pub spanner_options: ::core::option::Option<SpannerOptions>,
    /// Action represents a spanner action kind, there will only be one action kind
    /// per SpannerAction.
    #[prost(
        oneof = "spanner_action::Action",
        tags = "10, 11, 20, 21, 22, 23, 24, 25, 27, 30, 40, 41, 42, 43, 44, 50, 51"
    )]
    pub action: ::core::option::Option<spanner_action::Action>,
}
/// Nested message and enum types in `SpannerAction`.
pub mod spanner_action {
    /// Action represents a spanner action kind, there will only be one action kind
    /// per SpannerAction.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Action {
        /// Action to start a transaction.
        #[prost(message, tag = "10")]
        Start(super::StartTransactionAction),
        /// Action to finish a transaction.
        #[prost(message, tag = "11")]
        Finish(super::FinishTransactionAction),
        /// Action to do a normal read.
        #[prost(message, tag = "20")]
        Read(super::ReadAction),
        /// Action to do a query.
        #[prost(message, tag = "21")]
        Query(super::QueryAction),
        /// Action to buffer a mutation.
        #[prost(message, tag = "22")]
        Mutation(super::MutationAction),
        /// Action to a DML.
        #[prost(message, tag = "23")]
        Dml(super::DmlAction),
        /// Action to a batch DML.
        #[prost(message, tag = "24")]
        BatchDml(super::BatchDmlAction),
        /// Action to write a mutation.
        #[prost(message, tag = "25")]
        Write(super::WriteMutationsAction),
        /// Action to a partitioned update.
        #[prost(message, tag = "27")]
        PartitionedUpdate(super::PartitionedUpdateAction),
        /// Action that contains any administrative operation, like database,
        /// instance manipulation.
        #[prost(message, tag = "30")]
        Admin(super::AdminAction),
        /// Action to start a batch transaction.
        #[prost(message, tag = "40")]
        StartBatchTxn(super::StartBatchTransactionAction),
        /// Action to close a batch transaction.
        #[prost(message, tag = "41")]
        CloseBatchTxn(super::CloseBatchTransactionAction),
        /// Action to generate database partitions for batch read.
        #[prost(message, tag = "42")]
        GenerateDbPartitionsRead(super::GenerateDbPartitionsForReadAction),
        /// Action to generate database partitions for batch query.
        #[prost(message, tag = "43")]
        GenerateDbPartitionsQuery(super::GenerateDbPartitionsForQueryAction),
        /// Action to execute batch actions on generated partitions.
        #[prost(message, tag = "44")]
        ExecutePartition(super::ExecutePartitionAction),
        /// Action to execute change stream query.
        #[prost(message, tag = "50")]
        ExecuteChangeStreamQuery(super::ExecuteChangeStreamQuery),
        /// Query cancellation action for testing the cancellation of a query.
        #[prost(message, tag = "51")]
        QueryCancellation(super::QueryCancellationAction),
    }
}
/// A single read request.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadAction {
    /// The table to read at.
    #[prost(string, tag = "1")]
    pub table: ::prost::alloc::string::String,
    /// The index to read at if it's an index read.
    #[prost(string, optional, tag = "2")]
    pub index: ::core::option::Option<::prost::alloc::string::String>,
    /// List of columns must begin with the key columns used for the read.
    #[prost(string, repeated, tag = "3")]
    pub column: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Keys for performing this read.
    #[prost(message, optional, tag = "4")]
    pub keys: ::core::option::Option<KeySet>,
    /// Limit on number of rows to read. If set, must be positive.
    #[prost(int32, tag = "5")]
    pub limit: i32,
}
/// A SQL query request.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryAction {
    /// The SQL string.
    #[prost(string, tag = "1")]
    pub sql: ::prost::alloc::string::String,
    /// Parameters for the SQL string.
    #[prost(message, repeated, tag = "2")]
    pub params: ::prost::alloc::vec::Vec<query_action::Parameter>,
}
/// Nested message and enum types in `QueryAction`.
pub mod query_action {
    /// Parameter that bind to placeholders in the SQL string
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Parameter {
        /// Name of the parameter (with no leading @).
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        /// Type of the parameter.
        #[prost(message, optional, tag = "2")]
        pub r#type: ::core::option::Option<super::super::super::v1::Type>,
        /// Value of the parameter.
        #[prost(message, optional, tag = "3")]
        pub value: ::core::option::Option<super::Value>,
    }
}
/// A single DML statement.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DmlAction {
    /// DML statement.
    #[prost(message, optional, tag = "1")]
    pub update: ::core::option::Option<QueryAction>,
    /// Whether to autocommit the transaction after executing the DML statement,
    /// if the Executor supports autocommit.
    #[prost(bool, optional, tag = "2")]
    pub autocommit_if_supported: ::core::option::Option<bool>,
}
/// Batch of DML statements invoked using batched execution.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchDmlAction {
    /// DML statements.
    #[prost(message, repeated, tag = "1")]
    pub updates: ::prost::alloc::vec::Vec<QueryAction>,
}
/// Value represents a single value that can be read or written to/from
/// Spanner.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Value {
    /// Type of array element. Only set if value is an array.
    #[prost(message, optional, tag = "12")]
    pub array_type: ::core::option::Option<super::super::v1::Type>,
    /// Exactly one of the following fields will be present.
    #[prost(oneof = "value::ValueType", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11")]
    pub value_type: ::core::option::Option<value::ValueType>,
}
/// Nested message and enum types in `Value`.
pub mod value {
    /// Exactly one of the following fields will be present.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum ValueType {
        /// If is_null is set, then this value is null.
        #[prost(bool, tag = "1")]
        IsNull(bool),
        /// Int type value. It's used for all integer number types, like int32 and
        /// int64.
        #[prost(int64, tag = "2")]
        IntValue(i64),
        /// Bool type value.
        #[prost(bool, tag = "3")]
        BoolValue(bool),
        /// Double type value. It's used for all float point types, like float and
        /// double.
        #[prost(double, tag = "4")]
        DoubleValue(f64),
        /// Bytes type value, stored in CORD. It's also used for PROTO type value.
        #[prost(bytes, tag = "5")]
        BytesValue(::prost::bytes::Bytes),
        /// String type value, stored in CORD.
        #[prost(string, tag = "6")]
        StringValue(::prost::alloc::string::String),
        /// Struct type value. It contains a ValueList representing the values in
        /// this struct.
        #[prost(message, tag = "7")]
        StructValue(super::ValueList),
        /// Timestamp type value.
        #[prost(message, tag = "8")]
        TimestampValue(::prost_types::Timestamp),
        /// Date type value. Date is specified as a number of days since Unix epoch.
        #[prost(int32, tag = "9")]
        DateDaysValue(i32),
        /// If set, holds the sentinel value for the transaction CommitTimestamp.
        #[prost(bool, tag = "10")]
        IsCommitTimestamp(bool),
        /// Array type value. The underlying Valuelist should have values that have
        /// the same type.
        #[prost(message, tag = "11")]
        ArrayValue(super::ValueList),
    }
}
/// KeyRange represents a range of rows in a table or index.
///
/// A range has a start key and an end key. These keys can be open or
/// closed, indicating if the range includes rows with that key.
///
/// Keys are represented by "ValueList", where the ith value in the list
/// corresponds to the ith component of the table or index primary key.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyRange {
    /// "start" and "limit" must have the same number of key parts,
    /// though they may name only a prefix of the table or index key.
    /// The start key of this KeyRange.
    #[prost(message, optional, tag = "1")]
    pub start: ::core::option::Option<ValueList>,
    /// The end key of this KeyRange.
    #[prost(message, optional, tag = "2")]
    pub limit: ::core::option::Option<ValueList>,
    /// "start" and "limit" type for this KeyRange.
    #[prost(enumeration = "key_range::Type", optional, tag = "3")]
    pub r#type: ::core::option::Option<i32>,
}
/// Nested message and enum types in `KeyRange`.
pub mod key_range {
    /// Type controls whether "start" and "limit" are open or closed. By default,
    /// "start" is closed, and "limit" is open.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        /// "TYPE_UNSPECIFIED" is equivalent to "CLOSED_OPEN".
        Unspecified = 0,
        /// \[start,limit\]
        ClosedClosed = 1,
        /// [start,limit)
        ClosedOpen = 2,
        /// (start,limit]
        OpenClosed = 3,
        /// (start,limit)
        OpenOpen = 4,
    }
    impl Type {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Type::Unspecified => "TYPE_UNSPECIFIED",
                Type::ClosedClosed => "CLOSED_CLOSED",
                Type::ClosedOpen => "CLOSED_OPEN",
                Type::OpenClosed => "OPEN_CLOSED",
                Type::OpenOpen => "OPEN_OPEN",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "CLOSED_CLOSED" => Some(Self::ClosedClosed),
                "CLOSED_OPEN" => Some(Self::ClosedOpen),
                "OPEN_CLOSED" => Some(Self::OpenClosed),
                "OPEN_OPEN" => Some(Self::OpenOpen),
                _ => None,
            }
        }
    }
}
/// KeySet defines a collection of Spanner keys and/or key ranges. All
/// the keys are expected to be in the same table. The keys need not be
/// sorted in any particular way.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeySet {
    /// A list of specific keys. Entries in "keys" should have exactly as
    /// many elements as there are columns in the primary or index key
    /// with which this "KeySet" is used.
    #[prost(message, repeated, tag = "1")]
    pub point: ::prost::alloc::vec::Vec<ValueList>,
    /// A list of key ranges.
    #[prost(message, repeated, tag = "2")]
    pub range: ::prost::alloc::vec::Vec<KeyRange>,
    /// For convenience "all" can be set to "true" to indicate that this
    /// "KeySet" matches all keys in the table or index. Note that any keys
    /// specified in "keys" or "ranges" are only yielded once.
    #[prost(bool, tag = "3")]
    pub all: bool,
}
/// List of values.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValueList {
    /// Values contained in this ValueList.
    #[prost(message, repeated, tag = "1")]
    pub value: ::prost::alloc::vec::Vec<Value>,
}
/// A single mutation request.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutationAction {
    /// Mods that contained in this mutation.
    #[prost(message, repeated, tag = "1")]
    pub r#mod: ::prost::alloc::vec::Vec<mutation_action::Mod>,
}
/// Nested message and enum types in `MutationAction`.
pub mod mutation_action {
    /// Arguments to Insert, InsertOrUpdate, and Replace operations.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct InsertArgs {
        /// The names of the columns to be written.
        #[prost(string, repeated, tag = "1")]
        pub column: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// Type information for the "values" entries below.
        #[prost(message, repeated, tag = "2")]
        pub r#type: ::prost::alloc::vec::Vec<super::super::super::v1::Type>,
        /// The values to be written.
        #[prost(message, repeated, tag = "3")]
        pub values: ::prost::alloc::vec::Vec<super::ValueList>,
    }
    /// Arguments to Update.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct UpdateArgs {
        /// The columns to be updated. Identical to InsertArgs.column.
        #[prost(string, repeated, tag = "1")]
        pub column: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// Type information for "values". Identical to InsertArgs.type.
        #[prost(message, repeated, tag = "2")]
        pub r#type: ::prost::alloc::vec::Vec<super::super::super::v1::Type>,
        /// The values to be updated. Identical to InsertArgs.values.
        #[prost(message, repeated, tag = "3")]
        pub values: ::prost::alloc::vec::Vec<super::ValueList>,
    }
    /// Mod represents the write action that will be perform to a table. Each mod
    /// will specify exactly one action, from insert, update, insert_or_update,
    /// replace and delete.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Mod {
        /// The table to write.
        #[prost(string, tag = "1")]
        pub table: ::prost::alloc::string::String,
        /// Exactly one of the remaining elements may be present.
        /// Insert new rows into "table".
        #[prost(message, optional, tag = "2")]
        pub insert: ::core::option::Option<InsertArgs>,
        /// Update columns stored in existing rows of "table".
        #[prost(message, optional, tag = "3")]
        pub update: ::core::option::Option<UpdateArgs>,
        /// Insert or update existing rows of "table".
        #[prost(message, optional, tag = "4")]
        pub insert_or_update: ::core::option::Option<InsertArgs>,
        /// Replace existing rows of "table".
        #[prost(message, optional, tag = "5")]
        pub replace: ::core::option::Option<InsertArgs>,
        /// Delete rows from "table".
        #[prost(message, optional, tag = "6")]
        pub delete_keys: ::core::option::Option<super::KeySet>,
    }
}
/// WriteMutationAction defines an action of flushing the mutation so they
/// are visible to subsequent operations in the transaction.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WriteMutationsAction {
    /// The mutation to write.
    #[prost(message, optional, tag = "1")]
    pub mutation: ::core::option::Option<MutationAction>,
}
/// PartitionedUpdateAction defines an action to execute a partitioned DML
/// which runs different partitions in parallel.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PartitionedUpdateAction {
    /// Options for partitioned update.
    #[prost(message, optional, tag = "1")]
    pub options: ::core::option::Option<
        partitioned_update_action::ExecutePartitionedUpdateOptions,
    >,
    /// Partitioned dml query.
    #[prost(message, optional, tag = "2")]
    pub update: ::core::option::Option<QueryAction>,
}
/// Nested message and enum types in `PartitionedUpdateAction`.
pub mod partitioned_update_action {
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ExecutePartitionedUpdateOptions {
        /// RPC Priority
        #[prost(
            enumeration = "super::super::super::v1::request_options::Priority",
            optional,
            tag = "1"
        )]
        pub rpc_priority: ::core::option::Option<i32>,
        /// Transaction tag
        #[prost(string, optional, tag = "2")]
        pub tag: ::core::option::Option<::prost::alloc::string::String>,
    }
}
/// StartTransactionAction defines an action of initializing a transaction.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartTransactionAction {
    /// Concurrency is for read-only transactions and must be omitted for
    /// read-write transactions.
    #[prost(message, optional, tag = "1")]
    pub concurrency: ::core::option::Option<Concurrency>,
    /// Metadata about tables and columns that will be involved in this
    /// transaction. It is to convert values of key parts correctly.
    #[prost(message, repeated, tag = "2")]
    pub table: ::prost::alloc::vec::Vec<TableMetadata>,
    /// Transaction_seed contains workid and op pair for this transaction, used for
    /// testing.
    #[prost(string, tag = "3")]
    pub transaction_seed: ::prost::alloc::string::String,
    /// Execution options (e.g., whether transaction is opaque, optimistic).
    #[prost(message, optional, tag = "4")]
    pub execution_options: ::core::option::Option<TransactionExecutionOptions>,
}
/// Concurrency for read-only transactions.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Concurrency {
    /// True if exact_timestamp_micros is set, and the chosen timestamp is that of
    /// a snapshot epoch.
    #[prost(bool, tag = "7")]
    pub snapshot_epoch_read: bool,
    /// If set, this is a snapshot epoch read constrained to read only the
    /// specified log scope root table, and its children. Will not be set for full
    /// database epochs.
    #[prost(string, tag = "8")]
    pub snapshot_epoch_root_table: ::prost::alloc::string::String,
    /// Set only when batch is true.
    #[prost(int64, tag = "9")]
    pub batch_read_timestamp_micros: i64,
    /// Concurrency mode set for read-only transactions, exactly one mode below
    /// should be set.
    #[prost(oneof = "concurrency::ConcurrencyMode", tags = "1, 2, 3, 4, 5, 6")]
    pub concurrency_mode: ::core::option::Option<concurrency::ConcurrencyMode>,
}
/// Nested message and enum types in `Concurrency`.
pub mod concurrency {
    /// Concurrency mode set for read-only transactions, exactly one mode below
    /// should be set.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum ConcurrencyMode {
        /// Indicates a read at a consistent timestamp that is specified relative to
        /// now. That is, if the caller has specified an exact staleness of s
        /// seconds, we will read at now - s.
        #[prost(double, tag = "1")]
        StalenessSeconds(f64),
        /// Indicates a boundedly stale read that reads at a timestamp >= T.
        #[prost(int64, tag = "2")]
        MinReadTimestampMicros(i64),
        /// Indicates a boundedly stale read that is at most N seconds stale.
        #[prost(double, tag = "3")]
        MaxStalenessSeconds(f64),
        /// Indicates a read at a consistent timestamp.
        #[prost(int64, tag = "4")]
        ExactTimestampMicros(i64),
        /// Indicates a strong read, must only be set to true, or unset.
        #[prost(bool, tag = "5")]
        Strong(bool),
        /// Indicates a batch read, must only be set to true, or unset.
        #[prost(bool, tag = "6")]
        Batch(bool),
    }
}
/// TableMetadata contains metadata of a single table.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableMetadata {
    /// Table name.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Columns, in the same order as in the schema.
    #[prost(message, repeated, tag = "2")]
    pub column: ::prost::alloc::vec::Vec<ColumnMetadata>,
    /// Keys, in order. Column name is currently not populated.
    #[prost(message, repeated, tag = "3")]
    pub key_column: ::prost::alloc::vec::Vec<ColumnMetadata>,
}
/// ColumnMetadata represents metadata of a single column.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ColumnMetadata {
    /// Column name.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Column type.
    #[prost(message, optional, tag = "2")]
    pub r#type: ::core::option::Option<super::super::v1::Type>,
}
/// Options for executing the transaction.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionExecutionOptions {
    /// Whether optimistic concurrency should be used to execute this transaction.
    #[prost(bool, tag = "1")]
    pub optimistic: bool,
}
/// FinishTransactionAction defines an action of finishing a transaction.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FinishTransactionAction {
    /// Defines how exactly the transaction should be completed, e.g. with
    /// commit or abortion.
    #[prost(enumeration = "finish_transaction_action::Mode", tag = "1")]
    pub mode: i32,
}
/// Nested message and enum types in `FinishTransactionAction`.
pub mod finish_transaction_action {
    /// Mode indicates how the transaction should be finished.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Mode {
        /// "MODE_UNSPECIFIED" is equivalent to "COMMIT".
        Unspecified = 0,
        /// Commit the transaction.
        Commit = 1,
        /// Drop the transaction without committing it.
        Abandon = 2,
    }
    impl Mode {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Mode::Unspecified => "MODE_UNSPECIFIED",
                Mode::Commit => "COMMIT",
                Mode::Abandon => "ABANDON",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "MODE_UNSPECIFIED" => Some(Self::Unspecified),
                "COMMIT" => Some(Self::Commit),
                "ABANDON" => Some(Self::Abandon),
                _ => None,
            }
        }
    }
}
/// AdminAction defines all the cloud spanner admin actions, including
/// instance/database admin ops, backup ops and operation actions.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdminAction {
    /// Exactly one of the actions below will be performed in AdminAction.
    #[prost(
        oneof = "admin_action::Action",
        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 27, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28"
    )]
    pub action: ::core::option::Option<admin_action::Action>,
}
/// Nested message and enum types in `AdminAction`.
pub mod admin_action {
    /// Exactly one of the actions below will be performed in AdminAction.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Action {
        /// Action that creates a user instance config.
        #[prost(message, tag = "1")]
        CreateUserInstanceConfig(super::CreateUserInstanceConfigAction),
        /// Action that updates a user instance config.
        #[prost(message, tag = "2")]
        UpdateUserInstanceConfig(super::UpdateUserInstanceConfigAction),
        /// Action that deletes a user instance config.
        #[prost(message, tag = "3")]
        DeleteUserInstanceConfig(super::DeleteUserInstanceConfigAction),
        /// Action that gets a user instance config.
        #[prost(message, tag = "4")]
        GetCloudInstanceConfig(super::GetCloudInstanceConfigAction),
        /// Action that lists user instance configs.
        #[prost(message, tag = "5")]
        ListInstanceConfigs(super::ListCloudInstanceConfigsAction),
        /// Action that creates a Cloud Spanner instance.
        #[prost(message, tag = "6")]
        CreateCloudInstance(super::CreateCloudInstanceAction),
        /// Action that updates a Cloud Spanner instance.
        #[prost(message, tag = "7")]
        UpdateCloudInstance(super::UpdateCloudInstanceAction),
        /// Action that deletes a Cloud Spanner instance.
        #[prost(message, tag = "8")]
        DeleteCloudInstance(super::DeleteCloudInstanceAction),
        /// Action that lists Cloud Spanner instances.
        #[prost(message, tag = "9")]
        ListCloudInstances(super::ListCloudInstancesAction),
        /// Action that retrieves a Cloud Spanner instance.
        #[prost(message, tag = "10")]
        GetCloudInstance(super::GetCloudInstanceAction),
        /// Action that creates a Cloud Spanner database.
        #[prost(message, tag = "11")]
        CreateCloudDatabase(super::CreateCloudDatabaseAction),
        /// Action that updates the schema of a Cloud Spanner database.
        #[prost(message, tag = "12")]
        UpdateCloudDatabaseDdl(super::UpdateCloudDatabaseDdlAction),
        /// Action that updates the schema of a Cloud Spanner database.
        #[prost(message, tag = "27")]
        UpdateCloudDatabase(super::UpdateCloudDatabaseAction),
        /// Action that drops a Cloud Spanner database.
        #[prost(message, tag = "13")]
        DropCloudDatabase(super::DropCloudDatabaseAction),
        /// Action that lists Cloud Spanner databases.
        #[prost(message, tag = "14")]
        ListCloudDatabases(super::ListCloudDatabasesAction),
        /// Action that lists Cloud Spanner database operations.
        #[prost(message, tag = "15")]
        ListCloudDatabaseOperations(super::ListCloudDatabaseOperationsAction),
        /// Action that restores a Cloud Spanner database from a backup.
        #[prost(message, tag = "16")]
        RestoreCloudDatabase(super::RestoreCloudDatabaseAction),
        /// Action that gets a Cloud Spanner database.
        #[prost(message, tag = "17")]
        GetCloudDatabase(super::GetCloudDatabaseAction),
        /// Action that creates a Cloud Spanner database backup.
        #[prost(message, tag = "18")]
        CreateCloudBackup(super::CreateCloudBackupAction),
        /// Action that copies a Cloud Spanner database backup.
        #[prost(message, tag = "19")]
        CopyCloudBackup(super::CopyCloudBackupAction),
        /// Action that gets a Cloud Spanner database backup.
        #[prost(message, tag = "20")]
        GetCloudBackup(super::GetCloudBackupAction),
        /// Action that updates a Cloud Spanner database backup.
        #[prost(message, tag = "21")]
        UpdateCloudBackup(super::UpdateCloudBackupAction),
        /// Action that deletes a Cloud Spanner database backup.
        #[prost(message, tag = "22")]
        DeleteCloudBackup(super::DeleteCloudBackupAction),
        /// Action that lists Cloud Spanner database backups.
        #[prost(message, tag = "23")]
        ListCloudBackups(super::ListCloudBackupsAction),
        /// Action that lists Cloud Spanner database backup operations.
        #[prost(message, tag = "24")]
        ListCloudBackupOperations(super::ListCloudBackupOperationsAction),
        /// Action that gets an operation.
        #[prost(message, tag = "25")]
        GetOperation(super::GetOperationAction),
        /// Action that cancels an operation.
        #[prost(message, tag = "26")]
        CancelOperation(super::CancelOperationAction),
        /// Action that changes quorum of a Cloud Spanner database.
        #[prost(message, tag = "28")]
        ChangeQuorumCloudDatabase(super::ChangeQuorumCloudDatabaseAction),
    }
}
/// Action that creates a user instance config.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateUserInstanceConfigAction {
    /// User instance config ID (not path), e.g. "custom-config".
    #[prost(string, tag = "1")]
    pub user_config_id: ::prost::alloc::string::String,
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "2")]
    pub project_id: ::prost::alloc::string::String,
    /// Base config ID, e.g. "test-config".
    #[prost(string, tag = "3")]
    pub base_config_id: ::prost::alloc::string::String,
    /// Replicas that should be included in the user config.
    #[prost(message, repeated, tag = "4")]
    pub replicas: ::prost::alloc::vec::Vec<
        super::super::admin::instance::v1::ReplicaInfo,
    >,
}
/// Action that updates a user instance config.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateUserInstanceConfigAction {
    /// User instance config ID (not path), e.g. "custom-config".
    #[prost(string, tag = "1")]
    pub user_config_id: ::prost::alloc::string::String,
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "2")]
    pub project_id: ::prost::alloc::string::String,
    /// The descriptive name for this instance config as it appears in UIs.
    #[prost(string, optional, tag = "3")]
    pub display_name: ::core::option::Option<::prost::alloc::string::String>,
    /// labels.
    #[prost(btree_map = "string, string", tag = "4")]
    pub labels: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// Action that gets a user instance config.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCloudInstanceConfigAction {
    /// Instance config ID (not path), e.g. "custom-config".
    #[prost(string, tag = "1")]
    pub instance_config_id: ::prost::alloc::string::String,
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "2")]
    pub project_id: ::prost::alloc::string::String,
}
/// Action that deletes a user instance configs.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteUserInstanceConfigAction {
    /// User instance config ID (not path), e.g. "custom-config".
    #[prost(string, tag = "1")]
    pub user_config_id: ::prost::alloc::string::String,
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "2")]
    pub project_id: ::prost::alloc::string::String,
}
/// Action that lists user instance configs.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCloudInstanceConfigsAction {
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "1")]
    pub project_id: ::prost::alloc::string::String,
    /// Number of instance configs to be returned in the response. If 0 or
    /// less, defaults to the server's maximum allowed page size.
    #[prost(int32, optional, tag = "2")]
    pub page_size: ::core::option::Option<i32>,
    /// If non-empty, "page_token" should contain a next_page_token
    /// from a previous ListInstanceConfigsResponse to the same "parent".
    #[prost(string, optional, tag = "3")]
    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
}
/// Action that creates a Cloud Spanner instance.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCloudInstanceAction {
    /// Cloud instance ID (not path), e.g. "test-instance".
    #[prost(string, tag = "1")]
    pub instance_id: ::prost::alloc::string::String,
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "2")]
    pub project_id: ::prost::alloc::string::String,
    /// Instance config ID, e.g. "test-config".
    #[prost(string, tag = "3")]
    pub instance_config_id: ::prost::alloc::string::String,
    /// Number of nodes (processing_units should not be set or set to 0 if used).
    #[prost(int32, optional, tag = "4")]
    pub node_count: ::core::option::Option<i32>,
    /// Number of processing units (node_count should be set to 0 if used).
    #[prost(int32, optional, tag = "6")]
    pub processing_units: ::core::option::Option<i32>,
    /// The autoscaling config for this instance. If non-empty, an autoscaling
    /// instance will be created (processing_units and node_count should be set to
    /// 0 if used).
    #[prost(message, optional, tag = "7")]
    pub autoscaling_config: ::core::option::Option<
        super::super::admin::instance::v1::AutoscalingConfig,
    >,
    /// labels.
    #[prost(btree_map = "string, string", tag = "5")]
    pub labels: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// Action that updates a Cloud Spanner instance.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCloudInstanceAction {
    /// Cloud instance ID (not path), e.g. "test-instance".
    #[prost(string, tag = "1")]
    pub instance_id: ::prost::alloc::string::String,
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "2")]
    pub project_id: ::prost::alloc::string::String,
    /// The descriptive name for this instance as it appears in UIs.
    /// Must be unique per project and between 4 and 30 characters in length.
    #[prost(string, optional, tag = "3")]
    pub display_name: ::core::option::Option<::prost::alloc::string::String>,
    /// The number of nodes allocated to this instance. At most one of either
    /// node_count or processing_units should be present in the message.
    #[prost(int32, optional, tag = "4")]
    pub node_count: ::core::option::Option<i32>,
    /// The number of processing units allocated to this instance. At most one of
    /// processing_units or node_count should be present in the message.
    #[prost(int32, optional, tag = "5")]
    pub processing_units: ::core::option::Option<i32>,
    /// The autoscaling config for this instance. If non-empty, this instance is
    /// using autoscaling (processing_units and node_count should be set to
    /// 0 if used).
    #[prost(message, optional, tag = "7")]
    pub autoscaling_config: ::core::option::Option<
        super::super::admin::instance::v1::AutoscalingConfig,
    >,
    /// labels.
    #[prost(btree_map = "string, string", tag = "6")]
    pub labels: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// Action that deletes a Cloud Spanner instance.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteCloudInstanceAction {
    /// Cloud instance ID (not path), e.g. "test-instance".
    #[prost(string, tag = "1")]
    pub instance_id: ::prost::alloc::string::String,
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "2")]
    pub project_id: ::prost::alloc::string::String,
}
/// Action that creates a Cloud Spanner database.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCloudDatabaseAction {
    /// Cloud instance ID (not path), e.g. "test-instance".
    #[prost(string, tag = "1")]
    pub instance_id: ::prost::alloc::string::String,
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "2")]
    pub project_id: ::prost::alloc::string::String,
    /// Cloud database ID (not full path), e.g. "db0".
    #[prost(string, tag = "3")]
    pub database_id: ::prost::alloc::string::String,
    /// SDL statements to apply to the new database.
    #[prost(string, repeated, tag = "4")]
    pub sdl_statement: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The KMS key used to encrypt the database to be created if the database
    /// should be CMEK protected.
    #[prost(message, optional, tag = "5")]
    pub encryption_config: ::core::option::Option<
        super::super::admin::database::v1::EncryptionConfig,
    >,
    /// Optional SQL dialect (GOOGLESQL or POSTGRESQL).  Default: GOOGLESQL.
    #[prost(string, optional, tag = "6")]
    pub dialect: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(bytes = "bytes", optional, tag = "7")]
    pub proto_descriptors: ::core::option::Option<::prost::bytes::Bytes>,
}
/// Action that updates the schema of a Cloud Spanner database.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCloudDatabaseDdlAction {
    /// Cloud instance ID (not path), e.g. "test-instance".
    #[prost(string, tag = "1")]
    pub instance_id: ::prost::alloc::string::String,
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "2")]
    pub project_id: ::prost::alloc::string::String,
    /// Cloud database ID (not full path), e.g. "db0".
    #[prost(string, tag = "3")]
    pub database_id: ::prost::alloc::string::String,
    /// SDL statements to apply to the database.
    #[prost(string, repeated, tag = "4")]
    pub sdl_statement: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Op ID can be used to track progress of the update. If set, it must be
    /// unique per database. If not set, Cloud Spanner will generate operation ID
    /// automatically.
    #[prost(string, tag = "5")]
    pub operation_id: ::prost::alloc::string::String,
    #[prost(bytes = "bytes", optional, tag = "6")]
    pub proto_descriptors: ::core::option::Option<::prost::bytes::Bytes>,
}
/// Action that updates a Cloud Spanner database.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCloudDatabaseAction {
    /// Cloud instance ID (not path), e.g. "test-instance".
    #[prost(string, tag = "1")]
    pub instance_id: ::prost::alloc::string::String,
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "2")]
    pub project_id: ::prost::alloc::string::String,
    /// Cloud database name (not full path), e.g. "db0".
    #[prost(string, tag = "3")]
    pub database_name: ::prost::alloc::string::String,
    /// Updated value of enable_drop_protection, this is the only field that has
    /// supported to be updated.
    #[prost(bool, tag = "4")]
    pub enable_drop_protection: bool,
}
/// Action that drops a Cloud Spanner database.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropCloudDatabaseAction {
    /// Cloud instance ID (not path), e.g. "test-instance".
    #[prost(string, tag = "1")]
    pub instance_id: ::prost::alloc::string::String,
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "2")]
    pub project_id: ::prost::alloc::string::String,
    /// Cloud database ID (not full path), e.g. "db0".
    #[prost(string, tag = "3")]
    pub database_id: ::prost::alloc::string::String,
}
/// Action that changes quorum of a Cloud Spanner database.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChangeQuorumCloudDatabaseAction {
    /// The fully qualified uri of the database whose quorum has to be changed.
    #[prost(string, optional, tag = "1")]
    pub database_uri: ::core::option::Option<::prost::alloc::string::String>,
    /// The locations of the serving regions, e.g. "asia-south1".
    #[prost(string, repeated, tag = "2")]
    pub serving_locations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Action that lists Cloud Spanner databases.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCloudDatabasesAction {
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "1")]
    pub project_id: ::prost::alloc::string::String,
    /// Cloud instance ID (not path) to list databases from, e.g. "test-instance".
    #[prost(string, tag = "2")]
    pub instance_id: ::prost::alloc::string::String,
    /// Number of databases to be returned in the response. If 0 or
    /// less, defaults to the server's maximum allowed page size.
    #[prost(int32, tag = "3")]
    pub page_size: i32,
    /// If non-empty, "page_token" should contain a next_page_token
    /// from a previous ListDatabasesResponse to the same "parent"
    /// and with the same "filter".
    #[prost(string, tag = "4")]
    pub page_token: ::prost::alloc::string::String,
}
/// Action that lists Cloud Spanner databases.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCloudInstancesAction {
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "1")]
    pub project_id: ::prost::alloc::string::String,
    /// A filter expression that filters what operations are returned in the
    /// response.
    /// The expression must specify the field name, a comparison operator,
    /// and the value that you want to use for filtering.
    /// Refer spanner_instance_admin.proto.ListInstancesRequest for
    /// detail.
    #[prost(string, optional, tag = "2")]
    pub filter: ::core::option::Option<::prost::alloc::string::String>,
    /// Number of instances to be returned in the response. If 0 or
    /// less, defaults to the server's maximum allowed page size.
    #[prost(int32, optional, tag = "3")]
    pub page_size: ::core::option::Option<i32>,
    /// If non-empty, "page_token" should contain a next_page_token
    /// from a previous ListInstancesResponse to the same "parent"
    /// and with the same "filter".
    #[prost(string, optional, tag = "4")]
    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
}
/// Action that retrieves a Cloud Spanner instance.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCloudInstanceAction {
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "1")]
    pub project_id: ::prost::alloc::string::String,
    /// Cloud instance ID (not path) to retrieve the instance from,
    /// e.g. "test-instance".
    #[prost(string, tag = "2")]
    pub instance_id: ::prost::alloc::string::String,
}
/// Action that lists Cloud Spanner database operations.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCloudDatabaseOperationsAction {
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "1")]
    pub project_id: ::prost::alloc::string::String,
    /// Cloud instance ID (not path) to list database operations from,
    /// e.g. "test-instance".
    #[prost(string, tag = "2")]
    pub instance_id: ::prost::alloc::string::String,
    /// A filter expression that filters what operations are returned in the
    /// response.
    /// The expression must specify the field name, a comparison operator,
    /// and the value that you want to use for filtering.
    /// Refer spanner_database_admin.proto.ListDatabaseOperationsRequest for
    /// detail.
    #[prost(string, tag = "3")]
    pub filter: ::prost::alloc::string::String,
    /// Number of databases to be returned in the response. If 0 or
    /// less, defaults to the server's maximum allowed page size.
    #[prost(int32, tag = "4")]
    pub page_size: i32,
    /// If non-empty, "page_token" should contain a next_page_token
    /// from a previous ListDatabaseOperationsResponse to the same "parent"
    /// and with the same "filter".
    #[prost(string, tag = "5")]
    pub page_token: ::prost::alloc::string::String,
}
/// Action that restores a Cloud Spanner database from a backup.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreCloudDatabaseAction {
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "1")]
    pub project_id: ::prost::alloc::string::String,
    /// Cloud instance ID (not path) containing the backup, e.g. "backup-instance".
    #[prost(string, tag = "2")]
    pub backup_instance_id: ::prost::alloc::string::String,
    /// The id of the backup from which to restore, e.g. "test-backup".
    #[prost(string, tag = "3")]
    pub backup_id: ::prost::alloc::string::String,
    /// Cloud instance ID (not path) containing the database, e.g.
    /// "database-instance".
    #[prost(string, tag = "4")]
    pub database_instance_id: ::prost::alloc::string::String,
    /// The id of the database to create and restore to, e.g. "db0". Note that this
    /// database must not already exist.
    #[prost(string, tag = "5")]
    pub database_id: ::prost::alloc::string::String,
    /// The KMS key(s) used to encrypt the restored database to be created if the
    /// restored database should be CMEK protected.
    #[prost(message, optional, tag = "7")]
    pub encryption_config: ::core::option::Option<
        super::super::admin::database::v1::EncryptionConfig,
    >,
}
/// Action that gets a Cloud Spanner database.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCloudDatabaseAction {
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "1")]
    pub project_id: ::prost::alloc::string::String,
    /// Cloud instance ID (not path), e.g. "test-instance".
    #[prost(string, tag = "2")]
    pub instance_id: ::prost::alloc::string::String,
    /// The id of the database to get, e.g. "db0".
    #[prost(string, tag = "3")]
    pub database_id: ::prost::alloc::string::String,
}
/// Action that creates a Cloud Spanner database backup.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCloudBackupAction {
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "1")]
    pub project_id: ::prost::alloc::string::String,
    /// Cloud instance ID (not path), e.g. "test-instance".
    #[prost(string, tag = "2")]
    pub instance_id: ::prost::alloc::string::String,
    /// The id of the backup to be created, e.g. "test-backup".
    #[prost(string, tag = "3")]
    pub backup_id: ::prost::alloc::string::String,
    /// The id of the database from which this backup was
    /// created, e.g. "db0". Note that this needs to be in the
    /// same instance as the backup.
    #[prost(string, tag = "4")]
    pub database_id: ::prost::alloc::string::String,
    /// Output only. The expiration time of the backup, which must be at least 6
    /// hours and at most 366 days from the time the request is received.
    #[prost(message, optional, tag = "5")]
    pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The version time of the backup, which must be within the time range of
    /// \[earliest_version_time, NOW\], where earliest_version_time is retrieved by
    /// cloud spanner frontend API (See details: go/cs-pitr-lite-design).
    #[prost(message, optional, tag = "6")]
    pub version_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The KMS key(s) used to encrypt the backup to be created if the backup
    /// should be CMEK protected.
    #[prost(message, optional, tag = "7")]
    pub encryption_config: ::core::option::Option<
        super::super::admin::database::v1::EncryptionConfig,
    >,
}
/// Action that copies a Cloud Spanner database backup.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CopyCloudBackupAction {
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "1")]
    pub project_id: ::prost::alloc::string::String,
    /// Cloud instance ID (not path), e.g. "test-instance".
    #[prost(string, tag = "2")]
    pub instance_id: ::prost::alloc::string::String,
    /// The id of the backup to be created, e.g. "test-backup".
    #[prost(string, tag = "3")]
    pub backup_id: ::prost::alloc::string::String,
    /// The fully qualified uri of the source backup from which this
    /// backup was copied. eg.
    /// "projects/<project_id>/instances/<instance_id>/backups/<backup_id>".
    #[prost(string, tag = "4")]
    pub source_backup: ::prost::alloc::string::String,
    /// Output only. The expiration time of the backup, which must be at least 6
    /// hours and at most 366 days from the time the request is received.
    #[prost(message, optional, tag = "5")]
    pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Action that gets a Cloud Spanner database backup.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCloudBackupAction {
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "1")]
    pub project_id: ::prost::alloc::string::String,
    /// Cloud instance ID (not path), e.g. "test-instance".
    #[prost(string, tag = "2")]
    pub instance_id: ::prost::alloc::string::String,
    /// The id of the backup to get, e.g. "test-backup".
    #[prost(string, tag = "3")]
    pub backup_id: ::prost::alloc::string::String,
}
/// Action that updates a Cloud Spanner database backup.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCloudBackupAction {
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "1")]
    pub project_id: ::prost::alloc::string::String,
    /// Cloud instance ID (not path), e.g. "test-instance".
    #[prost(string, tag = "2")]
    pub instance_id: ::prost::alloc::string::String,
    /// The id of the backup to update, e.g. "test-backup".
    #[prost(string, tag = "3")]
    pub backup_id: ::prost::alloc::string::String,
    /// Output only. Updated value of expire_time, this is the only field
    /// that supported to be updated.
    #[prost(message, optional, tag = "4")]
    pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Action that deletes a Cloud Spanner database backup.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteCloudBackupAction {
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "1")]
    pub project_id: ::prost::alloc::string::String,
    /// Cloud instance ID (not path), e.g. "test-instance".
    #[prost(string, tag = "2")]
    pub instance_id: ::prost::alloc::string::String,
    /// The id of the backup to delete, e.g. "test-backup".
    #[prost(string, tag = "3")]
    pub backup_id: ::prost::alloc::string::String,
}
/// Action that lists Cloud Spanner database backups.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCloudBackupsAction {
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "1")]
    pub project_id: ::prost::alloc::string::String,
    /// Cloud instance ID (not path) to list backups from, e.g. "test-instance".
    #[prost(string, tag = "2")]
    pub instance_id: ::prost::alloc::string::String,
    /// A filter expression that filters backups listed in the response.
    /// The expression must specify the field name, a comparison operator,
    /// and the value that you want to use for filtering.
    /// Refer backup.proto.ListBackupsRequest for detail.
    #[prost(string, tag = "3")]
    pub filter: ::prost::alloc::string::String,
    /// Number of backups to be returned in the response. If 0 or
    /// less, defaults to the server's maximum allowed page size.
    #[prost(int32, tag = "4")]
    pub page_size: i32,
    /// If non-empty, "page_token" should contain a next_page_token
    /// from a previous ListBackupsResponse to the same "parent"
    /// and with the same "filter".
    #[prost(string, tag = "5")]
    pub page_token: ::prost::alloc::string::String,
}
/// Action that lists Cloud Spanner database backup operations.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCloudBackupOperationsAction {
    /// Cloud project ID, e.g. "spanner-cloud-systest".
    #[prost(string, tag = "1")]
    pub project_id: ::prost::alloc::string::String,
    /// Cloud instance ID (not path) to list backup operations from,
    /// e.g. "test-instance".
    #[prost(string, tag = "2")]
    pub instance_id: ::prost::alloc::string::String,
    /// A filter expression that filters what operations are returned in the
    /// response.
    /// The expression must specify the field name, a comparison operator,
    /// and the value that you want to use for filtering.
    /// Refer backup.proto.ListBackupOperationsRequest for detail.
    #[prost(string, tag = "3")]
    pub filter: ::prost::alloc::string::String,
    /// Number of backups to be returned in the response. If 0 or
    /// less, defaults to the server's maximum allowed page size.
    #[prost(int32, tag = "4")]
    pub page_size: i32,
    /// If non-empty, "page_token" should contain a next_page_token
    /// from a previous ListBackupOperationsResponse to the same "parent"
    /// and with the same "filter".
    #[prost(string, tag = "5")]
    pub page_token: ::prost::alloc::string::String,
}
/// Action that gets an operation.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetOperationAction {
    /// The name of the operation resource.
    #[prost(string, tag = "1")]
    pub operation: ::prost::alloc::string::String,
}
/// Query cancellation action defines the long running query and the cancel query
/// format depening on the Cloud database dialect.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryCancellationAction {
    /// Long running query.
    #[prost(string, tag = "1")]
    pub long_running_sql: ::prost::alloc::string::String,
    /// Format of the cancel query for the cloud database dialect.
    #[prost(string, tag = "2")]
    pub cancel_query: ::prost::alloc::string::String,
}
/// Action that cancels an operation.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelOperationAction {
    /// The name of the operation resource to be cancelled.
    #[prost(string, tag = "1")]
    pub operation: ::prost::alloc::string::String,
}
/// Starts a batch read-only transaction in executor. Successful outcomes of this
/// action will contain batch_txn_id--the identificator that can be used to start
/// the same transaction in other Executors to parallelize partition processing.
///
/// Example of a batch read flow:
/// 1. Start batch transaction with a timestamp (StartBatchTransactionAction)
/// 2. Generate database partitions for a read or query
/// (GenerateDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction)
/// 3. Call ExecutePartitionAction for some or all partitions, process rows
/// 4. Clean up the transaction (CloseBatchTransactionAction).
///
/// More sophisticated example, with parallel processing:
/// 1. Start batch transaction with a timestamp (StartBatchTransactionAction),
/// note the returned BatchTransactionId
/// 2. Generate database partitions for a read or query
/// (GenerateDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction)
/// 3. Distribute the partitions over a pool of workers, along with the
/// transaction ID.
///
/// In each worker:
/// 4-1. StartBatchTransactionAction with the given transaction ID
/// 4-2. ExecutePartitionAction for each partition it got, process read results
/// 4-3. Close (not cleanup) the transaction (CloseBatchTransactionAction).
///
/// When all workers are done:
/// 5. Cleanup the transaction (CloseBatchTransactionAction). This can be done
/// either by the last worker to finish the job, or by the main Executor that
/// initialized this transaction in the first place. It is also possible to clean
/// it up with a brand new Executor -- just execute StartBatchTransactionAction
/// with the ID, then clean it up right away.
///
/// Cleaning up is optional, but recommended.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartBatchTransactionAction {
    /// Database role to assume while performing this action. Setting the
    /// database_role will enforce additional role-based access checks on this
    /// action.
    #[prost(string, tag = "3")]
    pub cloud_database_role: ::prost::alloc::string::String,
    /// To start a new transaction, specify an exact timestamp. Alternatively, an
    /// existing batch transaction ID can be used. Either one of two must be
    /// set.
    #[prost(oneof = "start_batch_transaction_action::Param", tags = "1, 2")]
    pub param: ::core::option::Option<start_batch_transaction_action::Param>,
}
/// Nested message and enum types in `StartBatchTransactionAction`.
pub mod start_batch_transaction_action {
    /// To start a new transaction, specify an exact timestamp. Alternatively, an
    /// existing batch transaction ID can be used. Either one of two must be
    /// set.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Param {
        /// The exact timestamp to start the batch transaction.
        #[prost(message, tag = "1")]
        BatchTxnTime(::prost_types::Timestamp),
        /// ID of a batch read-only transaction. It can be used to start the same
        /// batch transaction on multiple executors and parallelize partition
        /// processing.
        #[prost(bytes, tag = "2")]
        Tid(::prost::bytes::Bytes),
    }
}
/// Closes or cleans up the currently opened batch read-only transaction.
///
/// Once a transaction is closed, the Executor can be disposed of or used to
/// start start another transaction. Closing a batch transaction in one Executor
/// doesn't affect the transaction's state in other Executors that also read from
/// it.
///
/// When a transaction is cleaned up, it becomes globally invalid. Cleaning up is
/// optional, but recommended.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloseBatchTransactionAction {
    /// Indicates whether the transaction needs to be cleaned up.
    #[prost(bool, tag = "1")]
    pub cleanup: bool,
}
/// Generate database partitions for the given read. Successful outcomes will
/// contain database partitions in the db_partition field.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateDbPartitionsForReadAction {
    /// Read to generate partitions for.
    #[prost(message, optional, tag = "1")]
    pub read: ::core::option::Option<ReadAction>,
    /// Metadata related to the tables involved in the read.
    #[prost(message, repeated, tag = "2")]
    pub table: ::prost::alloc::vec::Vec<TableMetadata>,
    /// Desired size of data in each partition. Spanner doesn't guarantee to
    /// respect this value.
    #[prost(int64, optional, tag = "3")]
    pub desired_bytes_per_partition: ::core::option::Option<i64>,
    /// If set, the desired max number of partitions. Spanner doesn't guarantee to
    /// respect this value.
    #[prost(int64, optional, tag = "4")]
    pub max_partition_count: ::core::option::Option<i64>,
}
/// Generate database partitions for the given query. Successful outcomes will
/// contain database partitions in the db_partition field.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateDbPartitionsForQueryAction {
    /// Query to generate partitions for.
    #[prost(message, optional, tag = "1")]
    pub query: ::core::option::Option<QueryAction>,
    /// Desired size of data in each partition. Spanner doesn't guarantee to
    /// respect this value.
    #[prost(int64, optional, tag = "2")]
    pub desired_bytes_per_partition: ::core::option::Option<i64>,
}
/// Identifies a database partition generated for a particular read or query. To
/// read rows from the partition, use ExecutePartitionAction.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchPartition {
    /// Serialized Partition instance.
    #[prost(bytes = "bytes", tag = "1")]
    pub partition: ::prost::bytes::Bytes,
    /// The partition token decrypted from partition.
    #[prost(bytes = "bytes", tag = "2")]
    pub partition_token: ::prost::bytes::Bytes,
    /// Table name is set iff the partition was generated for a read (as opposed to
    /// a query).
    #[prost(string, optional, tag = "3")]
    pub table: ::core::option::Option<::prost::alloc::string::String>,
    /// Index name if the partition was generated for an index read.
    #[prost(string, optional, tag = "4")]
    pub index: ::core::option::Option<::prost::alloc::string::String>,
}
/// Performs a read or query for the given partitions. This action must be
/// executed in the context of the same transaction that was used to generate
/// given partitions.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutePartitionAction {
    /// Batch partition to execute on.
    #[prost(message, optional, tag = "1")]
    pub partition: ::core::option::Option<BatchPartition>,
}
/// Execute a change stream TVF query.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteChangeStreamQuery {
    /// Name for this change stream.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Specifies that records with commit_timestamp greater than or equal to
    /// start_time should be returned.
    #[prost(message, optional, tag = "2")]
    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Specifies that records with commit_timestamp less than or equal to
    /// end_time should be returned.
    #[prost(message, optional, tag = "3")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Specifies which change stream partition to query, based on the content of
    /// child partitions records.
    #[prost(string, optional, tag = "4")]
    pub partition_token: ::core::option::Option<::prost::alloc::string::String>,
    /// Read options for this change stream query.
    #[prost(string, repeated, tag = "5")]
    pub read_options: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Determines how frequently a heartbeat ChangeRecord will be returned in case
    /// there are no transactions committed in this partition, in milliseconds.
    #[prost(int32, optional, tag = "6")]
    pub heartbeat_milliseconds: ::core::option::Option<i32>,
    /// Deadline for this change stream query, in seconds.
    #[prost(int64, optional, tag = "7")]
    pub deadline_seconds: ::core::option::Option<i64>,
    /// Database role to assume while performing this action. This should only be
    /// set for cloud requests. Setting the database role will enforce additional
    /// role-based access checks on this action.
    #[prost(string, optional, tag = "8")]
    pub cloud_database_role: ::core::option::Option<::prost::alloc::string::String>,
}
/// SpannerActionOutcome defines a result of execution of a single SpannerAction.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpannerActionOutcome {
    /// If an outcome is split into multiple parts, status will be set only in the
    /// last part.
    #[prost(message, optional, tag = "1")]
    pub status: ::core::option::Option<super::super::super::rpc::Status>,
    /// Transaction timestamp. It must be set for successful committed actions.
    #[prost(message, optional, tag = "2")]
    pub commit_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Result of a ReadAction. This field must be set for ReadActions even if
    /// no rows were read.
    #[prost(message, optional, tag = "3")]
    pub read_result: ::core::option::Option<ReadResult>,
    /// Result of a Query. This field must be set for Queries even if no rows were
    /// read.
    #[prost(message, optional, tag = "4")]
    pub query_result: ::core::option::Option<QueryResult>,
    /// This bit indicates that Spanner has restarted the current transaction. It
    /// means that the client should replay all the reads and writes.
    /// Setting it to true is only valid in the context of a read-write
    /// transaction, as an outcome of a committing FinishTransactionAction.
    #[prost(bool, optional, tag = "5")]
    pub transaction_restarted: ::core::option::Option<bool>,
    /// In successful StartBatchTransactionAction outcomes, this contains the ID of
    /// the transaction.
    #[prost(bytes = "bytes", optional, tag = "6")]
    pub batch_txn_id: ::core::option::Option<::prost::bytes::Bytes>,
    /// Generated database partitions (result of a
    /// GenetageDbPartitionsForReadAction/GenerateDbPartitionsForQueryAction).
    #[prost(message, repeated, tag = "7")]
    pub db_partition: ::prost::alloc::vec::Vec<BatchPartition>,
    /// Result of admin related actions.
    #[prost(message, optional, tag = "8")]
    pub admin_result: ::core::option::Option<AdminResult>,
    /// Stores rows modified by query in single DML or batch DML action.
    /// In case of batch DML action, stores 0 as row count of errored DML query.
    #[prost(int64, repeated, tag = "9")]
    pub dml_rows_modified: ::prost::alloc::vec::Vec<i64>,
    /// Change stream records returned by a change stream query.
    #[prost(message, repeated, tag = "10")]
    pub change_stream_records: ::prost::alloc::vec::Vec<ChangeStreamRecord>,
}
/// AdminResult contains admin action results, for database/backup/operation.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdminResult {
    /// Results of cloud backup related actions.
    #[prost(message, optional, tag = "1")]
    pub backup_response: ::core::option::Option<CloudBackupResponse>,
    /// Results of operation related actions.
    #[prost(message, optional, tag = "2")]
    pub operation_response: ::core::option::Option<OperationResponse>,
    /// Results of database related actions.
    #[prost(message, optional, tag = "3")]
    pub database_response: ::core::option::Option<CloudDatabaseResponse>,
    /// Results of instance related actions.
    #[prost(message, optional, tag = "4")]
    pub instance_response: ::core::option::Option<CloudInstanceResponse>,
    /// Results of instance config related actions.
    #[prost(message, optional, tag = "5")]
    pub instance_config_response: ::core::option::Option<CloudInstanceConfigResponse>,
}
/// CloudBackupResponse contains results returned by cloud backup related
/// actions.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloudBackupResponse {
    /// List of backups returned by ListCloudBackupsAction.
    #[prost(message, repeated, tag = "1")]
    pub listed_backups: ::prost::alloc::vec::Vec<
        super::super::admin::database::v1::Backup,
    >,
    /// List of operations returned by ListCloudBackupOperationsAction.
    #[prost(message, repeated, tag = "2")]
    pub listed_backup_operations: ::prost::alloc::vec::Vec<
        super::super::super::longrunning::Operation,
    >,
    /// "next_page_token" can be sent in a subsequent list action
    /// to fetch more of the matching data.
    #[prost(string, tag = "3")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Backup returned by GetCloudBackupAction/UpdateCloudBackupAction.
    #[prost(message, optional, tag = "4")]
    pub backup: ::core::option::Option<super::super::admin::database::v1::Backup>,
}
/// OperationResponse contains results returned by operation related actions.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationResponse {
    /// List of operations returned by ListOperationsAction.
    #[prost(message, repeated, tag = "1")]
    pub listed_operations: ::prost::alloc::vec::Vec<
        super::super::super::longrunning::Operation,
    >,
    /// "next_page_token" can be sent in a subsequent list action
    /// to fetch more of the matching data.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Operation returned by GetOperationAction.
    #[prost(message, optional, tag = "3")]
    pub operation: ::core::option::Option<super::super::super::longrunning::Operation>,
}
/// CloudInstanceResponse contains results returned by cloud instance related
/// actions.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloudInstanceResponse {
    /// List of instances returned by ListCloudInstancesAction.
    #[prost(message, repeated, tag = "1")]
    pub listed_instances: ::prost::alloc::vec::Vec<
        super::super::admin::instance::v1::Instance,
    >,
    /// "next_page_token" can be sent in a subsequent list action
    /// to fetch more of the matching data.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Instance returned by GetCloudInstanceAction
    #[prost(message, optional, tag = "3")]
    pub instance: ::core::option::Option<super::super::admin::instance::v1::Instance>,
}
/// CloudInstanceConfigResponse contains results returned by cloud instance
/// config related actions.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloudInstanceConfigResponse {
    /// List of instance configs returned by ListCloudInstanceConfigsAction.
    #[prost(message, repeated, tag = "1")]
    pub listed_instance_configs: ::prost::alloc::vec::Vec<
        super::super::admin::instance::v1::InstanceConfig,
    >,
    /// "next_page_token" can be sent in a subsequent list action
    /// to fetch more of the matching data.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Instance config returned by GetCloudInstanceConfigAction.
    #[prost(message, optional, tag = "3")]
    pub instance_config: ::core::option::Option<
        super::super::admin::instance::v1::InstanceConfig,
    >,
}
/// CloudDatabaseResponse contains results returned by cloud database related
/// actions.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloudDatabaseResponse {
    /// List of databases returned by ListCloudDatabasesAction.
    #[prost(message, repeated, tag = "1")]
    pub listed_databases: ::prost::alloc::vec::Vec<
        super::super::admin::database::v1::Database,
    >,
    /// List of operations returned by ListCloudDatabaseOperationsAction.
    #[prost(message, repeated, tag = "2")]
    pub listed_database_operations: ::prost::alloc::vec::Vec<
        super::super::super::longrunning::Operation,
    >,
    /// "next_page_token" can be sent in a subsequent list action
    /// to fetch more of the matching data.
    #[prost(string, tag = "3")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Database returned by GetCloudDatabaseAction
    #[prost(message, optional, tag = "4")]
    pub database: ::core::option::Option<super::super::admin::database::v1::Database>,
}
/// ReadResult contains rows read.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadResult {
    /// Table name.
    #[prost(string, tag = "1")]
    pub table: ::prost::alloc::string::String,
    /// Index name, if read from an index.
    #[prost(string, optional, tag = "2")]
    pub index: ::core::option::Option<::prost::alloc::string::String>,
    /// Request index (multiread only).
    #[prost(int32, optional, tag = "3")]
    pub request_index: ::core::option::Option<i32>,
    /// Rows read. Each row is a struct with multiple fields, one for each column
    /// in read result. All rows have the same type.
    #[prost(message, repeated, tag = "4")]
    pub row: ::prost::alloc::vec::Vec<ValueList>,
    /// The type of rows read. It must be set if at least one row was read.
    #[prost(message, optional, tag = "5")]
    pub row_type: ::core::option::Option<super::super::v1::StructType>,
}
/// QueryResult contains result of a Query.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryResult {
    /// Rows read. Each row is a struct with multiple fields, one for each column
    /// in read result. All rows have the same type.
    #[prost(message, repeated, tag = "1")]
    pub row: ::prost::alloc::vec::Vec<ValueList>,
    /// The type of rows read. It must be set if at least one row was read.
    #[prost(message, optional, tag = "2")]
    pub row_type: ::core::option::Option<super::super::v1::StructType>,
}
/// Raw ChangeStream records.
/// Encodes one of: DataChangeRecord, HeartbeatRecord, ChildPartitionsRecord
/// returned from the ChangeStream API.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChangeStreamRecord {
    /// Record represents one type of the change stream record.
    #[prost(oneof = "change_stream_record::Record", tags = "1, 2, 3")]
    pub record: ::core::option::Option<change_stream_record::Record>,
}
/// Nested message and enum types in `ChangeStreamRecord`.
pub mod change_stream_record {
    /// Record represents one type of the change stream record.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Record {
        /// Data change record.
        #[prost(message, tag = "1")]
        DataChange(super::DataChangeRecord),
        /// Child partitions record.
        #[prost(message, tag = "2")]
        ChildPartition(super::ChildPartitionsRecord),
        /// Heartbeat record.
        #[prost(message, tag = "3")]
        Heartbeat(super::HeartbeatRecord),
    }
}
/// ChangeStream data change record.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataChangeRecord {
    /// The timestamp in which the change was committed.
    #[prost(message, optional, tag = "1")]
    pub commit_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The sequence number for the record within the transaction.
    #[prost(string, tag = "2")]
    pub record_sequence: ::prost::alloc::string::String,
    /// A globally unique string that represents the transaction in which the
    /// change was committed.
    #[prost(string, tag = "3")]
    pub transaction_id: ::prost::alloc::string::String,
    /// Indicates whether this is the last record for a transaction in the current
    /// partition.
    #[prost(bool, tag = "4")]
    pub is_last_record: bool,
    /// Name of the table affected by the change.
    #[prost(string, tag = "5")]
    pub table: ::prost::alloc::string::String,
    /// Column types defined in the schema.
    #[prost(message, repeated, tag = "6")]
    pub column_types: ::prost::alloc::vec::Vec<data_change_record::ColumnType>,
    /// Changes made in the transaction.
    #[prost(message, repeated, tag = "7")]
    pub mods: ::prost::alloc::vec::Vec<data_change_record::Mod>,
    /// Describes the type of change. One of INSERT, UPDATE or DELETE.
    #[prost(string, tag = "8")]
    pub mod_type: ::prost::alloc::string::String,
    /// One of value capture type: NEW_VALUES, OLD_VALUES, OLD_AND_NEW_VALUES.
    #[prost(string, tag = "9")]
    pub value_capture_type: ::prost::alloc::string::String,
    /// Number of records in transactions.
    #[prost(int64, tag = "10")]
    pub record_count: i64,
    /// Number of partitions in transactions.
    #[prost(int64, tag = "11")]
    pub partition_count: i64,
    /// Transaction tag info.
    #[prost(string, tag = "12")]
    pub transaction_tag: ::prost::alloc::string::String,
    /// Whether the transaction is a system transactionn.
    #[prost(bool, tag = "13")]
    pub is_system_transaction: bool,
}
/// Nested message and enum types in `DataChangeRecord`.
pub mod data_change_record {
    /// Column types.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ColumnType {
        /// Column name.
        #[prost(string, tag = "1")]
        pub name: ::prost::alloc::string::String,
        /// Column type in JSON.
        #[prost(string, tag = "2")]
        pub r#type: ::prost::alloc::string::String,
        /// Whether the column is a primary key column.
        #[prost(bool, tag = "3")]
        pub is_primary_key: bool,
        /// The position of the column as defined in the schema.
        #[prost(int64, tag = "4")]
        pub ordinal_position: i64,
    }
    /// Describes the changes that were made.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Mod {
        /// The primary key values in JSON.
        #[prost(string, tag = "1")]
        pub keys: ::prost::alloc::string::String,
        /// The new values of the changed columns in JSON. Only contain the non-key
        /// columns.
        #[prost(string, tag = "2")]
        pub new_values: ::prost::alloc::string::String,
        /// The old values of the changed columns in JSON. Only contain the non-key
        /// columns.
        #[prost(string, tag = "3")]
        pub old_values: ::prost::alloc::string::String,
    }
}
/// ChangeStream child partition record.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChildPartitionsRecord {
    /// Data change records returned from child partitions in this child partitions
    /// record will have a commit timestamp greater than or equal to start_time.
    #[prost(message, optional, tag = "1")]
    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
    /// A monotonically increasing sequence number that can be used to define the
    /// ordering of the child partitions record when there are multiple child
    /// partitions records returned with the same start_time in a particular
    /// partition.
    #[prost(string, tag = "2")]
    pub record_sequence: ::prost::alloc::string::String,
    /// A set of child partitions and their associated information.
    #[prost(message, repeated, tag = "3")]
    pub child_partitions: ::prost::alloc::vec::Vec<
        child_partitions_record::ChildPartition,
    >,
}
/// Nested message and enum types in `ChildPartitionsRecord`.
pub mod child_partitions_record {
    /// A single child partition.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ChildPartition {
        /// Partition token string used to identify the child partition in queries.
        #[prost(string, tag = "1")]
        pub token: ::prost::alloc::string::String,
        /// Parent partition tokens of this child partition.
        #[prost(string, repeated, tag = "2")]
        pub parent_partition_tokens: ::prost::alloc::vec::Vec<
            ::prost::alloc::string::String,
        >,
    }
}
/// ChangeStream heartbeat record.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HeartbeatRecord {
    /// Timestamp for this heartbeat check.
    #[prost(message, optional, tag = "1")]
    pub heartbeat_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Options for Cloud Spanner Service.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SpannerOptions {
    /// Options for configuring the session pool
    #[prost(message, optional, tag = "1")]
    pub session_pool_options: ::core::option::Option<SessionPoolOptions>,
}
/// Options for the session pool used by the DatabaseClient.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionPoolOptions {
    /// passing this as true, will make applicable RPCs use multiplexed sessions
    /// instead of regular sessions
    #[prost(bool, tag = "1")]
    pub use_multiplexed: bool,
}
/// Generated client implementations.
pub mod spanner_executor_proxy_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Service that executes SpannerActions asynchronously.
    #[derive(Debug, Clone)]
    pub struct SpannerExecutorProxyClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> SpannerExecutorProxyClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> SpannerExecutorProxyClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + Send + Sync,
        {
            SpannerExecutorProxyClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// ExecuteActionAsync is a streaming call that starts executing a new Spanner
        /// action.
        ///
        /// For each request, the server will reply with one or more responses, but
        /// only the last response will contain status in the outcome.
        ///
        /// Responses can be matched to requests by action_id. It is allowed to have
        /// multiple actions in flight--in that case, actions are be executed in
        /// parallel.
        pub async fn execute_action_async(
            &mut self,
            request: impl tonic::IntoStreamingRequest<
                Message = super::SpannerAsyncActionRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::SpannerAsyncActionResponse>>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.spanner.executor.v1.SpannerExecutorProxy/ExecuteActionAsync",
            );
            let mut req = request.into_streaming_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.spanner.executor.v1.SpannerExecutorProxy",
                        "ExecuteActionAsync",
                    ),
                );
            self.inner.streaming(req, path, codec).await
        }
    }
}