#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Type {
#[prost(enumeration = "TypeCode", tag = "1")]
pub code: i32,
#[prost(message, optional, boxed, tag = "2")]
pub array_element_type: ::core::option::Option<::prost::alloc::boxed::Box<Type>>,
#[prost(message, optional, tag = "3")]
pub struct_type: ::core::option::Option<StructType>,
#[prost(enumeration = "TypeAnnotationCode", tag = "4")]
pub type_annotation: i32,
#[prost(string, tag = "5")]
pub proto_type_fqn: ::prost::alloc::string::String,
}
impl ::prost::Name for Type {
const NAME: &'static str = "Type";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.Type".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.Type".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StructType {
#[prost(message, repeated, tag = "1")]
pub fields: ::prost::alloc::vec::Vec<struct_type::Field>,
}
pub mod struct_type {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Field {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub r#type: ::core::option::Option<super::Type>,
}
impl ::prost::Name for Field {
const NAME: &'static str = "Field";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.StructType.Field".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.StructType.Field".into()
}
}
}
impl ::prost::Name for StructType {
const NAME: &'static str = "StructType";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.StructType".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.StructType".into()
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TypeCode {
Unspecified = 0,
Bool = 1,
Int64 = 2,
Float64 = 3,
Float32 = 15,
Timestamp = 4,
Date = 5,
String = 6,
Bytes = 7,
Array = 8,
Struct = 9,
Numeric = 10,
Json = 11,
Proto = 13,
Enum = 14,
Interval = 16,
Uuid = 17,
}
impl TypeCode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TYPE_CODE_UNSPECIFIED",
Self::Bool => "BOOL",
Self::Int64 => "INT64",
Self::Float64 => "FLOAT64",
Self::Float32 => "FLOAT32",
Self::Timestamp => "TIMESTAMP",
Self::Date => "DATE",
Self::String => "STRING",
Self::Bytes => "BYTES",
Self::Array => "ARRAY",
Self::Struct => "STRUCT",
Self::Numeric => "NUMERIC",
Self::Json => "JSON",
Self::Proto => "PROTO",
Self::Enum => "ENUM",
Self::Interval => "INTERVAL",
Self::Uuid => "UUID",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_CODE_UNSPECIFIED" => Some(Self::Unspecified),
"BOOL" => Some(Self::Bool),
"INT64" => Some(Self::Int64),
"FLOAT64" => Some(Self::Float64),
"FLOAT32" => Some(Self::Float32),
"TIMESTAMP" => Some(Self::Timestamp),
"DATE" => Some(Self::Date),
"STRING" => Some(Self::String),
"BYTES" => Some(Self::Bytes),
"ARRAY" => Some(Self::Array),
"STRUCT" => Some(Self::Struct),
"NUMERIC" => Some(Self::Numeric),
"JSON" => Some(Self::Json),
"PROTO" => Some(Self::Proto),
"ENUM" => Some(Self::Enum),
"INTERVAL" => Some(Self::Interval),
"UUID" => Some(Self::Uuid),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TypeAnnotationCode {
Unspecified = 0,
PgNumeric = 2,
PgJsonb = 3,
PgOid = 4,
}
impl TypeAnnotationCode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TYPE_ANNOTATION_CODE_UNSPECIFIED",
Self::PgNumeric => "PG_NUMERIC",
Self::PgJsonb => "PG_JSONB",
Self::PgOid => "PG_OID",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_ANNOTATION_CODE_UNSPECIFIED" => Some(Self::Unspecified),
"PG_NUMERIC" => Some(Self::PgNumeric),
"PG_JSONB" => Some(Self::PgJsonb),
"PG_OID" => Some(Self::PgOid),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChangeStreamRecord {
#[prost(oneof = "change_stream_record::Record", tags = "1, 2, 3, 4, 5")]
pub record: ::core::option::Option<change_stream_record::Record>,
}
pub mod change_stream_record {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataChangeRecord {
#[prost(message, optional, tag = "1")]
pub commit_timestamp: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "2")]
pub record_sequence: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub server_transaction_id: ::prost::alloc::string::String,
#[prost(bool, tag = "4")]
pub is_last_record_in_transaction_in_partition: bool,
#[prost(string, tag = "5")]
pub table: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "6")]
pub column_metadata: ::prost::alloc::vec::Vec<
data_change_record::ColumnMetadata,
>,
#[prost(message, repeated, tag = "7")]
pub mods: ::prost::alloc::vec::Vec<data_change_record::Mod>,
#[prost(enumeration = "data_change_record::ModType", tag = "8")]
pub mod_type: i32,
#[prost(enumeration = "data_change_record::ValueCaptureType", tag = "9")]
pub value_capture_type: i32,
#[prost(int32, tag = "10")]
pub number_of_records_in_transaction: i32,
#[prost(int32, tag = "11")]
pub number_of_partitions_in_transaction: i32,
#[prost(string, tag = "12")]
pub transaction_tag: ::prost::alloc::string::String,
#[prost(bool, tag = "13")]
pub is_system_transaction: bool,
}
pub mod data_change_record {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ColumnMetadata {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub r#type: ::core::option::Option<super::super::Type>,
#[prost(bool, tag = "3")]
pub is_primary_key: bool,
#[prost(int64, tag = "4")]
pub ordinal_position: i64,
}
impl ::prost::Name for ColumnMetadata {
const NAME: &'static str = "ColumnMetadata";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModValue {
#[prost(int32, tag = "1")]
pub column_metadata_index: i32,
#[prost(message, optional, tag = "2")]
pub value: ::core::option::Option<::prost_types::Value>,
}
impl ::prost::Name for ModValue {
const NAME: &'static str = "ModValue";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mod {
#[prost(message, repeated, tag = "1")]
pub keys: ::prost::alloc::vec::Vec<ModValue>,
#[prost(message, repeated, tag = "2")]
pub old_values: ::prost::alloc::vec::Vec<ModValue>,
#[prost(message, repeated, tag = "3")]
pub new_values: ::prost::alloc::vec::Vec<ModValue>,
}
impl ::prost::Name for Mod {
const NAME: &'static str = "Mod";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod"
.into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ModType {
Unspecified = 0,
Insert = 10,
Update = 20,
Delete = 30,
}
impl ModType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "MOD_TYPE_UNSPECIFIED",
Self::Insert => "INSERT",
Self::Update => "UPDATE",
Self::Delete => "DELETE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MOD_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"INSERT" => Some(Self::Insert),
"UPDATE" => Some(Self::Update),
"DELETE" => Some(Self::Delete),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ValueCaptureType {
Unspecified = 0,
OldAndNewValues = 10,
NewValues = 20,
NewRow = 30,
NewRowAndOldValues = 40,
}
impl ValueCaptureType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "VALUE_CAPTURE_TYPE_UNSPECIFIED",
Self::OldAndNewValues => "OLD_AND_NEW_VALUES",
Self::NewValues => "NEW_VALUES",
Self::NewRow => "NEW_ROW",
Self::NewRowAndOldValues => "NEW_ROW_AND_OLD_VALUES",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"VALUE_CAPTURE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"OLD_AND_NEW_VALUES" => Some(Self::OldAndNewValues),
"NEW_VALUES" => Some(Self::NewValues),
"NEW_ROW" => Some(Self::NewRow),
"NEW_ROW_AND_OLD_VALUES" => Some(Self::NewRowAndOldValues),
_ => None,
}
}
}
}
impl ::prost::Name for DataChangeRecord {
const NAME: &'static str = "DataChangeRecord";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ChangeStreamRecord.DataChangeRecord".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ChangeStreamRecord.DataChangeRecord"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HeartbeatRecord {
#[prost(message, optional, tag = "1")]
pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
}
impl ::prost::Name for HeartbeatRecord {
const NAME: &'static str = "HeartbeatRecord";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ChangeStreamRecord.HeartbeatRecord".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ChangeStreamRecord.HeartbeatRecord"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PartitionStartRecord {
#[prost(message, optional, tag = "1")]
pub start_timestamp: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "2")]
pub record_sequence: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub partition_tokens: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for PartitionStartRecord {
const NAME: &'static str = "PartitionStartRecord";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ChangeStreamRecord.PartitionStartRecord".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ChangeStreamRecord.PartitionStartRecord"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PartitionEndRecord {
#[prost(message, optional, tag = "1")]
pub end_timestamp: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "2")]
pub record_sequence: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub partition_token: ::prost::alloc::string::String,
}
impl ::prost::Name for PartitionEndRecord {
const NAME: &'static str = "PartitionEndRecord";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ChangeStreamRecord.PartitionEndRecord".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ChangeStreamRecord.PartitionEndRecord"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PartitionEventRecord {
#[prost(message, optional, tag = "1")]
pub commit_timestamp: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "2")]
pub record_sequence: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub partition_token: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub move_in_events: ::prost::alloc::vec::Vec<
partition_event_record::MoveInEvent,
>,
#[prost(message, repeated, tag = "5")]
pub move_out_events: ::prost::alloc::vec::Vec<
partition_event_record::MoveOutEvent,
>,
}
pub mod partition_event_record {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MoveInEvent {
#[prost(string, tag = "1")]
pub source_partition_token: ::prost::alloc::string::String,
}
impl ::prost::Name for MoveInEvent {
const NAME: &'static str = "MoveInEvent";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MoveOutEvent {
#[prost(string, tag = "1")]
pub destination_partition_token: ::prost::alloc::string::String,
}
impl ::prost::Name for MoveOutEvent {
const NAME: &'static str = "MoveOutEvent";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent"
.into()
}
}
}
impl ::prost::Name for PartitionEventRecord {
const NAME: &'static str = "PartitionEventRecord";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ChangeStreamRecord.PartitionEventRecord".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ChangeStreamRecord.PartitionEventRecord"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Record {
#[prost(message, tag = "1")]
DataChangeRecord(DataChangeRecord),
#[prost(message, tag = "2")]
HeartbeatRecord(HeartbeatRecord),
#[prost(message, tag = "3")]
PartitionStartRecord(PartitionStartRecord),
#[prost(message, tag = "4")]
PartitionEndRecord(PartitionEndRecord),
#[prost(message, tag = "5")]
PartitionEventRecord(PartitionEventRecord),
}
}
impl ::prost::Name for ChangeStreamRecord {
const NAME: &'static str = "ChangeStreamRecord";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ChangeStreamRecord".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ChangeStreamRecord".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Range {
#[prost(bytes = "bytes", tag = "1")]
pub start_key: ::prost::bytes::Bytes,
#[prost(bytes = "bytes", tag = "2")]
pub limit_key: ::prost::bytes::Bytes,
#[prost(uint64, tag = "3")]
pub group_uid: u64,
#[prost(uint64, tag = "4")]
pub split_id: u64,
#[prost(bytes = "bytes", tag = "5")]
pub generation: ::prost::bytes::Bytes,
}
impl ::prost::Name for Range {
const NAME: &'static str = "Range";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.Range".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.Range".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Tablet {
#[prost(uint64, tag = "1")]
pub tablet_uid: u64,
#[prost(string, tag = "2")]
pub server_address: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub location: ::prost::alloc::string::String,
#[prost(enumeration = "tablet::Role", tag = "4")]
pub role: i32,
#[prost(bytes = "bytes", tag = "5")]
pub incarnation: ::prost::bytes::Bytes,
#[prost(uint32, tag = "6")]
pub distance: u32,
#[prost(bool, tag = "7")]
pub skip: bool,
}
pub mod tablet {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Role {
Unspecified = 0,
ReadWrite = 1,
ReadOnly = 2,
}
impl Role {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "ROLE_UNSPECIFIED",
Self::ReadWrite => "READ_WRITE",
Self::ReadOnly => "READ_ONLY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ROLE_UNSPECIFIED" => Some(Self::Unspecified),
"READ_WRITE" => Some(Self::ReadWrite),
"READ_ONLY" => Some(Self::ReadOnly),
_ => None,
}
}
}
}
impl ::prost::Name for Tablet {
const NAME: &'static str = "Tablet";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.Tablet".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.Tablet".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Group {
#[prost(uint64, tag = "1")]
pub group_uid: u64,
#[prost(message, repeated, tag = "2")]
pub tablets: ::prost::alloc::vec::Vec<Tablet>,
#[prost(int32, tag = "3")]
pub leader_index: i32,
#[prost(bytes = "bytes", tag = "4")]
pub generation: ::prost::bytes::Bytes,
}
impl ::prost::Name for Group {
const NAME: &'static str = "Group";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.Group".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.Group".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyRecipe {
#[prost(message, repeated, tag = "4")]
pub part: ::prost::alloc::vec::Vec<key_recipe::Part>,
#[prost(oneof = "key_recipe::Target", tags = "1, 2, 3")]
pub target: ::core::option::Option<key_recipe::Target>,
}
pub mod key_recipe {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Part {
#[prost(uint32, tag = "1")]
pub tag: u32,
#[prost(enumeration = "part::Order", tag = "2")]
pub order: i32,
#[prost(enumeration = "part::NullOrder", tag = "3")]
pub null_order: i32,
#[prost(message, optional, tag = "4")]
pub r#type: ::core::option::Option<super::Type>,
#[prost(int32, repeated, tag = "7")]
pub struct_identifiers: ::prost::alloc::vec::Vec<i32>,
#[prost(oneof = "part::ValueType", tags = "5, 6, 8")]
pub value_type: ::core::option::Option<part::ValueType>,
}
pub mod part {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Order {
Unspecified = 0,
Ascending = 1,
Descending = 2,
}
impl Order {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "ORDER_UNSPECIFIED",
Self::Ascending => "ASCENDING",
Self::Descending => "DESCENDING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ORDER_UNSPECIFIED" => Some(Self::Unspecified),
"ASCENDING" => Some(Self::Ascending),
"DESCENDING" => Some(Self::Descending),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum NullOrder {
Unspecified = 0,
NullsFirst = 1,
NullsLast = 2,
NotNull = 3,
}
impl NullOrder {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "NULL_ORDER_UNSPECIFIED",
Self::NullsFirst => "NULLS_FIRST",
Self::NullsLast => "NULLS_LAST",
Self::NotNull => "NOT_NULL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NULL_ORDER_UNSPECIFIED" => Some(Self::Unspecified),
"NULLS_FIRST" => Some(Self::NullsFirst),
"NULLS_LAST" => Some(Self::NullsLast),
"NOT_NULL" => Some(Self::NotNull),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ValueType {
#[prost(string, tag = "5")]
Identifier(::prost::alloc::string::String),
#[prost(message, tag = "6")]
Value(::prost_types::Value),
#[prost(bool, tag = "8")]
Random(bool),
}
}
impl ::prost::Name for Part {
const NAME: &'static str = "Part";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.KeyRecipe.Part".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.KeyRecipe.Part".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Target {
#[prost(string, tag = "1")]
TableName(::prost::alloc::string::String),
#[prost(string, tag = "2")]
IndexName(::prost::alloc::string::String),
#[prost(uint64, tag = "3")]
OperationUid(u64),
}
}
impl ::prost::Name for KeyRecipe {
const NAME: &'static str = "KeyRecipe";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.KeyRecipe".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.KeyRecipe".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecipeList {
#[prost(bytes = "bytes", tag = "1")]
pub schema_generation: ::prost::bytes::Bytes,
#[prost(message, repeated, tag = "3")]
pub recipe: ::prost::alloc::vec::Vec<KeyRecipe>,
}
impl ::prost::Name for RecipeList {
const NAME: &'static str = "RecipeList";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.RecipeList".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.RecipeList".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CacheUpdate {
#[prost(uint64, tag = "1")]
pub database_id: u64,
#[prost(message, repeated, tag = "2")]
pub range: ::prost::alloc::vec::Vec<Range>,
#[prost(message, repeated, tag = "3")]
pub group: ::prost::alloc::vec::Vec<Group>,
#[prost(message, optional, tag = "5")]
pub key_recipes: ::core::option::Option<RecipeList>,
}
impl ::prost::Name for CacheUpdate {
const NAME: &'static str = "CacheUpdate";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.CacheUpdate".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.CacheUpdate".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RoutingHint {
#[prost(uint64, tag = "1")]
pub operation_uid: u64,
#[prost(uint64, tag = "2")]
pub database_id: u64,
#[prost(bytes = "bytes", tag = "3")]
pub schema_generation: ::prost::bytes::Bytes,
#[prost(bytes = "bytes", tag = "4")]
pub key: ::prost::bytes::Bytes,
#[prost(bytes = "bytes", tag = "5")]
pub limit_key: ::prost::bytes::Bytes,
#[prost(uint64, tag = "6")]
pub group_uid: u64,
#[prost(uint64, tag = "7")]
pub split_id: u64,
#[prost(uint64, tag = "8")]
pub tablet_uid: u64,
#[prost(message, repeated, tag = "9")]
pub skipped_tablet_uid: ::prost::alloc::vec::Vec<routing_hint::SkippedTablet>,
#[prost(string, tag = "10")]
pub client_location: ::prost::alloc::string::String,
}
pub mod routing_hint {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SkippedTablet {
#[prost(uint64, tag = "1")]
pub tablet_uid: u64,
#[prost(bytes = "bytes", tag = "2")]
pub incarnation: ::prost::bytes::Bytes,
}
impl ::prost::Name for SkippedTablet {
const NAME: &'static str = "SkippedTablet";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.RoutingHint.SkippedTablet".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.RoutingHint.SkippedTablet".into()
}
}
}
impl ::prost::Name for RoutingHint {
const NAME: &'static str = "RoutingHint";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.RoutingHint".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.RoutingHint".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TransactionOptions {
#[prost(bool, tag = "5")]
pub exclude_txn_from_change_streams: bool,
#[prost(enumeration = "transaction_options::IsolationLevel", tag = "6")]
pub isolation_level: i32,
#[prost(oneof = "transaction_options::Mode", tags = "1, 3, 2")]
pub mode: ::core::option::Option<transaction_options::Mode>,
}
pub mod transaction_options {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReadWrite {
#[prost(enumeration = "read_write::ReadLockMode", tag = "1")]
pub read_lock_mode: i32,
#[prost(bytes = "bytes", tag = "2")]
pub multiplexed_session_previous_transaction_id: ::prost::bytes::Bytes,
}
pub mod read_write {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ReadLockMode {
Unspecified = 0,
Pessimistic = 1,
Optimistic = 2,
}
impl ReadLockMode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "READ_LOCK_MODE_UNSPECIFIED",
Self::Pessimistic => "PESSIMISTIC",
Self::Optimistic => "OPTIMISTIC",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"READ_LOCK_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"PESSIMISTIC" => Some(Self::Pessimistic),
"OPTIMISTIC" => Some(Self::Optimistic),
_ => None,
}
}
}
}
impl ::prost::Name for ReadWrite {
const NAME: &'static str = "ReadWrite";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.TransactionOptions.ReadWrite".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.TransactionOptions.ReadWrite".into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PartitionedDml {}
impl ::prost::Name for PartitionedDml {
const NAME: &'static str = "PartitionedDml";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.TransactionOptions.PartitionedDml".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.TransactionOptions.PartitionedDml"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReadOnly {
#[prost(bool, tag = "6")]
pub return_read_timestamp: bool,
#[prost(oneof = "read_only::TimestampBound", tags = "1, 2, 3, 4, 5")]
pub timestamp_bound: ::core::option::Option<read_only::TimestampBound>,
}
pub mod read_only {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum TimestampBound {
#[prost(bool, tag = "1")]
Strong(bool),
#[prost(message, tag = "2")]
MinReadTimestamp(::prost_types::Timestamp),
#[prost(message, tag = "3")]
MaxStaleness(::prost_types::Duration),
#[prost(message, tag = "4")]
ReadTimestamp(::prost_types::Timestamp),
#[prost(message, tag = "5")]
ExactStaleness(::prost_types::Duration),
}
}
impl ::prost::Name for ReadOnly {
const NAME: &'static str = "ReadOnly";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.TransactionOptions.ReadOnly".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.TransactionOptions.ReadOnly".into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum IsolationLevel {
Unspecified = 0,
Serializable = 1,
RepeatableRead = 2,
}
impl IsolationLevel {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "ISOLATION_LEVEL_UNSPECIFIED",
Self::Serializable => "SERIALIZABLE",
Self::RepeatableRead => "REPEATABLE_READ",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ISOLATION_LEVEL_UNSPECIFIED" => Some(Self::Unspecified),
"SERIALIZABLE" => Some(Self::Serializable),
"REPEATABLE_READ" => Some(Self::RepeatableRead),
_ => None,
}
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Mode {
#[prost(message, tag = "1")]
ReadWrite(ReadWrite),
#[prost(message, tag = "3")]
PartitionedDml(PartitionedDml),
#[prost(message, tag = "2")]
ReadOnly(ReadOnly),
}
}
impl ::prost::Name for TransactionOptions {
const NAME: &'static str = "TransactionOptions";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.TransactionOptions".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.TransactionOptions".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Transaction {
#[prost(bytes = "bytes", tag = "1")]
pub id: ::prost::bytes::Bytes,
#[prost(message, optional, tag = "2")]
pub read_timestamp: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub precommit_token: ::core::option::Option<MultiplexedSessionPrecommitToken>,
#[prost(message, optional, tag = "5")]
pub cache_update: ::core::option::Option<CacheUpdate>,
}
impl ::prost::Name for Transaction {
const NAME: &'static str = "Transaction";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.Transaction".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.Transaction".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TransactionSelector {
#[prost(oneof = "transaction_selector::Selector", tags = "1, 2, 3")]
pub selector: ::core::option::Option<transaction_selector::Selector>,
}
pub mod transaction_selector {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Selector {
#[prost(message, tag = "1")]
SingleUse(super::TransactionOptions),
#[prost(bytes, tag = "2")]
Id(::prost::bytes::Bytes),
#[prost(message, tag = "3")]
Begin(super::TransactionOptions),
}
}
impl ::prost::Name for TransactionSelector {
const NAME: &'static str = "TransactionSelector";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.TransactionSelector".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.TransactionSelector".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MultiplexedSessionPrecommitToken {
#[prost(bytes = "bytes", tag = "1")]
pub precommit_token: ::prost::bytes::Bytes,
#[prost(int32, tag = "2")]
pub seq_num: i32,
}
impl ::prost::Name for MultiplexedSessionPrecommitToken {
const NAME: &'static str = "MultiplexedSessionPrecommitToken";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.MultiplexedSessionPrecommitToken".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.MultiplexedSessionPrecommitToken".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommitResponse {
#[prost(message, optional, tag = "1")]
pub commit_timestamp: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub commit_stats: ::core::option::Option<commit_response::CommitStats>,
#[prost(message, optional, tag = "5")]
pub snapshot_timestamp: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "6")]
pub cache_update: ::core::option::Option<CacheUpdate>,
#[prost(enumeration = "transaction_options::IsolationLevel", tag = "7")]
pub isolation_level: i32,
#[prost(enumeration = "transaction_options::read_write::ReadLockMode", tag = "8")]
pub read_lock_mode: i32,
#[prost(oneof = "commit_response::MultiplexedSessionRetry", tags = "4")]
pub multiplexed_session_retry: ::core::option::Option<
commit_response::MultiplexedSessionRetry,
>,
}
pub mod commit_response {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CommitStats {
#[prost(int64, tag = "1")]
pub mutation_count: i64,
}
impl ::prost::Name for CommitStats {
const NAME: &'static str = "CommitStats";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.CommitResponse.CommitStats".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.CommitResponse.CommitStats".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum MultiplexedSessionRetry {
#[prost(message, tag = "4")]
PrecommitToken(super::MultiplexedSessionPrecommitToken),
}
}
impl ::prost::Name for CommitResponse {
const NAME: &'static str = "CommitResponse";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.CommitResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.CommitResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyRange {
#[prost(oneof = "key_range::StartKeyType", tags = "1, 2")]
pub start_key_type: ::core::option::Option<key_range::StartKeyType>,
#[prost(oneof = "key_range::EndKeyType", tags = "3, 4")]
pub end_key_type: ::core::option::Option<key_range::EndKeyType>,
}
pub mod key_range {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum StartKeyType {
#[prost(message, tag = "1")]
StartClosed(::prost_types::ListValue),
#[prost(message, tag = "2")]
StartOpen(::prost_types::ListValue),
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum EndKeyType {
#[prost(message, tag = "3")]
EndClosed(::prost_types::ListValue),
#[prost(message, tag = "4")]
EndOpen(::prost_types::ListValue),
}
}
impl ::prost::Name for KeyRange {
const NAME: &'static str = "KeyRange";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.KeyRange".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.KeyRange".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeySet {
#[prost(message, repeated, tag = "1")]
pub keys: ::prost::alloc::vec::Vec<::prost_types::ListValue>,
#[prost(message, repeated, tag = "2")]
pub ranges: ::prost::alloc::vec::Vec<KeyRange>,
#[prost(bool, tag = "3")]
pub all: bool,
}
impl ::prost::Name for KeySet {
const NAME: &'static str = "KeySet";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.KeySet".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.KeySet".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mutation {
#[prost(oneof = "mutation::Operation", tags = "1, 2, 3, 4, 5, 6, 7")]
pub operation: ::core::option::Option<mutation::Operation>,
}
pub mod mutation {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Write {
#[prost(string, tag = "1")]
pub table: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "3")]
pub values: ::prost::alloc::vec::Vec<::prost_types::ListValue>,
}
impl ::prost::Name for Write {
const NAME: &'static str = "Write";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.Mutation.Write".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.Mutation.Write".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Delete {
#[prost(string, tag = "1")]
pub table: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub key_set: ::core::option::Option<super::KeySet>,
}
impl ::prost::Name for Delete {
const NAME: &'static str = "Delete";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.Mutation.Delete".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.Mutation.Delete".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Send {
#[prost(string, tag = "1")]
pub queue: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub key: ::core::option::Option<::prost_types::ListValue>,
#[prost(message, optional, tag = "3")]
pub deliver_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "4")]
pub payload: ::core::option::Option<::prost_types::Value>,
}
impl ::prost::Name for Send {
const NAME: &'static str = "Send";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.Mutation.Send".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.Mutation.Send".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Ack {
#[prost(string, tag = "1")]
pub queue: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub key: ::core::option::Option<::prost_types::ListValue>,
#[prost(bool, tag = "3")]
pub ignore_not_found: bool,
}
impl ::prost::Name for Ack {
const NAME: &'static str = "Ack";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.Mutation.Ack".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.Mutation.Ack".into()
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "1")]
Insert(Write),
#[prost(message, tag = "2")]
Update(Write),
#[prost(message, tag = "3")]
InsertOrUpdate(Write),
#[prost(message, tag = "4")]
Replace(Write),
#[prost(message, tag = "5")]
Delete(Delete),
#[prost(message, tag = "6")]
Send(Send),
#[prost(message, tag = "7")]
Ack(Ack),
}
}
impl ::prost::Name for Mutation {
const NAME: &'static str = "Mutation";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.Mutation".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.Mutation".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlanNode {
#[prost(int32, tag = "1")]
pub index: i32,
#[prost(enumeration = "plan_node::Kind", tag = "2")]
pub kind: i32,
#[prost(string, tag = "3")]
pub display_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub child_links: ::prost::alloc::vec::Vec<plan_node::ChildLink>,
#[prost(message, optional, tag = "5")]
pub short_representation: ::core::option::Option<plan_node::ShortRepresentation>,
#[prost(message, optional, tag = "6")]
pub metadata: ::core::option::Option<::prost_types::Struct>,
#[prost(message, optional, tag = "7")]
pub execution_stats: ::core::option::Option<::prost_types::Struct>,
}
pub mod plan_node {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ChildLink {
#[prost(int32, tag = "1")]
pub child_index: i32,
#[prost(string, tag = "2")]
pub r#type: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub variable: ::prost::alloc::string::String,
}
impl ::prost::Name for ChildLink {
const NAME: &'static str = "ChildLink";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.PlanNode.ChildLink".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.PlanNode.ChildLink".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShortRepresentation {
#[prost(string, tag = "1")]
pub description: ::prost::alloc::string::String,
#[prost(map = "string, int32", tag = "2")]
pub subqueries: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
}
impl ::prost::Name for ShortRepresentation {
const NAME: &'static str = "ShortRepresentation";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.PlanNode.ShortRepresentation".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.PlanNode.ShortRepresentation".into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Kind {
Unspecified = 0,
Relational = 1,
Scalar = 2,
}
impl Kind {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "KIND_UNSPECIFIED",
Self::Relational => "RELATIONAL",
Self::Scalar => "SCALAR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"KIND_UNSPECIFIED" => Some(Self::Unspecified),
"RELATIONAL" => Some(Self::Relational),
"SCALAR" => Some(Self::Scalar),
_ => None,
}
}
}
}
impl ::prost::Name for PlanNode {
const NAME: &'static str = "PlanNode";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.PlanNode".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.PlanNode".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryAdvisorResult {
#[prost(message, repeated, tag = "1")]
pub index_advice: ::prost::alloc::vec::Vec<query_advisor_result::IndexAdvice>,
}
pub mod query_advisor_result {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IndexAdvice {
#[prost(string, repeated, tag = "1")]
pub ddl: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(double, tag = "2")]
pub improvement_factor: f64,
}
impl ::prost::Name for IndexAdvice {
const NAME: &'static str = "IndexAdvice";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.QueryAdvisorResult.IndexAdvice".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.QueryAdvisorResult.IndexAdvice".into()
}
}
}
impl ::prost::Name for QueryAdvisorResult {
const NAME: &'static str = "QueryAdvisorResult";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.QueryAdvisorResult".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.QueryAdvisorResult".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryPlan {
#[prost(message, repeated, tag = "1")]
pub plan_nodes: ::prost::alloc::vec::Vec<PlanNode>,
#[prost(message, optional, tag = "2")]
pub query_advice: ::core::option::Option<QueryAdvisorResult>,
}
impl ::prost::Name for QueryPlan {
const NAME: &'static str = "QueryPlan";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.QueryPlan".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.QueryPlan".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResultSet {
#[prost(message, optional, tag = "1")]
pub metadata: ::core::option::Option<ResultSetMetadata>,
#[prost(message, repeated, tag = "2")]
pub rows: ::prost::alloc::vec::Vec<::prost_types::ListValue>,
#[prost(message, optional, tag = "3")]
pub stats: ::core::option::Option<ResultSetStats>,
#[prost(message, optional, tag = "5")]
pub precommit_token: ::core::option::Option<MultiplexedSessionPrecommitToken>,
#[prost(message, optional, tag = "6")]
pub cache_update: ::core::option::Option<CacheUpdate>,
}
impl ::prost::Name for ResultSet {
const NAME: &'static str = "ResultSet";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ResultSet".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ResultSet".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PartialResultSet {
#[prost(message, optional, tag = "1")]
pub metadata: ::core::option::Option<ResultSetMetadata>,
#[prost(message, repeated, tag = "2")]
pub values: ::prost::alloc::vec::Vec<::prost_types::Value>,
#[prost(bool, tag = "3")]
pub chunked_value: bool,
#[prost(bytes = "bytes", tag = "4")]
pub resume_token: ::prost::bytes::Bytes,
#[prost(message, optional, tag = "5")]
pub stats: ::core::option::Option<ResultSetStats>,
#[prost(message, optional, tag = "8")]
pub precommit_token: ::core::option::Option<MultiplexedSessionPrecommitToken>,
#[prost(bool, tag = "9")]
pub last: bool,
#[prost(message, optional, tag = "10")]
pub cache_update: ::core::option::Option<CacheUpdate>,
}
impl ::prost::Name for PartialResultSet {
const NAME: &'static str = "PartialResultSet";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.PartialResultSet".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.PartialResultSet".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResultSetMetadata {
#[prost(message, optional, tag = "1")]
pub row_type: ::core::option::Option<StructType>,
#[prost(message, optional, tag = "2")]
pub transaction: ::core::option::Option<Transaction>,
#[prost(message, optional, tag = "3")]
pub undeclared_parameters: ::core::option::Option<StructType>,
}
impl ::prost::Name for ResultSetMetadata {
const NAME: &'static str = "ResultSetMetadata";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ResultSetMetadata".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ResultSetMetadata".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResultSetStats {
#[prost(message, optional, tag = "1")]
pub query_plan: ::core::option::Option<QueryPlan>,
#[prost(message, optional, tag = "2")]
pub query_stats: ::core::option::Option<::prost_types::Struct>,
#[prost(oneof = "result_set_stats::RowCount", tags = "3, 4")]
pub row_count: ::core::option::Option<result_set_stats::RowCount>,
}
pub mod result_set_stats {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum RowCount {
#[prost(int64, tag = "3")]
RowCountExact(i64),
#[prost(int64, tag = "4")]
RowCountLowerBound(i64),
}
}
impl ::prost::Name for ResultSetStats {
const NAME: &'static str = "ResultSetStats";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ResultSetStats".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ResultSetStats".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSessionRequest {
#[prost(string, tag = "1")]
pub database: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub session: ::core::option::Option<Session>,
}
impl ::prost::Name for CreateSessionRequest {
const NAME: &'static str = "CreateSessionRequest";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.CreateSessionRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.CreateSessionRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCreateSessionsRequest {
#[prost(string, tag = "1")]
pub database: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub session_template: ::core::option::Option<Session>,
#[prost(int32, tag = "3")]
pub session_count: i32,
}
impl ::prost::Name for BatchCreateSessionsRequest {
const NAME: &'static str = "BatchCreateSessionsRequest";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.BatchCreateSessionsRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.BatchCreateSessionsRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCreateSessionsResponse {
#[prost(message, repeated, tag = "1")]
pub session: ::prost::alloc::vec::Vec<Session>,
}
impl ::prost::Name for BatchCreateSessionsResponse {
const NAME: &'static str = "BatchCreateSessionsResponse";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.BatchCreateSessionsResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.BatchCreateSessionsResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Session {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "2")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "3")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "4")]
pub approximate_last_use_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "5")]
pub creator_role: ::prost::alloc::string::String,
#[prost(bool, tag = "6")]
pub multiplexed: bool,
}
impl ::prost::Name for Session {
const NAME: &'static str = "Session";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.Session".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.Session".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetSessionRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
impl ::prost::Name for GetSessionRequest {
const NAME: &'static str = "GetSessionRequest";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.GetSessionRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.GetSessionRequest".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListSessionsRequest {
#[prost(string, tag = "1")]
pub database: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
}
impl ::prost::Name for ListSessionsRequest {
const NAME: &'static str = "ListSessionsRequest";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ListSessionsRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ListSessionsRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSessionsResponse {
#[prost(message, repeated, tag = "1")]
pub sessions: ::prost::alloc::vec::Vec<Session>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
impl ::prost::Name for ListSessionsResponse {
const NAME: &'static str = "ListSessionsResponse";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ListSessionsResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ListSessionsResponse".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteSessionRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
impl ::prost::Name for DeleteSessionRequest {
const NAME: &'static str = "DeleteSessionRequest";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.DeleteSessionRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.DeleteSessionRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestOptions {
#[prost(enumeration = "request_options::Priority", tag = "1")]
pub priority: i32,
#[prost(string, tag = "2")]
pub request_tag: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub transaction_tag: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub client_context: ::core::option::Option<request_options::ClientContext>,
}
pub mod request_options {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClientContext {
#[prost(map = "string, message", tag = "1")]
pub secure_context: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost_types::Value,
>,
}
impl ::prost::Name for ClientContext {
const NAME: &'static str = "ClientContext";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.RequestOptions.ClientContext".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.RequestOptions.ClientContext".into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Priority {
Unspecified = 0,
Low = 1,
Medium = 2,
High = 3,
}
impl Priority {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "PRIORITY_UNSPECIFIED",
Self::Low => "PRIORITY_LOW",
Self::Medium => "PRIORITY_MEDIUM",
Self::High => "PRIORITY_HIGH",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PRIORITY_UNSPECIFIED" => Some(Self::Unspecified),
"PRIORITY_LOW" => Some(Self::Low),
"PRIORITY_MEDIUM" => Some(Self::Medium),
"PRIORITY_HIGH" => Some(Self::High),
_ => None,
}
}
}
}
impl ::prost::Name for RequestOptions {
const NAME: &'static str = "RequestOptions";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.RequestOptions".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.RequestOptions".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DirectedReadOptions {
#[prost(oneof = "directed_read_options::Replicas", tags = "1, 2")]
pub replicas: ::core::option::Option<directed_read_options::Replicas>,
}
pub mod directed_read_options {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReplicaSelection {
#[prost(string, tag = "1")]
pub location: ::prost::alloc::string::String,
#[prost(enumeration = "replica_selection::Type", tag = "2")]
pub r#type: i32,
}
pub mod replica_selection {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
ReadWrite = 1,
ReadOnly = 2,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TYPE_UNSPECIFIED",
Self::ReadWrite => "READ_WRITE",
Self::ReadOnly => "READ_ONLY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"READ_WRITE" => Some(Self::ReadWrite),
"READ_ONLY" => Some(Self::ReadOnly),
_ => None,
}
}
}
}
impl ::prost::Name for ReplicaSelection {
const NAME: &'static str = "ReplicaSelection";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.DirectedReadOptions.ReplicaSelection".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.DirectedReadOptions.ReplicaSelection"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IncludeReplicas {
#[prost(message, repeated, tag = "1")]
pub replica_selections: ::prost::alloc::vec::Vec<ReplicaSelection>,
#[prost(bool, tag = "2")]
pub auto_failover_disabled: bool,
}
impl ::prost::Name for IncludeReplicas {
const NAME: &'static str = "IncludeReplicas";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.DirectedReadOptions.IncludeReplicas".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.DirectedReadOptions.IncludeReplicas"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExcludeReplicas {
#[prost(message, repeated, tag = "1")]
pub replica_selections: ::prost::alloc::vec::Vec<ReplicaSelection>,
}
impl ::prost::Name for ExcludeReplicas {
const NAME: &'static str = "ExcludeReplicas";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.DirectedReadOptions.ExcludeReplicas".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.DirectedReadOptions.ExcludeReplicas"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Replicas {
#[prost(message, tag = "1")]
IncludeReplicas(IncludeReplicas),
#[prost(message, tag = "2")]
ExcludeReplicas(ExcludeReplicas),
}
}
impl ::prost::Name for DirectedReadOptions {
const NAME: &'static str = "DirectedReadOptions";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.DirectedReadOptions".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.DirectedReadOptions".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteSqlRequest {
#[prost(string, tag = "1")]
pub session: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub transaction: ::core::option::Option<TransactionSelector>,
#[prost(string, tag = "3")]
pub sql: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub params: ::core::option::Option<::prost_types::Struct>,
#[prost(map = "string, message", tag = "5")]
pub param_types: ::std::collections::HashMap<::prost::alloc::string::String, Type>,
#[prost(bytes = "bytes", tag = "6")]
pub resume_token: ::prost::bytes::Bytes,
#[prost(enumeration = "execute_sql_request::QueryMode", tag = "7")]
pub query_mode: i32,
#[prost(bytes = "bytes", tag = "8")]
pub partition_token: ::prost::bytes::Bytes,
#[prost(int64, tag = "9")]
pub seqno: i64,
#[prost(message, optional, tag = "10")]
pub query_options: ::core::option::Option<execute_sql_request::QueryOptions>,
#[prost(message, optional, tag = "11")]
pub request_options: ::core::option::Option<RequestOptions>,
#[prost(message, optional, tag = "15")]
pub directed_read_options: ::core::option::Option<DirectedReadOptions>,
#[prost(bool, tag = "16")]
pub data_boost_enabled: bool,
#[prost(bool, tag = "17")]
pub last_statement: bool,
#[prost(message, optional, tag = "18")]
pub routing_hint: ::core::option::Option<RoutingHint>,
}
pub mod execute_sql_request {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryOptions {
#[prost(string, tag = "1")]
pub optimizer_version: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub optimizer_statistics_package: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryOptions {
const NAME: &'static str = "QueryOptions";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ExecuteSqlRequest.QueryOptions".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ExecuteSqlRequest.QueryOptions".into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum QueryMode {
Normal = 0,
Plan = 1,
Profile = 2,
WithStats = 3,
WithPlanAndStats = 4,
}
impl QueryMode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Normal => "NORMAL",
Self::Plan => "PLAN",
Self::Profile => "PROFILE",
Self::WithStats => "WITH_STATS",
Self::WithPlanAndStats => "WITH_PLAN_AND_STATS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NORMAL" => Some(Self::Normal),
"PLAN" => Some(Self::Plan),
"PROFILE" => Some(Self::Profile),
"WITH_STATS" => Some(Self::WithStats),
"WITH_PLAN_AND_STATS" => Some(Self::WithPlanAndStats),
_ => None,
}
}
}
}
impl ::prost::Name for ExecuteSqlRequest {
const NAME: &'static str = "ExecuteSqlRequest";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ExecuteSqlRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ExecuteSqlRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteBatchDmlRequest {
#[prost(string, tag = "1")]
pub session: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub transaction: ::core::option::Option<TransactionSelector>,
#[prost(message, repeated, tag = "3")]
pub statements: ::prost::alloc::vec::Vec<execute_batch_dml_request::Statement>,
#[prost(int64, tag = "4")]
pub seqno: i64,
#[prost(message, optional, tag = "5")]
pub request_options: ::core::option::Option<RequestOptions>,
#[prost(bool, tag = "6")]
pub last_statements: bool,
}
pub mod execute_batch_dml_request {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Statement {
#[prost(string, tag = "1")]
pub sql: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub params: ::core::option::Option<::prost_types::Struct>,
#[prost(map = "string, message", tag = "3")]
pub param_types: ::std::collections::HashMap<
::prost::alloc::string::String,
super::Type,
>,
}
impl ::prost::Name for Statement {
const NAME: &'static str = "Statement";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ExecuteBatchDmlRequest.Statement".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ExecuteBatchDmlRequest.Statement"
.into()
}
}
}
impl ::prost::Name for ExecuteBatchDmlRequest {
const NAME: &'static str = "ExecuteBatchDmlRequest";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ExecuteBatchDmlRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ExecuteBatchDmlRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteBatchDmlResponse {
#[prost(message, repeated, tag = "1")]
pub result_sets: ::prost::alloc::vec::Vec<ResultSet>,
#[prost(message, optional, tag = "2")]
pub status: ::core::option::Option<super::super::rpc::Status>,
#[prost(message, optional, tag = "3")]
pub precommit_token: ::core::option::Option<MultiplexedSessionPrecommitToken>,
}
impl ::prost::Name for ExecuteBatchDmlResponse {
const NAME: &'static str = "ExecuteBatchDmlResponse";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ExecuteBatchDmlResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ExecuteBatchDmlResponse".into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PartitionOptions {
#[prost(int64, tag = "1")]
pub partition_size_bytes: i64,
#[prost(int64, tag = "2")]
pub max_partitions: i64,
}
impl ::prost::Name for PartitionOptions {
const NAME: &'static str = "PartitionOptions";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.PartitionOptions".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.PartitionOptions".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PartitionQueryRequest {
#[prost(string, tag = "1")]
pub session: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub transaction: ::core::option::Option<TransactionSelector>,
#[prost(string, tag = "3")]
pub sql: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub params: ::core::option::Option<::prost_types::Struct>,
#[prost(map = "string, message", tag = "5")]
pub param_types: ::std::collections::HashMap<::prost::alloc::string::String, Type>,
#[prost(message, optional, tag = "6")]
pub partition_options: ::core::option::Option<PartitionOptions>,
}
impl ::prost::Name for PartitionQueryRequest {
const NAME: &'static str = "PartitionQueryRequest";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.PartitionQueryRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.PartitionQueryRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PartitionReadRequest {
#[prost(string, tag = "1")]
pub session: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub transaction: ::core::option::Option<TransactionSelector>,
#[prost(string, tag = "3")]
pub table: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub index: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "5")]
pub columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "6")]
pub key_set: ::core::option::Option<KeySet>,
#[prost(message, optional, tag = "9")]
pub partition_options: ::core::option::Option<PartitionOptions>,
}
impl ::prost::Name for PartitionReadRequest {
const NAME: &'static str = "PartitionReadRequest";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.PartitionReadRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.PartitionReadRequest".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Partition {
#[prost(bytes = "bytes", tag = "1")]
pub partition_token: ::prost::bytes::Bytes,
}
impl ::prost::Name for Partition {
const NAME: &'static str = "Partition";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.Partition".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.Partition".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PartitionResponse {
#[prost(message, repeated, tag = "1")]
pub partitions: ::prost::alloc::vec::Vec<Partition>,
#[prost(message, optional, tag = "2")]
pub transaction: ::core::option::Option<Transaction>,
}
impl ::prost::Name for PartitionResponse {
const NAME: &'static str = "PartitionResponse";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.PartitionResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.PartitionResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadRequest {
#[prost(string, tag = "1")]
pub session: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub transaction: ::core::option::Option<TransactionSelector>,
#[prost(string, tag = "3")]
pub table: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub index: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "5")]
pub columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "6")]
pub key_set: ::core::option::Option<KeySet>,
#[prost(int64, tag = "8")]
pub limit: i64,
#[prost(bytes = "bytes", tag = "9")]
pub resume_token: ::prost::bytes::Bytes,
#[prost(bytes = "bytes", tag = "10")]
pub partition_token: ::prost::bytes::Bytes,
#[prost(message, optional, tag = "11")]
pub request_options: ::core::option::Option<RequestOptions>,
#[prost(message, optional, tag = "14")]
pub directed_read_options: ::core::option::Option<DirectedReadOptions>,
#[prost(bool, tag = "15")]
pub data_boost_enabled: bool,
#[prost(enumeration = "read_request::OrderBy", tag = "16")]
pub order_by: i32,
#[prost(enumeration = "read_request::LockHint", tag = "17")]
pub lock_hint: i32,
#[prost(message, optional, tag = "18")]
pub routing_hint: ::core::option::Option<RoutingHint>,
}
pub mod read_request {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum OrderBy {
Unspecified = 0,
PrimaryKey = 1,
NoOrder = 2,
}
impl OrderBy {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "ORDER_BY_UNSPECIFIED",
Self::PrimaryKey => "ORDER_BY_PRIMARY_KEY",
Self::NoOrder => "ORDER_BY_NO_ORDER",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ORDER_BY_UNSPECIFIED" => Some(Self::Unspecified),
"ORDER_BY_PRIMARY_KEY" => Some(Self::PrimaryKey),
"ORDER_BY_NO_ORDER" => Some(Self::NoOrder),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum LockHint {
Unspecified = 0,
Shared = 1,
Exclusive = 2,
}
impl LockHint {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "LOCK_HINT_UNSPECIFIED",
Self::Shared => "LOCK_HINT_SHARED",
Self::Exclusive => "LOCK_HINT_EXCLUSIVE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LOCK_HINT_UNSPECIFIED" => Some(Self::Unspecified),
"LOCK_HINT_SHARED" => Some(Self::Shared),
"LOCK_HINT_EXCLUSIVE" => Some(Self::Exclusive),
_ => None,
}
}
}
}
impl ::prost::Name for ReadRequest {
const NAME: &'static str = "ReadRequest";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.ReadRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.ReadRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BeginTransactionRequest {
#[prost(string, tag = "1")]
pub session: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub options: ::core::option::Option<TransactionOptions>,
#[prost(message, optional, tag = "3")]
pub request_options: ::core::option::Option<RequestOptions>,
#[prost(message, optional, tag = "4")]
pub mutation_key: ::core::option::Option<Mutation>,
#[prost(message, optional, tag = "5")]
pub routing_hint: ::core::option::Option<RoutingHint>,
}
impl ::prost::Name for BeginTransactionRequest {
const NAME: &'static str = "BeginTransactionRequest";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.BeginTransactionRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.BeginTransactionRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommitRequest {
#[prost(string, tag = "1")]
pub session: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub mutations: ::prost::alloc::vec::Vec<Mutation>,
#[prost(bool, tag = "5")]
pub return_commit_stats: bool,
#[prost(message, optional, tag = "8")]
pub max_commit_delay: ::core::option::Option<::prost_types::Duration>,
#[prost(message, optional, tag = "6")]
pub request_options: ::core::option::Option<RequestOptions>,
#[prost(message, optional, tag = "9")]
pub precommit_token: ::core::option::Option<MultiplexedSessionPrecommitToken>,
#[prost(message, optional, tag = "10")]
pub routing_hint: ::core::option::Option<RoutingHint>,
#[prost(oneof = "commit_request::Transaction", tags = "2, 3")]
pub transaction: ::core::option::Option<commit_request::Transaction>,
}
pub mod commit_request {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Transaction {
#[prost(bytes, tag = "2")]
TransactionId(::prost::bytes::Bytes),
#[prost(message, tag = "3")]
SingleUseTransaction(super::TransactionOptions),
}
}
impl ::prost::Name for CommitRequest {
const NAME: &'static str = "CommitRequest";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.CommitRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.CommitRequest".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RollbackRequest {
#[prost(string, tag = "1")]
pub session: ::prost::alloc::string::String,
#[prost(bytes = "bytes", tag = "2")]
pub transaction_id: ::prost::bytes::Bytes,
}
impl ::prost::Name for RollbackRequest {
const NAME: &'static str = "RollbackRequest";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.RollbackRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.RollbackRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchWriteRequest {
#[prost(string, tag = "1")]
pub session: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub request_options: ::core::option::Option<RequestOptions>,
#[prost(message, repeated, tag = "4")]
pub mutation_groups: ::prost::alloc::vec::Vec<batch_write_request::MutationGroup>,
#[prost(bool, tag = "5")]
pub exclude_txn_from_change_streams: bool,
}
pub mod batch_write_request {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutationGroup {
#[prost(message, repeated, tag = "1")]
pub mutations: ::prost::alloc::vec::Vec<super::Mutation>,
}
impl ::prost::Name for MutationGroup {
const NAME: &'static str = "MutationGroup";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.BatchWriteRequest.MutationGroup".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.BatchWriteRequest.MutationGroup"
.into()
}
}
}
impl ::prost::Name for BatchWriteRequest {
const NAME: &'static str = "BatchWriteRequest";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.BatchWriteRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.BatchWriteRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchWriteResponse {
#[prost(int32, repeated, tag = "1")]
pub indexes: ::prost::alloc::vec::Vec<i32>,
#[prost(message, optional, tag = "2")]
pub status: ::core::option::Option<super::super::rpc::Status>,
#[prost(message, optional, tag = "3")]
pub commit_timestamp: ::core::option::Option<::prost_types::Timestamp>,
}
impl ::prost::Name for BatchWriteResponse {
const NAME: &'static str = "BatchWriteResponse";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.BatchWriteResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.BatchWriteResponse".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FetchCacheUpdateRequest {
#[prost(string, tag = "1")]
pub database: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub max_recipe_count: i32,
#[prost(int32, tag = "3")]
pub max_range_count: i32,
}
impl ::prost::Name for FetchCacheUpdateRequest {
const NAME: &'static str = "FetchCacheUpdateRequest";
const PACKAGE: &'static str = "google.spanner.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.spanner.v1.FetchCacheUpdateRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.spanner.v1.FetchCacheUpdateRequest".into()
}
}