// This file is @generated by prost-build.
/// Key range definition
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[prost(skip_debug)]
pub struct KeyRange {
    /// Inclusive lower key bound
    #[prost(bytes = "vec", tag = "1")]
    pub start_key: ::prost::alloc::vec::Vec<u8>,
    /// Exclusive upper key bound
    #[prost(bytes = "vec", tag = "2")]
    pub end_key: ::prost::alloc::vec::Vec<u8>,
}
/// Shard local cache information
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[prost(skip_debug)]
pub struct ShardLocalCacheInfo {
    #[prost(message, optional, tag = "1")]
    pub shard: ::core::option::Option<ShardManifestHeader>,
    #[prost(string, repeated, tag = "2")]
    pub local_cache_addrs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request to get shard local cache information
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetShardLocalCacheRequest {
    /// Table ID to filter shards
    #[prost(int64, tag = "1")]
    pub table_id: i64,
    /// Index ID to filter shards
    #[prost(int64, tag = "2")]
    pub index_id: i64,
    #[prost(uint32, tag = "3")]
    pub keyspace_id: u32,
    #[prost(message, repeated, tag = "4")]
    pub key_ranges: ::prost::alloc::vec::Vec<KeyRange>,
    /// at most `limit` shards can be returned
    #[prost(int32, tag = "5")]
    pub limit: i32,
}
/// Response containing shard local cache information
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetShardLocalCacheResponse {
    #[prost(enumeration = "ErrorCode", tag = "1")]
    pub status: i32,
    #[prost(message, repeated, tag = "2")]
    pub shard_local_cache_infos: ::prost::alloc::vec::Vec<ShardLocalCacheInfo>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[prost(skip_debug)]
pub struct ShardManifestHeader {
    #[prost(uint64, tag = "1")]
    pub shard_id: u64,
    #[prost(bytes = "vec", tag = "2")]
    pub start_key: ::prost::alloc::vec::Vec<u8>,
    #[prost(bytes = "vec", tag = "3")]
    pub end_key: ::prost::alloc::vec::Vec<u8>,
    #[prost(uint64, tag = "4")]
    pub epoch: u64,
    #[prost(uint64, tag = "5")]
    pub seq: u64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[prost(skip_debug)]
pub struct S3Location {
    #[prost(string, tag = "1")]
    pub bucket: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub prefix: ::prost::alloc::string::String,
}
/// CreateIndexRequest is a request to create an index
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[prost(skip_debug)]
pub struct CreateIndexRequest {
    #[prost(string, tag = "1")]
    pub database_name: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "2")]
    pub table_info: ::prost::alloc::vec::Vec<u8>,
    #[prost(int64, tag = "3")]
    pub index_id: i64,
    /// Keyspace ID
    #[prost(uint32, tag = "4")]
    pub keyspace_id: u32,
    #[prost(message, optional, tag = "5")]
    pub parser_info: ::core::option::Option<super::schema::ParserInfo>,
}
/// CreateIndexResponse is a response to the index creation request
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateIndexResponse {
    #[prost(enumeration = "ErrorCode", tag = "1")]
    pub status: i32,
    /// Error message, only valid when status is non-zero
    #[prost(string, tag = "2")]
    pub error_message: ::prost::alloc::string::String,
    /// Created index ID
    #[prost(string, tag = "3")]
    pub index_id: ::prost::alloc::string::String,
}
/// DropIndexRequest is a request to drop an index
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropIndexRequest {
    #[prost(int64, tag = "1")]
    pub table_id: i64,
    #[prost(int64, tag = "2")]
    pub index_id: i64,
    /// Keyspace ID
    #[prost(uint32, tag = "3")]
    pub keyspace_id: u32,
}
/// DropIndexResponse is a response to the index drop request
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropIndexResponse {
    #[prost(enumeration = "ErrorCode", tag = "1")]
    pub status: i32,
    /// Error message, only valid when status is non-zero
    #[prost(string, tag = "2")]
    pub error_message: ::prost::alloc::string::String,
}
/// GetIndexProgressRequest is a request to get the progress of an index build
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetIndexProgressRequest {
    /// Table ID
    #[prost(int64, tag = "1")]
    pub table_id: i64,
    /// Index ID
    #[prost(int64, tag = "2")]
    pub index_id: i64,
    /// Keyspace ID
    #[prost(uint32, tag = "3")]
    pub keyspace_id: u32,
}
/// GetIndexProgressResponse only reports coarse-grained build state.
/// Fine-grained import progress is tracked by the DDL layer.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetIndexProgressResponse {
    #[prost(enumeration = "ErrorCode", tag = "1")]
    pub status: i32,
    /// Error message, only valid when status is non-zero
    #[prost(string, tag = "2")]
    pub error_message: ::prost::alloc::string::String,
    /// Build task state (PENDING, RUNNING, COMPLETED, FAILED)
    #[prost(enumeration = "get_index_progress_response::State", tag = "3")]
    pub state: i32,
}
/// Nested message and enum types in `GetIndexProgressResponse`.
pub mod get_index_progress_response {
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        Pending = 0,
        Running = 1,
        Completed = 2,
        Failed = 3,
        Notfound = 4,
        Error = 5,
    }
    impl State {
        /// 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 {
                State::Pending => "PENDING",
                State::Running => "RUNNING",
                State::Completed => "COMPLETED",
                State::Failed => "FAILED",
                State::Notfound => "NOTFOUND",
                State::Error => "ERROR",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "PENDING" => Some(Self::Pending),
                "RUNNING" => Some(Self::Running),
                "COMPLETED" => Some(Self::Completed),
                "FAILED" => Some(Self::Failed),
                "NOTFOUND" => Some(Self::Notfound),
                "ERROR" => Some(Self::Error),
                _ => None,
            }
        }
    }
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetImportStoragePrefixRequest {
    /// TiDB unique task ID for this Import Into/Index Backfilling job.
    #[prost(string, tag = "1")]
    pub tidb_task_id: ::prost::alloc::string::String,
    /// Table ID of the target table.
    #[prost(int64, tag = "2")]
    pub table_id: i64,
    /// Index ID of the target index. If this is an Import Into job that relates
    /// to multiple indexes, this field should contain all the index IDs.
    #[prost(int64, repeated, tag = "3")]
    pub index_ids: ::prost::alloc::vec::Vec<i64>,
    /// Keyspace ID
    #[prost(uint32, tag = "4")]
    pub keyspace_id: u32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetImportStoragePrefixResponse {
    #[prost(enumeration = "ErrorCode", tag = "1")]
    pub status: i32,
    /// Optional human‑readable diagnostics, only defined when status is not
    /// SUCCESS.
    #[prost(string, tag = "2")]
    pub error_message: ::prost::alloc::string::String,
    /// The import index job_id in TiCI
    #[prost(uint64, tag = "3")]
    pub job_id: u64,
    /// The cloud storage prefix where the import data should be written.
    /// The format is "s3://bucket/prefix/".
    #[prost(string, tag = "4")]
    pub storage_uri: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FinishImportPartitionUploadRequest {
    /// TiDB unique task ID for this Import Into/Index Backfilling job.
    #[prost(string, tag = "1")]
    pub tidb_task_id: ::prost::alloc::string::String,
    /// Key range for the partition uploaded.
    #[prost(message, optional, tag = "2")]
    pub key_range: ::core::option::Option<KeyRange>,
    /// The cloud storage path where the partition data is written.
    /// The format is "s3://bucket/prefix/filename".
    #[prost(string, tag = "3")]
    pub storage_uri: ::prost::alloc::string::String,
    /// Keyspace ID
    #[prost(uint32, tag = "4")]
    pub keyspace_id: u32,
    /// Index ID for the uploaded partition data. A zero value means unspecified.
    #[prost(int64, tag = "5")]
    pub index_id: i64,
}
/// One merged SortedKVMeta group used for import pre-split analysis.
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PreSplitImportShardMeta {
    #[prost(int64, tag = "1")]
    pub ele_id: i64,
    #[prost(bytes = "vec", tag = "2")]
    pub start_key: ::prost::alloc::vec::Vec<u8>,
    #[prost(bytes = "vec", tag = "3")]
    pub end_key: ::prost::alloc::vec::Vec<u8>,
    #[prost(uint64, tag = "4")]
    pub total_kv_size: u64,
    #[prost(uint64, tag = "5")]
    pub total_kv_cnt: u64,
    #[prost(int32, tag = "6")]
    pub data_file_count: i32,
    #[prost(int32, tag = "7")]
    pub stat_file_count: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PreSplitImportShardsRequest {
    /// TiDB unique task ID for this Import Into job.
    #[prost(string, tag = "1")]
    pub tidb_task_id: ::prost::alloc::string::String,
    #[prost(int64, tag = "2")]
    pub table_id: i64,
    #[prost(int64, repeated, tag = "3")]
    pub index_ids: ::prost::alloc::vec::Vec<i64>,
    #[prost(uint64, tag = "4")]
    pub scan_snapshot_ts: u64,
    #[prost(bytes = "vec", tag = "5")]
    pub start_key: ::prost::alloc::vec::Vec<u8>,
    #[prost(bytes = "vec", tag = "6")]
    pub end_key: ::prost::alloc::vec::Vec<u8>,
    #[prost(uint64, tag = "7")]
    pub total_kv_size: u64,
    #[prost(uint64, tag = "8")]
    pub total_kv_cnt: u64,
    #[prost(int32, tag = "9")]
    pub data_file_count: i32,
    #[prost(int32, tag = "10")]
    pub stat_file_count: i32,
    #[prost(message, repeated, tag = "11")]
    pub meta_groups: ::prost::alloc::vec::Vec<PreSplitImportShardMeta>,
    #[prost(uint32, tag = "12")]
    pub keyspace_id: u32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PreSplitImportIndexResult {
    #[prost(int64, tag = "1")]
    pub table_id: i64,
    #[prost(int64, tag = "2")]
    pub index_id: i64,
    #[prost(uint32, tag = "3")]
    pub split_count: u32,
    #[prost(uint32, tag = "4")]
    pub shard_count_after_split: u32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PreSplitImportShardsResponse {
    #[prost(enumeration = "ErrorCode", tag = "1")]
    pub status: i32,
    #[prost(string, tag = "2")]
    pub error_message: ::prost::alloc::string::String,
    #[prost(bytes = "vec", repeated, tag = "3")]
    pub split_keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
    #[prost(message, repeated, tag = "4")]
    pub index_results: ::prost::alloc::vec::Vec<PreSplitImportIndexResult>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FinishImportIndexUploadRequest {
    /// TiDB unique task ID for this Import Into/Index Backfilling job.
    #[prost(string, tag = "1")]
    pub tidb_task_id: ::prost::alloc::string::String,
    /// If status is SUCCESS, the job is finished successfully.
    /// If status is not SUCCESS, the job is aborted or cancelled in TiDB side,
    /// and TiCI should clean up all the related data.
    #[prost(enumeration = "ErrorCode", tag = "2")]
    pub status: i32,
    /// The error_message if the status is not SUCCESS.
    #[prost(string, tag = "3")]
    pub error_message: ::prost::alloc::string::String,
    /// Keyspace ID
    #[prost(uint32, tag = "4")]
    pub keyspace_id: u32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FinishImportResponse {
    #[prost(enumeration = "ErrorCode", tag = "1")]
    pub status: i32,
    /// Optional human‑readable diagnostics, only defined when status is not
    /// SUCCESS.
    #[prost(string, tag = "2")]
    pub error_message: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ErrorCode {
    Success = 0,
    UnknownError = 1,
    InvalidArguments = 2,
    TryAgain = 3,
    Deprecated = 4,
    NotLeader = 5,
    ShardNotFound = 11,
    IndexNotFound = 12,
    WorkerNotFound = 13,
    ShardNotScheduled = 14,
    CompactionNotFound = 15,
    FragRangeMismatch = 16,
    InvalidOp = 17,
    Throttled = 18,
    ProgressUnwinded = 19,
}
impl ErrorCode {
    /// 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 {
            ErrorCode::Success => "SUCCESS",
            ErrorCode::UnknownError => "UNKNOWN_ERROR",
            ErrorCode::InvalidArguments => "INVALID_ARGUMENTS",
            ErrorCode::TryAgain => "TRY_AGAIN",
            ErrorCode::Deprecated => "DEPRECATED",
            ErrorCode::NotLeader => "NOT_LEADER",
            ErrorCode::ShardNotFound => "SHARD_NOT_FOUND",
            ErrorCode::IndexNotFound => "INDEX_NOT_FOUND",
            ErrorCode::WorkerNotFound => "WORKER_NOT_FOUND",
            ErrorCode::ShardNotScheduled => "SHARD_NOT_SCHEDULED",
            ErrorCode::CompactionNotFound => "COMPACTION_NOT_FOUND",
            ErrorCode::FragRangeMismatch => "FRAG_RANGE_MISMATCH",
            ErrorCode::InvalidOp => "INVALID_OP",
            ErrorCode::Throttled => "THROTTLED",
            ErrorCode::ProgressUnwinded => "PROGRESS_UNWINDED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SUCCESS" => Some(Self::Success),
            "UNKNOWN_ERROR" => Some(Self::UnknownError),
            "INVALID_ARGUMENTS" => Some(Self::InvalidArguments),
            "TRY_AGAIN" => Some(Self::TryAgain),
            "DEPRECATED" => Some(Self::Deprecated),
            "NOT_LEADER" => Some(Self::NotLeader),
            "SHARD_NOT_FOUND" => Some(Self::ShardNotFound),
            "INDEX_NOT_FOUND" => Some(Self::IndexNotFound),
            "WORKER_NOT_FOUND" => Some(Self::WorkerNotFound),
            "SHARD_NOT_SCHEDULED" => Some(Self::ShardNotScheduled),
            "COMPACTION_NOT_FOUND" => Some(Self::CompactionNotFound),
            "FRAG_RANGE_MISMATCH" => Some(Self::FragRangeMismatch),
            "INVALID_OP" => Some(Self::InvalidOp),
            "THROTTLED" => Some(Self::Throttled),
            "PROGRESS_UNWINDED" => Some(Self::ProgressUnwinded),
            _ => None,
        }
    }
}
/// Generated client implementations.
pub mod meta_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    #[derive(Debug, Clone)]
    pub struct MetaServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl MetaServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> MetaServiceClient<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,
        ) -> MetaServiceClient<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,
        {
            MetaServiceClient::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
        }
        /// CreateIndex creates a new index
        pub async fn create_index(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateIndexRequest>,
        ) -> std::result::Result<
            tonic::Response<super::CreateIndexResponse>,
            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(
                "/tici.MetaService/CreateIndex",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("tici.MetaService", "CreateIndex"));
            self.inner.unary(req, path, codec).await
        }
        /// DropIndex removes an existing index
        pub async fn drop_index(
            &mut self,
            request: impl tonic::IntoRequest<super::DropIndexRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DropIndexResponse>,
            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(
                "/tici.MetaService/DropIndex",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("tici.MetaService", "DropIndex"));
            self.inner.unary(req, path, codec).await
        }
        /// GetIndexProgress retrieves the current progress of an index build
        pub async fn get_index_progress(
            &mut self,
            request: impl tonic::IntoRequest<super::GetIndexProgressRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetIndexProgressResponse>,
            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(
                "/tici.MetaService/GetIndexProgress",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("tici.MetaService", "GetIndexProgress"));
            self.inner.unary(req, path, codec).await
        }
        /// Get shard local cache information
        pub async fn get_shard_local_cache_info(
            &mut self,
            request: impl tonic::IntoRequest<super::GetShardLocalCacheRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetShardLocalCacheResponse>,
            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(
                "/tici.MetaService/GetShardLocalCacheInfo",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("tici.MetaService", "GetShardLocalCacheInfo"));
            self.inner.unary(req, path, codec).await
        }
        /// Get a cloud storage prefix for importing data.
        /// This will create a new import job with a unique job_id and a cloud storage
        /// prefix for the import data. The caller should generate files under the
        /// cloud storage prefix and call `FinishImportPartitionUpload` after uploading
        /// each partition. If there is an existing running import job for the same
        /// identifier, it will return the existing job_id.
        pub async fn get_import_storage_prefix(
            &mut self,
            request: impl tonic::IntoRequest<super::GetImportStoragePrefixRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetImportStoragePrefixResponse>,
            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(
                "/tici.MetaService/GetImportStoragePrefix",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("tici.MetaService", "GetImportStoragePrefix"));
            self.inner.unary(req, path, codec).await
        }
        /// Called by Import DXF to notify Meta Service after a partition for
        /// the given index are uploaded.
        pub async fn finish_import_partition_upload(
            &mut self,
            request: impl tonic::IntoRequest<super::FinishImportPartitionUploadRequest>,
        ) -> std::result::Result<
            tonic::Response<super::FinishImportResponse>,
            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(
                "/tici.MetaService/FinishImportPartitionUpload",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("tici.MetaService", "FinishImportPartitionUpload"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Called before Add full index build to pre-split shards by
        /// aggregated SortedKV metadata groups.
        pub async fn pre_split_import_shards(
            &mut self,
            request: impl tonic::IntoRequest<super::PreSplitImportShardsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::PreSplitImportShardsResponse>,
            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(
                "/tici.MetaService/PreSplitImportShards",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("tici.MetaService", "PreSplitImportShards"));
            self.inner.unary(req, path, codec).await
        }
        /// Called to notify Meta Service that the whole table/index upload is
        /// finished.
        pub async fn finish_import_index_upload(
            &mut self,
            request: impl tonic::IntoRequest<super::FinishImportIndexUploadRequest>,
        ) -> std::result::Result<
            tonic::Response<super::FinishImportResponse>,
            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(
                "/tici.MetaService/FinishImportIndexUpload",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("tici.MetaService", "FinishImportIndexUpload"));
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Generated server implementations.
pub mod meta_service_server {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    /// Generated trait containing gRPC methods that should be implemented for use with MetaServiceServer.
    #[async_trait]
    pub trait MetaService: Send + Sync + 'static {
        /// CreateIndex creates a new index
        async fn create_index(
            &self,
            request: tonic::Request<super::CreateIndexRequest>,
        ) -> std::result::Result<
            tonic::Response<super::CreateIndexResponse>,
            tonic::Status,
        >;
        /// DropIndex removes an existing index
        async fn drop_index(
            &self,
            request: tonic::Request<super::DropIndexRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DropIndexResponse>,
            tonic::Status,
        >;
        /// GetIndexProgress retrieves the current progress of an index build
        async fn get_index_progress(
            &self,
            request: tonic::Request<super::GetIndexProgressRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetIndexProgressResponse>,
            tonic::Status,
        >;
        /// Get shard local cache information
        async fn get_shard_local_cache_info(
            &self,
            request: tonic::Request<super::GetShardLocalCacheRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetShardLocalCacheResponse>,
            tonic::Status,
        >;
        /// Get a cloud storage prefix for importing data.
        /// This will create a new import job with a unique job_id and a cloud storage
        /// prefix for the import data. The caller should generate files under the
        /// cloud storage prefix and call `FinishImportPartitionUpload` after uploading
        /// each partition. If there is an existing running import job for the same
        /// identifier, it will return the existing job_id.
        async fn get_import_storage_prefix(
            &self,
            request: tonic::Request<super::GetImportStoragePrefixRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetImportStoragePrefixResponse>,
            tonic::Status,
        >;
        /// Called by Import DXF to notify Meta Service after a partition for
        /// the given index are uploaded.
        async fn finish_import_partition_upload(
            &self,
            request: tonic::Request<super::FinishImportPartitionUploadRequest>,
        ) -> std::result::Result<
            tonic::Response<super::FinishImportResponse>,
            tonic::Status,
        >;
        /// Called before Add full index build to pre-split shards by
        /// aggregated SortedKV metadata groups.
        async fn pre_split_import_shards(
            &self,
            request: tonic::Request<super::PreSplitImportShardsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::PreSplitImportShardsResponse>,
            tonic::Status,
        >;
        /// Called to notify Meta Service that the whole table/index upload is
        /// finished.
        async fn finish_import_index_upload(
            &self,
            request: tonic::Request<super::FinishImportIndexUploadRequest>,
        ) -> std::result::Result<
            tonic::Response<super::FinishImportResponse>,
            tonic::Status,
        >;
    }
    #[derive(Debug)]
    pub struct MetaServiceServer<T: MetaService> {
        inner: _Inner<T>,
        accept_compression_encodings: EnabledCompressionEncodings,
        send_compression_encodings: EnabledCompressionEncodings,
        max_decoding_message_size: Option<usize>,
        max_encoding_message_size: Option<usize>,
    }
    struct _Inner<T>(Arc<T>);
    impl<T: MetaService> MetaServiceServer<T> {
        pub fn new(inner: T) -> Self {
            Self::from_arc(Arc::new(inner))
        }
        pub fn from_arc(inner: Arc<T>) -> Self {
            let inner = _Inner(inner);
            Self {
                inner,
                accept_compression_encodings: Default::default(),
                send_compression_encodings: Default::default(),
                max_decoding_message_size: None,
                max_encoding_message_size: None,
            }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> InterceptedService<Self, F>
        where
            F: tonic::service::Interceptor,
        {
            InterceptedService::new(Self::new(inner), interceptor)
        }
        /// Enable decompressing requests with the given encoding.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.accept_compression_encodings.enable(encoding);
            self
        }
        /// Compress responses with the given encoding, if the client supports it.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.send_compression_encodings.enable(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.max_decoding_message_size = Some(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.max_encoding_message_size = Some(limit);
            self
        }
    }
    impl<T, B> tonic::codegen::Service<http::Request<B>> for MetaServiceServer<T>
    where
        T: MetaService,
        B: Body + Send + 'static,
        B::Error: Into<StdError> + Send + 'static,
    {
        type Response = http::Response<tonic::body::BoxBody>;
        type Error = std::convert::Infallible;
        type Future = BoxFuture<Self::Response, Self::Error>;
        fn poll_ready(
            &mut self,
            _cx: &mut Context<'_>,
        ) -> Poll<std::result::Result<(), Self::Error>> {
            Poll::Ready(Ok(()))
        }
        fn call(&mut self, req: http::Request<B>) -> Self::Future {
            let inner = self.inner.clone();
            match req.uri().path() {
                "/tici.MetaService/CreateIndex" => {
                    #[allow(non_camel_case_types)]
                    struct CreateIndexSvc<T: MetaService>(pub Arc<T>);
                    impl<
                        T: MetaService,
                    > tonic::server::UnaryService<super::CreateIndexRequest>
                    for CreateIndexSvc<T> {
                        type Response = super::CreateIndexResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::CreateIndexRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as MetaService>::create_index(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let inner = inner.0;
                        let method = CreateIndexSvc(inner);
                        let codec = tonic::codec::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/tici.MetaService/DropIndex" => {
                    #[allow(non_camel_case_types)]
                    struct DropIndexSvc<T: MetaService>(pub Arc<T>);
                    impl<
                        T: MetaService,
                    > tonic::server::UnaryService<super::DropIndexRequest>
                    for DropIndexSvc<T> {
                        type Response = super::DropIndexResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::DropIndexRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as MetaService>::drop_index(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let inner = inner.0;
                        let method = DropIndexSvc(inner);
                        let codec = tonic::codec::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/tici.MetaService/GetIndexProgress" => {
                    #[allow(non_camel_case_types)]
                    struct GetIndexProgressSvc<T: MetaService>(pub Arc<T>);
                    impl<
                        T: MetaService,
                    > tonic::server::UnaryService<super::GetIndexProgressRequest>
                    for GetIndexProgressSvc<T> {
                        type Response = super::GetIndexProgressResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::GetIndexProgressRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as MetaService>::get_index_progress(&inner, request)
                                    .await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let inner = inner.0;
                        let method = GetIndexProgressSvc(inner);
                        let codec = tonic::codec::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/tici.MetaService/GetShardLocalCacheInfo" => {
                    #[allow(non_camel_case_types)]
                    struct GetShardLocalCacheInfoSvc<T: MetaService>(pub Arc<T>);
                    impl<
                        T: MetaService,
                    > tonic::server::UnaryService<super::GetShardLocalCacheRequest>
                    for GetShardLocalCacheInfoSvc<T> {
                        type Response = super::GetShardLocalCacheResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::GetShardLocalCacheRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as MetaService>::get_shard_local_cache_info(
                                        &inner,
                                        request,
                                    )
                                    .await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let inner = inner.0;
                        let method = GetShardLocalCacheInfoSvc(inner);
                        let codec = tonic::codec::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/tici.MetaService/GetImportStoragePrefix" => {
                    #[allow(non_camel_case_types)]
                    struct GetImportStoragePrefixSvc<T: MetaService>(pub Arc<T>);
                    impl<
                        T: MetaService,
                    > tonic::server::UnaryService<super::GetImportStoragePrefixRequest>
                    for GetImportStoragePrefixSvc<T> {
                        type Response = super::GetImportStoragePrefixResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::GetImportStoragePrefixRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as MetaService>::get_import_storage_prefix(
                                        &inner,
                                        request,
                                    )
                                    .await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let inner = inner.0;
                        let method = GetImportStoragePrefixSvc(inner);
                        let codec = tonic::codec::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/tici.MetaService/FinishImportPartitionUpload" => {
                    #[allow(non_camel_case_types)]
                    struct FinishImportPartitionUploadSvc<T: MetaService>(pub Arc<T>);
                    impl<
                        T: MetaService,
                    > tonic::server::UnaryService<
                        super::FinishImportPartitionUploadRequest,
                    > for FinishImportPartitionUploadSvc<T> {
                        type Response = super::FinishImportResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<
                                super::FinishImportPartitionUploadRequest,
                            >,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as MetaService>::finish_import_partition_upload(
                                        &inner,
                                        request,
                                    )
                                    .await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let inner = inner.0;
                        let method = FinishImportPartitionUploadSvc(inner);
                        let codec = tonic::codec::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/tici.MetaService/PreSplitImportShards" => {
                    #[allow(non_camel_case_types)]
                    struct PreSplitImportShardsSvc<T: MetaService>(pub Arc<T>);
                    impl<
                        T: MetaService,
                    > tonic::server::UnaryService<super::PreSplitImportShardsRequest>
                    for PreSplitImportShardsSvc<T> {
                        type Response = super::PreSplitImportShardsResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::PreSplitImportShardsRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as MetaService>::pre_split_import_shards(&inner, request)
                                    .await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let inner = inner.0;
                        let method = PreSplitImportShardsSvc(inner);
                        let codec = tonic::codec::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/tici.MetaService/FinishImportIndexUpload" => {
                    #[allow(non_camel_case_types)]
                    struct FinishImportIndexUploadSvc<T: MetaService>(pub Arc<T>);
                    impl<
                        T: MetaService,
                    > tonic::server::UnaryService<super::FinishImportIndexUploadRequest>
                    for FinishImportIndexUploadSvc<T> {
                        type Response = super::FinishImportResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<
                                super::FinishImportIndexUploadRequest,
                            >,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as MetaService>::finish_import_index_upload(
                                        &inner,
                                        request,
                                    )
                                    .await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let inner = inner.0;
                        let method = FinishImportIndexUploadSvc(inner);
                        let codec = tonic::codec::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                _ => {
                    Box::pin(async move {
                        Ok(
                            http::Response::builder()
                                .status(200)
                                .header("grpc-status", "12")
                                .header("content-type", "application/grpc")
                                .body(empty_body())
                                .unwrap(),
                        )
                    })
                }
            }
        }
    }
    impl<T: MetaService> Clone for MetaServiceServer<T> {
        fn clone(&self) -> Self {
            let inner = self.inner.clone();
            Self {
                inner,
                accept_compression_encodings: self.accept_compression_encodings,
                send_compression_encodings: self.send_compression_encodings,
                max_decoding_message_size: self.max_decoding_message_size,
                max_encoding_message_size: self.max_encoding_message_size,
            }
        }
    }
    impl<T: MetaService> Clone for _Inner<T> {
        fn clone(&self) -> Self {
            Self(Arc::clone(&self.0))
        }
    }
    impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
            write!(f, "{:?}", self.0)
        }
    }
    impl<T: MetaService> tonic::server::NamedService for MetaServiceServer<T> {
        const NAME: &'static str = "tici.MetaService";
    }
}
