// This file is @generated by prost-build.
/// Common Messages
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Empty {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NamespaceRequest {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NamespaceResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NewTopicRequest {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Schema subject from Schema Registry (optional: topics can have no schema)
    #[prost(string, optional, tag = "2")]
    pub schema_subject: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(enumeration = "DispatchStrategy", tag = "3")]
    pub dispatch_strategy: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TopicRequest {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TopicResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PartitionedTopicRequest {
    /// /namespace/topic
    #[prost(string, tag = "1")]
    pub base_name: ::prost::alloc::string::String,
    /// number of partitions
    #[prost(uint32, tag = "2")]
    pub partitions: u32,
    /// Schema subject from Schema Registry (optional)
    #[prost(string, optional, tag = "3")]
    pub schema_subject: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(enumeration = "DispatchStrategy", tag = "4")]
    pub dispatch_strategy: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubscriptionRequest {
    #[prost(string, tag = "1")]
    pub topic: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub subscription: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubscriptionResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
}
/// Response Messages
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BrokerListResponse {
    #[prost(message, repeated, tag = "1")]
    pub brokers: ::prost::alloc::vec::Vec<BrokerInfo>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BrokerInfo {
    #[prost(string, tag = "1")]
    pub broker_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub broker_addr: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub broker_role: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub admin_addr: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub metrics_addr: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub broker_status: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BrokerResponse {
    #[prost(string, tag = "1")]
    pub leader: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NamespaceListResponse {
    #[prost(string, repeated, tag = "1")]
    pub namespaces: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TopicListResponse {
    #[prost(string, repeated, tag = "1")]
    pub topics: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Detailed topic entry including hosting broker id
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TopicInfo {
    /// /namespace/topic (leading slash)
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// hosting broker id; empty if unknown/unassigned
    #[prost(string, tag = "2")]
    pub broker_id: ::prost::alloc::string::String,
    /// delivery: Reliable | NonReliable
    #[prost(string, tag = "3")]
    pub delivery: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TopicInfoListResponse {
    #[prost(message, repeated, tag = "1")]
    pub topics: ::prost::alloc::vec::Vec<TopicInfo>,
}
/// Request to address a specific broker
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BrokerRequest {
    #[prost(string, tag = "1")]
    pub broker_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PolicyResponse {
    #[prost(string, tag = "1")]
    pub policies: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubscriptionListResponse {
    #[prost(string, repeated, tag = "1")]
    pub subscriptions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Describe Topic (schema + subscriptions)
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DescribeTopicRequest {
    /// /namespace/topic
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DescribeTopicResponse {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "2")]
    pub subscriptions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, tag = "3")]
    pub broker_id: ::prost::alloc::string::String,
    /// delivery: Reliable | NonReliable
    #[prost(string, tag = "4")]
    pub delivery: ::prost::alloc::string::String,
    /// Schema Registry fields (all optional - topic may have no schema)
    ///
    /// Schema subject name
    #[prost(string, optional, tag = "5")]
    pub schema_subject: ::core::option::Option<::prost::alloc::string::String>,
    /// Schema ID from registry
    #[prost(uint64, optional, tag = "6")]
    pub schema_id: ::core::option::Option<u64>,
    /// Schema version
    #[prost(uint32, optional, tag = "7")]
    pub schema_version: ::core::option::Option<u32>,
    /// "json_schema", "avro", "protobuf", "string", "bytes"
    #[prost(string, optional, tag = "8")]
    pub schema_type: ::core::option::Option<::prost::alloc::string::String>,
    /// "NONE", "BACKWARD", "FORWARD", "FULL"
    #[prost(string, optional, tag = "9")]
    pub compatibility_mode: ::core::option::Option<::prost::alloc::string::String>,
}
/// Broker Unload
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UnloadBrokerRequest {
    /// Target broker to unload (string id as published under /cluster/brokers/{broker_id})
    #[prost(string, tag = "1")]
    pub broker_id: ::prost::alloc::string::String,
    /// Unload concurrency (default: 1)
    #[prost(uint32, tag = "2")]
    pub max_parallel: u32,
    /// Optional filters
    #[prost(string, repeated, tag = "3")]
    pub namespaces_include: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag = "4")]
    pub namespaces_exclude: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Dry-run does not perform changes; returns the topics to be affected
    #[prost(bool, tag = "5")]
    pub dry_run: bool,
    /// Per-topic timeout (seconds)
    #[prost(uint32, tag = "6")]
    pub timeout_seconds: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UnloadBrokerResponse {
    /// true if accepted/started
    #[prost(bool, tag = "1")]
    pub started: bool,
    #[prost(uint32, tag = "2")]
    pub total: u32,
    #[prost(uint32, tag = "3")]
    pub succeeded: u32,
    #[prost(uint32, tag = "4")]
    pub failed: u32,
    #[prost(uint32, tag = "5")]
    pub pending: u32,
    #[prost(string, repeated, tag = "6")]
    pub failed_topics: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Activate Broker
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ActivateBrokerRequest {
    /// Target broker to activate (string id as published under /cluster/brokers/{broker_id})
    #[prost(string, tag = "1")]
    pub broker_id: ::prost::alloc::string::String,
    /// Optional reason for auditability
    #[prost(string, tag = "2")]
    pub reason: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ActivateBrokerResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
}
/// Keep enums/messages consistent with danube/DanubeApi.proto
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DispatchStrategy {
    NonReliable = 0,
    Reliable = 1,
}
impl DispatchStrategy {
    /// 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 {
            Self::NonReliable => "NonReliable",
            Self::Reliable => "Reliable",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "NonReliable" => Some(Self::NonReliable),
            "Reliable" => Some(Self::Reliable),
            _ => None,
        }
    }
}
/// Generated client implementations.
pub mod broker_admin_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    #[derive(Debug, Clone)]
    pub struct BrokerAdminClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl BrokerAdminClient<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> BrokerAdminClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::Body>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::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,
        ) -> BrokerAdminClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::Body>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::Body>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            BrokerAdminClient::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
        }
        /// Broker related RPCs
        pub async fn list_brokers(
            &mut self,
            request: impl tonic::IntoRequest<super::Empty>,
        ) -> std::result::Result<
            tonic::Response<super::BrokerListResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/danube_admin.BrokerAdmin/ListBrokers",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("danube_admin.BrokerAdmin", "ListBrokers"));
            self.inner.unary(req, path, codec).await
        }
        pub async fn get_leader_broker(
            &mut self,
            request: impl tonic::IntoRequest<super::Empty>,
        ) -> std::result::Result<tonic::Response<super::BrokerResponse>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/danube_admin.BrokerAdmin/GetLeaderBroker",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("danube_admin.BrokerAdmin", "GetLeaderBroker"));
            self.inner.unary(req, path, codec).await
        }
        pub async fn list_namespaces(
            &mut self,
            request: impl tonic::IntoRequest<super::Empty>,
        ) -> std::result::Result<
            tonic::Response<super::NamespaceListResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/danube_admin.BrokerAdmin/ListNamespaces",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("danube_admin.BrokerAdmin", "ListNamespaces"));
            self.inner.unary(req, path, codec).await
        }
        pub async fn unload_broker(
            &mut self,
            request: impl tonic::IntoRequest<super::UnloadBrokerRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UnloadBrokerResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/danube_admin.BrokerAdmin/UnloadBroker",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("danube_admin.BrokerAdmin", "UnloadBroker"));
            self.inner.unary(req, path, codec).await
        }
        pub async fn activate_broker(
            &mut self,
            request: impl tonic::IntoRequest<super::ActivateBrokerRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ActivateBrokerResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/danube_admin.BrokerAdmin/ActivateBroker",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("danube_admin.BrokerAdmin", "ActivateBroker"));
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Generated server implementations.
pub mod broker_admin_server {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    /// Generated trait containing gRPC methods that should be implemented for use with BrokerAdminServer.
    #[async_trait]
    pub trait BrokerAdmin: std::marker::Send + std::marker::Sync + 'static {
        /// Broker related RPCs
        async fn list_brokers(
            &self,
            request: tonic::Request<super::Empty>,
        ) -> std::result::Result<
            tonic::Response<super::BrokerListResponse>,
            tonic::Status,
        >;
        async fn get_leader_broker(
            &self,
            request: tonic::Request<super::Empty>,
        ) -> std::result::Result<tonic::Response<super::BrokerResponse>, tonic::Status>;
        async fn list_namespaces(
            &self,
            request: tonic::Request<super::Empty>,
        ) -> std::result::Result<
            tonic::Response<super::NamespaceListResponse>,
            tonic::Status,
        >;
        async fn unload_broker(
            &self,
            request: tonic::Request<super::UnloadBrokerRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UnloadBrokerResponse>,
            tonic::Status,
        >;
        async fn activate_broker(
            &self,
            request: tonic::Request<super::ActivateBrokerRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ActivateBrokerResponse>,
            tonic::Status,
        >;
    }
    #[derive(Debug)]
    pub struct BrokerAdminServer<T> {
        inner: Arc<T>,
        accept_compression_encodings: EnabledCompressionEncodings,
        send_compression_encodings: EnabledCompressionEncodings,
        max_decoding_message_size: Option<usize>,
        max_encoding_message_size: Option<usize>,
    }
    impl<T> BrokerAdminServer<T> {
        pub fn new(inner: T) -> Self {
            Self::from_arc(Arc::new(inner))
        }
        pub fn from_arc(inner: Arc<T>) -> Self {
            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 BrokerAdminServer<T>
    where
        T: BrokerAdmin,
        B: Body + std::marker::Send + 'static,
        B::Error: Into<StdError> + std::marker::Send + 'static,
    {
        type Response = http::Response<tonic::body::Body>;
        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 {
            match req.uri().path() {
                "/danube_admin.BrokerAdmin/ListBrokers" => {
                    #[allow(non_camel_case_types)]
                    struct ListBrokersSvc<T: BrokerAdmin>(pub Arc<T>);
                    impl<T: BrokerAdmin> tonic::server::UnaryService<super::Empty>
                    for ListBrokersSvc<T> {
                        type Response = super::BrokerListResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::Empty>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as BrokerAdmin>::list_brokers(&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 method = ListBrokersSvc(inner);
                        let codec = tonic_prost::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)
                }
                "/danube_admin.BrokerAdmin/GetLeaderBroker" => {
                    #[allow(non_camel_case_types)]
                    struct GetLeaderBrokerSvc<T: BrokerAdmin>(pub Arc<T>);
                    impl<T: BrokerAdmin> tonic::server::UnaryService<super::Empty>
                    for GetLeaderBrokerSvc<T> {
                        type Response = super::BrokerResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::Empty>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as BrokerAdmin>::get_leader_broker(&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 method = GetLeaderBrokerSvc(inner);
                        let codec = tonic_prost::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)
                }
                "/danube_admin.BrokerAdmin/ListNamespaces" => {
                    #[allow(non_camel_case_types)]
                    struct ListNamespacesSvc<T: BrokerAdmin>(pub Arc<T>);
                    impl<T: BrokerAdmin> tonic::server::UnaryService<super::Empty>
                    for ListNamespacesSvc<T> {
                        type Response = super::NamespaceListResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::Empty>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as BrokerAdmin>::list_namespaces(&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 method = ListNamespacesSvc(inner);
                        let codec = tonic_prost::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)
                }
                "/danube_admin.BrokerAdmin/UnloadBroker" => {
                    #[allow(non_camel_case_types)]
                    struct UnloadBrokerSvc<T: BrokerAdmin>(pub Arc<T>);
                    impl<
                        T: BrokerAdmin,
                    > tonic::server::UnaryService<super::UnloadBrokerRequest>
                    for UnloadBrokerSvc<T> {
                        type Response = super::UnloadBrokerResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::UnloadBrokerRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as BrokerAdmin>::unload_broker(&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 method = UnloadBrokerSvc(inner);
                        let codec = tonic_prost::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)
                }
                "/danube_admin.BrokerAdmin/ActivateBroker" => {
                    #[allow(non_camel_case_types)]
                    struct ActivateBrokerSvc<T: BrokerAdmin>(pub Arc<T>);
                    impl<
                        T: BrokerAdmin,
                    > tonic::server::UnaryService<super::ActivateBrokerRequest>
                    for ActivateBrokerSvc<T> {
                        type Response = super::ActivateBrokerResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::ActivateBrokerRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as BrokerAdmin>::activate_broker(&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 method = ActivateBrokerSvc(inner);
                        let codec = tonic_prost::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 {
                        let mut response = http::Response::new(
                            tonic::body::Body::default(),
                        );
                        let headers = response.headers_mut();
                        headers
                            .insert(
                                tonic::Status::GRPC_STATUS,
                                (tonic::Code::Unimplemented as i32).into(),
                            );
                        headers
                            .insert(
                                http::header::CONTENT_TYPE,
                                tonic::metadata::GRPC_CONTENT_TYPE,
                            );
                        Ok(response)
                    })
                }
            }
        }
    }
    impl<T> Clone for BrokerAdminServer<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,
            }
        }
    }
    /// Generated gRPC service name
    pub const SERVICE_NAME: &str = "danube_admin.BrokerAdmin";
    impl<T> tonic::server::NamedService for BrokerAdminServer<T> {
        const NAME: &'static str = SERVICE_NAME;
    }
}
/// Generated client implementations.
pub mod namespace_admin_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    #[derive(Debug, Clone)]
    pub struct NamespaceAdminClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl NamespaceAdminClient<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> NamespaceAdminClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::Body>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::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,
        ) -> NamespaceAdminClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::Body>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::Body>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            NamespaceAdminClient::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
        }
        /// Namespace related RPCs
        pub async fn get_namespace_topics(
            &mut self,
            request: impl tonic::IntoRequest<super::NamespaceRequest>,
        ) -> std::result::Result<
            tonic::Response<super::TopicListResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/danube_admin.NamespaceAdmin/GetNamespaceTopics",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("danube_admin.NamespaceAdmin", "GetNamespaceTopics"),
                );
            self.inner.unary(req, path, codec).await
        }
        pub async fn get_namespace_policies(
            &mut self,
            request: impl tonic::IntoRequest<super::NamespaceRequest>,
        ) -> std::result::Result<tonic::Response<super::PolicyResponse>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/danube_admin.NamespaceAdmin/GetNamespacePolicies",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "danube_admin.NamespaceAdmin",
                        "GetNamespacePolicies",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        pub async fn create_namespace(
            &mut self,
            request: impl tonic::IntoRequest<super::NamespaceRequest>,
        ) -> std::result::Result<
            tonic::Response<super::NamespaceResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/danube_admin.NamespaceAdmin/CreateNamespace",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("danube_admin.NamespaceAdmin", "CreateNamespace"),
                );
            self.inner.unary(req, path, codec).await
        }
        pub async fn delete_namespace(
            &mut self,
            request: impl tonic::IntoRequest<super::NamespaceRequest>,
        ) -> std::result::Result<
            tonic::Response<super::NamespaceResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/danube_admin.NamespaceAdmin/DeleteNamespace",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("danube_admin.NamespaceAdmin", "DeleteNamespace"),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Generated server implementations.
pub mod namespace_admin_server {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    /// Generated trait containing gRPC methods that should be implemented for use with NamespaceAdminServer.
    #[async_trait]
    pub trait NamespaceAdmin: std::marker::Send + std::marker::Sync + 'static {
        /// Namespace related RPCs
        async fn get_namespace_topics(
            &self,
            request: tonic::Request<super::NamespaceRequest>,
        ) -> std::result::Result<
            tonic::Response<super::TopicListResponse>,
            tonic::Status,
        >;
        async fn get_namespace_policies(
            &self,
            request: tonic::Request<super::NamespaceRequest>,
        ) -> std::result::Result<tonic::Response<super::PolicyResponse>, tonic::Status>;
        async fn create_namespace(
            &self,
            request: tonic::Request<super::NamespaceRequest>,
        ) -> std::result::Result<
            tonic::Response<super::NamespaceResponse>,
            tonic::Status,
        >;
        async fn delete_namespace(
            &self,
            request: tonic::Request<super::NamespaceRequest>,
        ) -> std::result::Result<
            tonic::Response<super::NamespaceResponse>,
            tonic::Status,
        >;
    }
    #[derive(Debug)]
    pub struct NamespaceAdminServer<T> {
        inner: Arc<T>,
        accept_compression_encodings: EnabledCompressionEncodings,
        send_compression_encodings: EnabledCompressionEncodings,
        max_decoding_message_size: Option<usize>,
        max_encoding_message_size: Option<usize>,
    }
    impl<T> NamespaceAdminServer<T> {
        pub fn new(inner: T) -> Self {
            Self::from_arc(Arc::new(inner))
        }
        pub fn from_arc(inner: Arc<T>) -> Self {
            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 NamespaceAdminServer<T>
    where
        T: NamespaceAdmin,
        B: Body + std::marker::Send + 'static,
        B::Error: Into<StdError> + std::marker::Send + 'static,
    {
        type Response = http::Response<tonic::body::Body>;
        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 {
            match req.uri().path() {
                "/danube_admin.NamespaceAdmin/GetNamespaceTopics" => {
                    #[allow(non_camel_case_types)]
                    struct GetNamespaceTopicsSvc<T: NamespaceAdmin>(pub Arc<T>);
                    impl<
                        T: NamespaceAdmin,
                    > tonic::server::UnaryService<super::NamespaceRequest>
                    for GetNamespaceTopicsSvc<T> {
                        type Response = super::TopicListResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::NamespaceRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as NamespaceAdmin>::get_namespace_topics(&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 method = GetNamespaceTopicsSvc(inner);
                        let codec = tonic_prost::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)
                }
                "/danube_admin.NamespaceAdmin/GetNamespacePolicies" => {
                    #[allow(non_camel_case_types)]
                    struct GetNamespacePoliciesSvc<T: NamespaceAdmin>(pub Arc<T>);
                    impl<
                        T: NamespaceAdmin,
                    > tonic::server::UnaryService<super::NamespaceRequest>
                    for GetNamespacePoliciesSvc<T> {
                        type Response = super::PolicyResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::NamespaceRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as NamespaceAdmin>::get_namespace_policies(
                                        &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 method = GetNamespacePoliciesSvc(inner);
                        let codec = tonic_prost::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)
                }
                "/danube_admin.NamespaceAdmin/CreateNamespace" => {
                    #[allow(non_camel_case_types)]
                    struct CreateNamespaceSvc<T: NamespaceAdmin>(pub Arc<T>);
                    impl<
                        T: NamespaceAdmin,
                    > tonic::server::UnaryService<super::NamespaceRequest>
                    for CreateNamespaceSvc<T> {
                        type Response = super::NamespaceResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::NamespaceRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as NamespaceAdmin>::create_namespace(&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 method = CreateNamespaceSvc(inner);
                        let codec = tonic_prost::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)
                }
                "/danube_admin.NamespaceAdmin/DeleteNamespace" => {
                    #[allow(non_camel_case_types)]
                    struct DeleteNamespaceSvc<T: NamespaceAdmin>(pub Arc<T>);
                    impl<
                        T: NamespaceAdmin,
                    > tonic::server::UnaryService<super::NamespaceRequest>
                    for DeleteNamespaceSvc<T> {
                        type Response = super::NamespaceResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::NamespaceRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as NamespaceAdmin>::delete_namespace(&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 method = DeleteNamespaceSvc(inner);
                        let codec = tonic_prost::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 {
                        let mut response = http::Response::new(
                            tonic::body::Body::default(),
                        );
                        let headers = response.headers_mut();
                        headers
                            .insert(
                                tonic::Status::GRPC_STATUS,
                                (tonic::Code::Unimplemented as i32).into(),
                            );
                        headers
                            .insert(
                                http::header::CONTENT_TYPE,
                                tonic::metadata::GRPC_CONTENT_TYPE,
                            );
                        Ok(response)
                    })
                }
            }
        }
    }
    impl<T> Clone for NamespaceAdminServer<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,
            }
        }
    }
    /// Generated gRPC service name
    pub const SERVICE_NAME: &str = "danube_admin.NamespaceAdmin";
    impl<T> tonic::server::NamedService for NamespaceAdminServer<T> {
        const NAME: &'static str = SERVICE_NAME;
    }
}
/// Generated client implementations.
pub mod topic_admin_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    #[derive(Debug, Clone)]
    pub struct TopicAdminClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl TopicAdminClient<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> TopicAdminClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::Body>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::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,
        ) -> TopicAdminClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::Body>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::Body>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            TopicAdminClient::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
        }
        /// Topic related RPCs
        pub async fn list_namespace_topics(
            &mut self,
            request: impl tonic::IntoRequest<super::NamespaceRequest>,
        ) -> std::result::Result<
            tonic::Response<super::TopicInfoListResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/danube_admin.TopicAdmin/ListNamespaceTopics",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("danube_admin.TopicAdmin", "ListNamespaceTopics"),
                );
            self.inner.unary(req, path, codec).await
        }
        pub async fn list_broker_topics(
            &mut self,
            request: impl tonic::IntoRequest<super::BrokerRequest>,
        ) -> std::result::Result<
            tonic::Response<super::TopicInfoListResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/danube_admin.TopicAdmin/ListBrokerTopics",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("danube_admin.TopicAdmin", "ListBrokerTopics"));
            self.inner.unary(req, path, codec).await
        }
        pub async fn create_topic(
            &mut self,
            request: impl tonic::IntoRequest<super::NewTopicRequest>,
        ) -> std::result::Result<tonic::Response<super::TopicResponse>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/danube_admin.TopicAdmin/CreateTopic",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("danube_admin.TopicAdmin", "CreateTopic"));
            self.inner.unary(req, path, codec).await
        }
        pub async fn create_partitioned_topic(
            &mut self,
            request: impl tonic::IntoRequest<super::PartitionedTopicRequest>,
        ) -> std::result::Result<tonic::Response<super::TopicResponse>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/danube_admin.TopicAdmin/CreatePartitionedTopic",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("danube_admin.TopicAdmin", "CreatePartitionedTopic"),
                );
            self.inner.unary(req, path, codec).await
        }
        pub async fn delete_topic(
            &mut self,
            request: impl tonic::IntoRequest<super::TopicRequest>,
        ) -> std::result::Result<tonic::Response<super::TopicResponse>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/danube_admin.TopicAdmin/DeleteTopic",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("danube_admin.TopicAdmin", "DeleteTopic"));
            self.inner.unary(req, path, codec).await
        }
        pub async fn unload_topic(
            &mut self,
            request: impl tonic::IntoRequest<super::TopicRequest>,
        ) -> std::result::Result<tonic::Response<super::TopicResponse>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/danube_admin.TopicAdmin/UnloadTopic",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("danube_admin.TopicAdmin", "UnloadTopic"));
            self.inner.unary(req, path, codec).await
        }
        pub async fn list_subscriptions(
            &mut self,
            request: impl tonic::IntoRequest<super::TopicRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SubscriptionListResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/danube_admin.TopicAdmin/ListSubscriptions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("danube_admin.TopicAdmin", "ListSubscriptions"));
            self.inner.unary(req, path, codec).await
        }
        pub async fn unsubscribe(
            &mut self,
            request: impl tonic::IntoRequest<super::SubscriptionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SubscriptionResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/danube_admin.TopicAdmin/Unsubscribe",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("danube_admin.TopicAdmin", "Unsubscribe"));
            self.inner.unary(req, path, codec).await
        }
        pub async fn describe_topic(
            &mut self,
            request: impl tonic::IntoRequest<super::DescribeTopicRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DescribeTopicResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/danube_admin.TopicAdmin/DescribeTopic",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("danube_admin.TopicAdmin", "DescribeTopic"));
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Generated server implementations.
pub mod topic_admin_server {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    /// Generated trait containing gRPC methods that should be implemented for use with TopicAdminServer.
    #[async_trait]
    pub trait TopicAdmin: std::marker::Send + std::marker::Sync + 'static {
        /// Topic related RPCs
        async fn list_namespace_topics(
            &self,
            request: tonic::Request<super::NamespaceRequest>,
        ) -> std::result::Result<
            tonic::Response<super::TopicInfoListResponse>,
            tonic::Status,
        >;
        async fn list_broker_topics(
            &self,
            request: tonic::Request<super::BrokerRequest>,
        ) -> std::result::Result<
            tonic::Response<super::TopicInfoListResponse>,
            tonic::Status,
        >;
        async fn create_topic(
            &self,
            request: tonic::Request<super::NewTopicRequest>,
        ) -> std::result::Result<tonic::Response<super::TopicResponse>, tonic::Status>;
        async fn create_partitioned_topic(
            &self,
            request: tonic::Request<super::PartitionedTopicRequest>,
        ) -> std::result::Result<tonic::Response<super::TopicResponse>, tonic::Status>;
        async fn delete_topic(
            &self,
            request: tonic::Request<super::TopicRequest>,
        ) -> std::result::Result<tonic::Response<super::TopicResponse>, tonic::Status>;
        async fn unload_topic(
            &self,
            request: tonic::Request<super::TopicRequest>,
        ) -> std::result::Result<tonic::Response<super::TopicResponse>, tonic::Status>;
        async fn list_subscriptions(
            &self,
            request: tonic::Request<super::TopicRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SubscriptionListResponse>,
            tonic::Status,
        >;
        async fn unsubscribe(
            &self,
            request: tonic::Request<super::SubscriptionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SubscriptionResponse>,
            tonic::Status,
        >;
        async fn describe_topic(
            &self,
            request: tonic::Request<super::DescribeTopicRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DescribeTopicResponse>,
            tonic::Status,
        >;
    }
    #[derive(Debug)]
    pub struct TopicAdminServer<T> {
        inner: Arc<T>,
        accept_compression_encodings: EnabledCompressionEncodings,
        send_compression_encodings: EnabledCompressionEncodings,
        max_decoding_message_size: Option<usize>,
        max_encoding_message_size: Option<usize>,
    }
    impl<T> TopicAdminServer<T> {
        pub fn new(inner: T) -> Self {
            Self::from_arc(Arc::new(inner))
        }
        pub fn from_arc(inner: Arc<T>) -> Self {
            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 TopicAdminServer<T>
    where
        T: TopicAdmin,
        B: Body + std::marker::Send + 'static,
        B::Error: Into<StdError> + std::marker::Send + 'static,
    {
        type Response = http::Response<tonic::body::Body>;
        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 {
            match req.uri().path() {
                "/danube_admin.TopicAdmin/ListNamespaceTopics" => {
                    #[allow(non_camel_case_types)]
                    struct ListNamespaceTopicsSvc<T: TopicAdmin>(pub Arc<T>);
                    impl<
                        T: TopicAdmin,
                    > tonic::server::UnaryService<super::NamespaceRequest>
                    for ListNamespaceTopicsSvc<T> {
                        type Response = super::TopicInfoListResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::NamespaceRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as TopicAdmin>::list_namespace_topics(&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 method = ListNamespaceTopicsSvc(inner);
                        let codec = tonic_prost::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)
                }
                "/danube_admin.TopicAdmin/ListBrokerTopics" => {
                    #[allow(non_camel_case_types)]
                    struct ListBrokerTopicsSvc<T: TopicAdmin>(pub Arc<T>);
                    impl<T: TopicAdmin> tonic::server::UnaryService<super::BrokerRequest>
                    for ListBrokerTopicsSvc<T> {
                        type Response = super::TopicInfoListResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::BrokerRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as TopicAdmin>::list_broker_topics(&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 method = ListBrokerTopicsSvc(inner);
                        let codec = tonic_prost::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)
                }
                "/danube_admin.TopicAdmin/CreateTopic" => {
                    #[allow(non_camel_case_types)]
                    struct CreateTopicSvc<T: TopicAdmin>(pub Arc<T>);
                    impl<
                        T: TopicAdmin,
                    > tonic::server::UnaryService<super::NewTopicRequest>
                    for CreateTopicSvc<T> {
                        type Response = super::TopicResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::NewTopicRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as TopicAdmin>::create_topic(&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 method = CreateTopicSvc(inner);
                        let codec = tonic_prost::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)
                }
                "/danube_admin.TopicAdmin/CreatePartitionedTopic" => {
                    #[allow(non_camel_case_types)]
                    struct CreatePartitionedTopicSvc<T: TopicAdmin>(pub Arc<T>);
                    impl<
                        T: TopicAdmin,
                    > tonic::server::UnaryService<super::PartitionedTopicRequest>
                    for CreatePartitionedTopicSvc<T> {
                        type Response = super::TopicResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::PartitionedTopicRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as TopicAdmin>::create_partitioned_topic(&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 method = CreatePartitionedTopicSvc(inner);
                        let codec = tonic_prost::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)
                }
                "/danube_admin.TopicAdmin/DeleteTopic" => {
                    #[allow(non_camel_case_types)]
                    struct DeleteTopicSvc<T: TopicAdmin>(pub Arc<T>);
                    impl<T: TopicAdmin> tonic::server::UnaryService<super::TopicRequest>
                    for DeleteTopicSvc<T> {
                        type Response = super::TopicResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::TopicRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as TopicAdmin>::delete_topic(&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 method = DeleteTopicSvc(inner);
                        let codec = tonic_prost::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)
                }
                "/danube_admin.TopicAdmin/UnloadTopic" => {
                    #[allow(non_camel_case_types)]
                    struct UnloadTopicSvc<T: TopicAdmin>(pub Arc<T>);
                    impl<T: TopicAdmin> tonic::server::UnaryService<super::TopicRequest>
                    for UnloadTopicSvc<T> {
                        type Response = super::TopicResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::TopicRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as TopicAdmin>::unload_topic(&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 method = UnloadTopicSvc(inner);
                        let codec = tonic_prost::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)
                }
                "/danube_admin.TopicAdmin/ListSubscriptions" => {
                    #[allow(non_camel_case_types)]
                    struct ListSubscriptionsSvc<T: TopicAdmin>(pub Arc<T>);
                    impl<T: TopicAdmin> tonic::server::UnaryService<super::TopicRequest>
                    for ListSubscriptionsSvc<T> {
                        type Response = super::SubscriptionListResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::TopicRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as TopicAdmin>::list_subscriptions(&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 method = ListSubscriptionsSvc(inner);
                        let codec = tonic_prost::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)
                }
                "/danube_admin.TopicAdmin/Unsubscribe" => {
                    #[allow(non_camel_case_types)]
                    struct UnsubscribeSvc<T: TopicAdmin>(pub Arc<T>);
                    impl<
                        T: TopicAdmin,
                    > tonic::server::UnaryService<super::SubscriptionRequest>
                    for UnsubscribeSvc<T> {
                        type Response = super::SubscriptionResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::SubscriptionRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as TopicAdmin>::unsubscribe(&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 method = UnsubscribeSvc(inner);
                        let codec = tonic_prost::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)
                }
                "/danube_admin.TopicAdmin/DescribeTopic" => {
                    #[allow(non_camel_case_types)]
                    struct DescribeTopicSvc<T: TopicAdmin>(pub Arc<T>);
                    impl<
                        T: TopicAdmin,
                    > tonic::server::UnaryService<super::DescribeTopicRequest>
                    for DescribeTopicSvc<T> {
                        type Response = super::DescribeTopicResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::DescribeTopicRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as TopicAdmin>::describe_topic(&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 method = DescribeTopicSvc(inner);
                        let codec = tonic_prost::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 {
                        let mut response = http::Response::new(
                            tonic::body::Body::default(),
                        );
                        let headers = response.headers_mut();
                        headers
                            .insert(
                                tonic::Status::GRPC_STATUS,
                                (tonic::Code::Unimplemented as i32).into(),
                            );
                        headers
                            .insert(
                                http::header::CONTENT_TYPE,
                                tonic::metadata::GRPC_CONTENT_TYPE,
                            );
                        Ok(response)
                    })
                }
            }
        }
    }
    impl<T> Clone for TopicAdminServer<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,
            }
        }
    }
    /// Generated gRPC service name
    pub const SERVICE_NAME: &str = "danube_admin.TopicAdmin";
    impl<T> tonic::server::NamedService for TopicAdminServer<T> {
        const NAME: &'static str = SERVICE_NAME;
    }
}
