// This file is @generated by prost-build.
/// ParserInfo represents parser information
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ParserInfo {
    /// Parser type
    #[prost(enumeration = "ParserType", tag = "1")]
    pub parser_type: i32,
    /// Parser parameters
    #[prost(map = "string, string", tag = "2")]
    pub parser_params: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    #[prost(string, repeated, tag = "3")]
    pub stop_words: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// TableInfo represents table information
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableInfo {
    #[prost(uint32, tag = "1")]
    pub keyspace_id: u32,
    /// Table ID
    #[prost(int64, tag = "2")]
    pub table_id: i64,
    /// Table name
    #[prost(string, tag = "3")]
    pub table_name: ::prost::alloc::string::String,
    /// Database name
    #[prost(string, tag = "4")]
    pub database_name: ::prost::alloc::string::String,
    /// Table version
    #[prost(int64, tag = "5")]
    pub version: i64,
    /// Column information
    #[prost(message, repeated, tag = "6")]
    pub columns: ::prost::alloc::vec::Vec<ColumnInfo>,
    /// Whether the table is clustered
    #[prost(bool, tag = "7")]
    pub is_clustered: bool,
    /// Whether the table is a partition table
    #[prost(bool, tag = "8")]
    pub is_partition: bool,
    /// Logical table ID for partition table, 0 for non-partition tables
    #[prost(int64, tag = "9")]
    pub logical_table_id: i64,
}
/// ColumnInfo represents column information
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ColumnInfo {
    /// Column ID
    #[prost(int64, tag = "2")]
    pub column_id: i64,
    /// Column name
    #[prost(string, tag = "3")]
    pub column_name: ::prost::alloc::string::String,
    /// MySQL type
    #[prost(int32, tag = "4")]
    pub r#type: i32,
    /// Collation
    #[prost(string, tag = "5")]
    pub collation: ::prost::alloc::string::String,
    /// Column length
    #[prost(int32, tag = "6")]
    pub column_length: i32,
    /// Decimal places
    #[prost(int32, tag = "7")]
    pub decimal: i32,
    /// Flags
    #[prost(uint32, tag = "8")]
    pub flag: u32,
    /// Enum elements
    #[prost(string, repeated, tag = "9")]
    pub elems: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Default value
    #[prost(bytes = "vec", tag = "10")]
    pub default_val: ::prost::alloc::vec::Vec<u8>,
    /// Whether it's a primary key
    #[prost(bool, tag = "11")]
    pub is_primary_key: bool,
    /// Whether it's an array
    #[prost(bool, tag = "12")]
    pub is_array: bool,
}
/// IndexInfo represents index information
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IndexInfo {
    #[prost(uint32, tag = "1")]
    pub keyspace_id: u32,
    /// Table ID
    #[prost(int64, tag = "2")]
    pub table_id: i64,
    /// Index ID
    #[prost(int64, tag = "3")]
    pub index_id: i64,
    /// Index name
    #[prost(string, tag = "4")]
    pub index_name: ::prost::alloc::string::String,
    /// Index type (fulltext, custom)
    #[prost(int32, tag = "5")]
    pub index_type: i32,
    /// Index columns
    #[prost(message, repeated, tag = "6")]
    pub columns: ::prost::alloc::vec::Vec<ColumnInfo>,
    /// Whether the index is unique
    #[prost(bool, tag = "7")]
    pub is_unique: bool,
    /// Parser information
    #[prost(message, optional, tag = "8")]
    pub parser_info: ::core::option::Option<ParserInfo>,
    /// Other index parameters
    #[prost(map = "string, string", tag = "9")]
    pub other_params: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Fulltext index info
    #[prost(string, tag = "10")]
    pub fulltext_index: ::prost::alloc::string::String,
    /// Hybrid index info
    #[prost(string, tag = "11")]
    pub hybrid_index: ::prost::alloc::string::String,
    /// PD TSO when the index is created
    #[prost(uint64, tag = "12")]
    pub created_ts: u64,
}
/// PartitionDefinition represents partition table definitions
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PartitionDefinition {
    /// Partition table ID
    #[prost(int64, tag = "1")]
    pub table_id: i64,
    /// Partition table name
    #[prost(string, tag = "2")]
    pub table_name: ::prost::alloc::string::String,
    /// Less then value
    #[prost(string, repeated, tag = "3")]
    pub less_than: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// PartitionTableInfo represents partition table information
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PartitionTableInfo {
    /// Partition type
    #[prost(int32, tag = "1")]
    pub partition_type: i32,
    /// Partition table expr string
    #[prost(string, tag = "2")]
    pub expr: ::prost::alloc::string::String,
    /// Partition definitions
    #[prost(message, repeated, tag = "3")]
    pub definitions: ::prost::alloc::vec::Vec<PartitionDefinition>,
    /// Number of partition definitions
    #[prost(uint64, tag = "4")]
    pub num: u64,
}
/// ParserType represents the type of parser
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ParserType {
    /// Default value must be 0 in proto3
    UnknownParser = 0,
    /// Default parser
    DefaultParser = 1,
    /// Other parser types
    OtherParser = 2,
}
impl ParserType {
    /// 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 {
            ParserType::UnknownParser => "UNKNOWN_PARSER",
            ParserType::DefaultParser => "DEFAULT_PARSER",
            ParserType::OtherParser => "OTHER_PARSER",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "UNKNOWN_PARSER" => Some(Self::UnknownParser),
            "DEFAULT_PARSER" => Some(Self::DefaultParser),
            "OTHER_PARSER" => Some(Self::OtherParser),
            _ => None,
        }
    }
}
