// This file is @generated by prost-build.
/// Request to register a new schema
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RegisterSchemaRequest {
    /// Subject name (defaults to topic name)
    #[prost(string, tag = "1")]
    pub subject: ::prost::alloc::string::String,
    /// "avro", "json_schema", "protobuf", "bytes", "string", "number"
    #[prost(string, tag = "2")]
    pub schema_type: ::prost::alloc::string::String,
    /// Schema content (JSON for Avro/JSON Schema, proto for Protobuf)
    #[prost(bytes = "vec", tag = "3")]
    pub schema_definition: ::prost::alloc::vec::Vec<u8>,
    /// Human-readable description
    #[prost(string, tag = "4")]
    pub description: ::prost::alloc::string::String,
    /// Creator identifier
    #[prost(string, tag = "5")]
    pub created_by: ::prost::alloc::string::String,
    /// Tags for categorization
    #[prost(string, repeated, tag = "6")]
    pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Response after registering a schema
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RegisterSchemaResponse {
    /// Globally unique schema ID
    #[prost(uint64, tag = "1")]
    pub schema_id: u64,
    /// Version number for this subject
    #[prost(uint32, tag = "2")]
    pub version: u32,
    /// false if exact schema already exists
    #[prost(bool, tag = "3")]
    pub is_new_version: bool,
    /// SHA-256 hash of schema for client caching
    #[prost(string, tag = "4")]
    pub fingerprint: ::prost::alloc::string::String,
}
/// Request to get a schema by ID
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetSchemaRequest {
    /// Global schema ID
    #[prost(uint64, tag = "1")]
    pub schema_id: u64,
    /// Optional version, if omitted returns latest
    #[prost(uint32, optional, tag = "2")]
    pub version: ::core::option::Option<u32>,
}
/// Response containing schema details
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetSchemaResponse {
    #[prost(uint64, tag = "1")]
    pub schema_id: u64,
    #[prost(uint32, tag = "2")]
    pub version: u32,
    #[prost(string, tag = "3")]
    pub subject: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub schema_type: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "5")]
    pub schema_definition: ::prost::alloc::vec::Vec<u8>,
    #[prost(string, tag = "6")]
    pub description: ::prost::alloc::string::String,
    #[prost(uint64, tag = "7")]
    pub created_at: u64,
    #[prost(string, tag = "8")]
    pub created_by: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "9")]
    pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, tag = "10")]
    pub fingerprint: ::prost::alloc::string::String,
    #[prost(string, tag = "11")]
    pub compatibility_mode: ::prost::alloc::string::String,
}
/// Request to get latest schema for a subject
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetLatestSchemaRequest {
    /// Subject name (usually topic name)
    #[prost(string, tag = "1")]
    pub subject: ::prost::alloc::string::String,
}
/// Request to list all versions of a subject
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListVersionsRequest {
    #[prost(string, tag = "1")]
    pub subject: ::prost::alloc::string::String,
}
/// Response with list of versions
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListVersionsResponse {
    #[prost(message, repeated, tag = "1")]
    pub versions: ::prost::alloc::vec::Vec<SchemaVersionInfo>,
}
/// Information about a schema version
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SchemaVersionInfo {
    #[prost(uint32, tag = "1")]
    pub version: u32,
    #[prost(uint64, tag = "2")]
    pub created_at: u64,
    #[prost(string, tag = "3")]
    pub created_by: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub description: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub fingerprint: ::prost::alloc::string::String,
    #[prost(uint64, tag = "6")]
    pub schema_id: u64,
}
/// Request to check compatibility
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CheckCompatibilityRequest {
    #[prost(string, tag = "1")]
    pub subject: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "2")]
    pub new_schema_definition: ::prost::alloc::vec::Vec<u8>,
    #[prost(string, tag = "3")]
    pub schema_type: ::prost::alloc::string::String,
    /// Override subject's compatibility mode
    #[prost(string, optional, tag = "4")]
    pub compatibility_mode: ::core::option::Option<::prost::alloc::string::String>,
}
/// Response with compatibility result
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CheckCompatibilityResponse {
    #[prost(bool, tag = "1")]
    pub is_compatible: bool,
    /// Incompatibility reasons if not compatible
    #[prost(string, repeated, tag = "2")]
    pub errors: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Request to delete a schema version
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteSchemaVersionRequest {
    #[prost(string, tag = "1")]
    pub subject: ::prost::alloc::string::String,
    #[prost(uint32, tag = "2")]
    pub version: u32,
}
/// Response for delete operation
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteSchemaVersionResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
}
/// Request to set compatibility mode
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SetCompatibilityModeRequest {
    #[prost(string, tag = "1")]
    pub subject: ::prost::alloc::string::String,
    /// "none", "backward", "forward", "full"
    #[prost(string, tag = "2")]
    pub compatibility_mode: ::prost::alloc::string::String,
}
/// Response for compatibility mode update
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SetCompatibilityModeResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
}
/// Request to configure schema for a topic (admin-only)
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConfigureTopicSchemaRequest {
    /// Topic to configure (e.g., "/default/user-events")
    #[prost(string, tag = "1")]
    pub topic_name: ::prost::alloc::string::String,
    /// Schema subject to assign
    #[prost(string, tag = "2")]
    pub schema_subject: ::prost::alloc::string::String,
    /// "none", "warn", or "enforce"
    #[prost(string, tag = "3")]
    pub validation_policy: ::prost::alloc::string::String,
    /// Enable deep payload validation
    #[prost(bool, tag = "4")]
    pub enable_payload_validation: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConfigureTopicSchemaResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
}
/// Request to update validation policy (admin-only)
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateTopicValidationPolicyRequest {
    #[prost(string, tag = "1")]
    pub topic_name: ::prost::alloc::string::String,
    /// "none", "warn", or "enforce"
    #[prost(string, tag = "2")]
    pub validation_policy: ::prost::alloc::string::String,
    #[prost(bool, tag = "3")]
    pub enable_payload_validation: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateTopicValidationPolicyResponse {
    #[prost(bool, tag = "1")]
    pub success: bool,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
}
/// Request to get topic schema configuration
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetTopicSchemaConfigRequest {
    #[prost(string, tag = "1")]
    pub topic_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetTopicSchemaConfigResponse {
    /// Schema subject assigned to topic
    #[prost(string, tag = "1")]
    pub schema_subject: ::prost::alloc::string::String,
    /// Current validation policy
    #[prost(string, tag = "2")]
    pub validation_policy: ::prost::alloc::string::String,
    /// Whether payload validation is enabled
    #[prost(bool, tag = "3")]
    pub enable_payload_validation: bool,
    /// Cached schema_id for the subject
    #[prost(uint64, tag = "4")]
    pub schema_id: u64,
}
/// Generated client implementations.
pub mod schema_registry_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Schema Registry Service for managing schemas across the Danube cluster
    #[derive(Debug, Clone)]
    pub struct SchemaRegistryClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl SchemaRegistryClient<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> SchemaRegistryClient<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,
        ) -> SchemaRegistryClient<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,
        {
            SchemaRegistryClient::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
        }
        /// Register a new schema or get existing schema ID if identical schema exists
        pub async fn register_schema(
            &mut self,
            request: impl tonic::IntoRequest<super::RegisterSchemaRequest>,
        ) -> std::result::Result<
            tonic::Response<super::RegisterSchemaResponse>,
            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_schema.SchemaRegistry/RegisterSchema",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("danube_schema.SchemaRegistry", "RegisterSchema"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Get a specific schema by ID and optional version
        pub async fn get_schema(
            &mut self,
            request: impl tonic::IntoRequest<super::GetSchemaRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetSchemaResponse>,
            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_schema.SchemaRegistry/GetSchema",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("danube_schema.SchemaRegistry", "GetSchema"));
            self.inner.unary(req, path, codec).await
        }
        /// Get the latest version of a schema for a subject
        pub async fn get_latest_schema(
            &mut self,
            request: impl tonic::IntoRequest<super::GetLatestSchemaRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetSchemaResponse>,
            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_schema.SchemaRegistry/GetLatestSchema",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("danube_schema.SchemaRegistry", "GetLatestSchema"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// List all versions for a subject
        pub async fn list_versions(
            &mut self,
            request: impl tonic::IntoRequest<super::ListVersionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListVersionsResponse>,
            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_schema.SchemaRegistry/ListVersions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("danube_schema.SchemaRegistry", "ListVersions"));
            self.inner.unary(req, path, codec).await
        }
        /// Check if a new schema is compatible with existing versions
        pub async fn check_compatibility(
            &mut self,
            request: impl tonic::IntoRequest<super::CheckCompatibilityRequest>,
        ) -> std::result::Result<
            tonic::Response<super::CheckCompatibilityResponse>,
            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_schema.SchemaRegistry/CheckCompatibility",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("danube_schema.SchemaRegistry", "CheckCompatibility"),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Delete a specific schema version
        pub async fn delete_schema_version(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteSchemaVersionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DeleteSchemaVersionResponse>,
            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_schema.SchemaRegistry/DeleteSchemaVersion",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "danube_schema.SchemaRegistry",
                        "DeleteSchemaVersion",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Set or update compatibility mode for a subject
        pub async fn set_compatibility_mode(
            &mut self,
            request: impl tonic::IntoRequest<super::SetCompatibilityModeRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SetCompatibilityModeResponse>,
            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_schema.SchemaRegistry/SetCompatibilityMode",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "danube_schema.SchemaRegistry",
                        "SetCompatibilityMode",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Configure schema settings for a topic (admin-only)
        /// Allows admin to assign/change schema subject and validation settings
        pub async fn configure_topic_schema(
            &mut self,
            request: impl tonic::IntoRequest<super::ConfigureTopicSchemaRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ConfigureTopicSchemaResponse>,
            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_schema.SchemaRegistry/ConfigureTopicSchema",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "danube_schema.SchemaRegistry",
                        "ConfigureTopicSchema",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Update validation policy for a topic (admin-only)
        pub async fn update_topic_validation_policy(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateTopicValidationPolicyRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UpdateTopicValidationPolicyResponse>,
            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_schema.SchemaRegistry/UpdateTopicValidationPolicy",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "danube_schema.SchemaRegistry",
                        "UpdateTopicValidationPolicy",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Get current schema configuration for a topic
        pub async fn get_topic_schema_config(
            &mut self,
            request: impl tonic::IntoRequest<super::GetTopicSchemaConfigRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetTopicSchemaConfigResponse>,
            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_schema.SchemaRegistry/GetTopicSchemaConfig",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "danube_schema.SchemaRegistry",
                        "GetTopicSchemaConfig",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Generated server implementations.
pub mod schema_registry_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 SchemaRegistryServer.
    #[async_trait]
    pub trait SchemaRegistry: std::marker::Send + std::marker::Sync + 'static {
        /// Register a new schema or get existing schema ID if identical schema exists
        async fn register_schema(
            &self,
            request: tonic::Request<super::RegisterSchemaRequest>,
        ) -> std::result::Result<
            tonic::Response<super::RegisterSchemaResponse>,
            tonic::Status,
        >;
        /// Get a specific schema by ID and optional version
        async fn get_schema(
            &self,
            request: tonic::Request<super::GetSchemaRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetSchemaResponse>,
            tonic::Status,
        >;
        /// Get the latest version of a schema for a subject
        async fn get_latest_schema(
            &self,
            request: tonic::Request<super::GetLatestSchemaRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetSchemaResponse>,
            tonic::Status,
        >;
        /// List all versions for a subject
        async fn list_versions(
            &self,
            request: tonic::Request<super::ListVersionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListVersionsResponse>,
            tonic::Status,
        >;
        /// Check if a new schema is compatible with existing versions
        async fn check_compatibility(
            &self,
            request: tonic::Request<super::CheckCompatibilityRequest>,
        ) -> std::result::Result<
            tonic::Response<super::CheckCompatibilityResponse>,
            tonic::Status,
        >;
        /// Delete a specific schema version
        async fn delete_schema_version(
            &self,
            request: tonic::Request<super::DeleteSchemaVersionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DeleteSchemaVersionResponse>,
            tonic::Status,
        >;
        /// Set or update compatibility mode for a subject
        async fn set_compatibility_mode(
            &self,
            request: tonic::Request<super::SetCompatibilityModeRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SetCompatibilityModeResponse>,
            tonic::Status,
        >;
        /// Configure schema settings for a topic (admin-only)
        /// Allows admin to assign/change schema subject and validation settings
        async fn configure_topic_schema(
            &self,
            request: tonic::Request<super::ConfigureTopicSchemaRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ConfigureTopicSchemaResponse>,
            tonic::Status,
        >;
        /// Update validation policy for a topic (admin-only)
        async fn update_topic_validation_policy(
            &self,
            request: tonic::Request<super::UpdateTopicValidationPolicyRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UpdateTopicValidationPolicyResponse>,
            tonic::Status,
        >;
        /// Get current schema configuration for a topic
        async fn get_topic_schema_config(
            &self,
            request: tonic::Request<super::GetTopicSchemaConfigRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetTopicSchemaConfigResponse>,
            tonic::Status,
        >;
    }
    /// Schema Registry Service for managing schemas across the Danube cluster
    #[derive(Debug)]
    pub struct SchemaRegistryServer<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> SchemaRegistryServer<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 SchemaRegistryServer<T>
    where
        T: SchemaRegistry,
        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_schema.SchemaRegistry/RegisterSchema" => {
                    #[allow(non_camel_case_types)]
                    struct RegisterSchemaSvc<T: SchemaRegistry>(pub Arc<T>);
                    impl<
                        T: SchemaRegistry,
                    > tonic::server::UnaryService<super::RegisterSchemaRequest>
                    for RegisterSchemaSvc<T> {
                        type Response = super::RegisterSchemaResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::RegisterSchemaRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as SchemaRegistry>::register_schema(&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 = RegisterSchemaSvc(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_schema.SchemaRegistry/GetSchema" => {
                    #[allow(non_camel_case_types)]
                    struct GetSchemaSvc<T: SchemaRegistry>(pub Arc<T>);
                    impl<
                        T: SchemaRegistry,
                    > tonic::server::UnaryService<super::GetSchemaRequest>
                    for GetSchemaSvc<T> {
                        type Response = super::GetSchemaResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::GetSchemaRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as SchemaRegistry>::get_schema(&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 = GetSchemaSvc(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_schema.SchemaRegistry/GetLatestSchema" => {
                    #[allow(non_camel_case_types)]
                    struct GetLatestSchemaSvc<T: SchemaRegistry>(pub Arc<T>);
                    impl<
                        T: SchemaRegistry,
                    > tonic::server::UnaryService<super::GetLatestSchemaRequest>
                    for GetLatestSchemaSvc<T> {
                        type Response = super::GetSchemaResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::GetLatestSchemaRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as SchemaRegistry>::get_latest_schema(&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 = GetLatestSchemaSvc(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_schema.SchemaRegistry/ListVersions" => {
                    #[allow(non_camel_case_types)]
                    struct ListVersionsSvc<T: SchemaRegistry>(pub Arc<T>);
                    impl<
                        T: SchemaRegistry,
                    > tonic::server::UnaryService<super::ListVersionsRequest>
                    for ListVersionsSvc<T> {
                        type Response = super::ListVersionsResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::ListVersionsRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as SchemaRegistry>::list_versions(&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 = ListVersionsSvc(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_schema.SchemaRegistry/CheckCompatibility" => {
                    #[allow(non_camel_case_types)]
                    struct CheckCompatibilitySvc<T: SchemaRegistry>(pub Arc<T>);
                    impl<
                        T: SchemaRegistry,
                    > tonic::server::UnaryService<super::CheckCompatibilityRequest>
                    for CheckCompatibilitySvc<T> {
                        type Response = super::CheckCompatibilityResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::CheckCompatibilityRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as SchemaRegistry>::check_compatibility(&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 = CheckCompatibilitySvc(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_schema.SchemaRegistry/DeleteSchemaVersion" => {
                    #[allow(non_camel_case_types)]
                    struct DeleteSchemaVersionSvc<T: SchemaRegistry>(pub Arc<T>);
                    impl<
                        T: SchemaRegistry,
                    > tonic::server::UnaryService<super::DeleteSchemaVersionRequest>
                    for DeleteSchemaVersionSvc<T> {
                        type Response = super::DeleteSchemaVersionResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::DeleteSchemaVersionRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as SchemaRegistry>::delete_schema_version(
                                        &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 = DeleteSchemaVersionSvc(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_schema.SchemaRegistry/SetCompatibilityMode" => {
                    #[allow(non_camel_case_types)]
                    struct SetCompatibilityModeSvc<T: SchemaRegistry>(pub Arc<T>);
                    impl<
                        T: SchemaRegistry,
                    > tonic::server::UnaryService<super::SetCompatibilityModeRequest>
                    for SetCompatibilityModeSvc<T> {
                        type Response = super::SetCompatibilityModeResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::SetCompatibilityModeRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as SchemaRegistry>::set_compatibility_mode(
                                        &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 = SetCompatibilityModeSvc(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_schema.SchemaRegistry/ConfigureTopicSchema" => {
                    #[allow(non_camel_case_types)]
                    struct ConfigureTopicSchemaSvc<T: SchemaRegistry>(pub Arc<T>);
                    impl<
                        T: SchemaRegistry,
                    > tonic::server::UnaryService<super::ConfigureTopicSchemaRequest>
                    for ConfigureTopicSchemaSvc<T> {
                        type Response = super::ConfigureTopicSchemaResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::ConfigureTopicSchemaRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as SchemaRegistry>::configure_topic_schema(
                                        &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 = ConfigureTopicSchemaSvc(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_schema.SchemaRegistry/UpdateTopicValidationPolicy" => {
                    #[allow(non_camel_case_types)]
                    struct UpdateTopicValidationPolicySvc<T: SchemaRegistry>(pub Arc<T>);
                    impl<
                        T: SchemaRegistry,
                    > tonic::server::UnaryService<
                        super::UpdateTopicValidationPolicyRequest,
                    > for UpdateTopicValidationPolicySvc<T> {
                        type Response = super::UpdateTopicValidationPolicyResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<
                                super::UpdateTopicValidationPolicyRequest,
                            >,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as SchemaRegistry>::update_topic_validation_policy(
                                        &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 = UpdateTopicValidationPolicySvc(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_schema.SchemaRegistry/GetTopicSchemaConfig" => {
                    #[allow(non_camel_case_types)]
                    struct GetTopicSchemaConfigSvc<T: SchemaRegistry>(pub Arc<T>);
                    impl<
                        T: SchemaRegistry,
                    > tonic::server::UnaryService<super::GetTopicSchemaConfigRequest>
                    for GetTopicSchemaConfigSvc<T> {
                        type Response = super::GetTopicSchemaConfigResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::GetTopicSchemaConfigRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as SchemaRegistry>::get_topic_schema_config(
                                        &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 = GetTopicSchemaConfigSvc(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 SchemaRegistryServer<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_schema.SchemaRegistry";
    impl<T> tonic::server::NamedService for SchemaRegistryServer<T> {
        const NAME: &'static str = SERVICE_NAME;
    }
}
